@blockend/widget 1.0.54 → 1.0.55-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/{AllRoutes-CZLcXz0H.js → AllRoutes-DIde2MHr.js} +910 -929
  2. package/dist/{Box-DeJ0aAds.js → Box-DQB1ZyEK.js} +16 -16
  3. package/dist/EstGas-C7sLxEX_.js +1523 -0
  4. package/dist/{Grow-CAO6QGlH.js → Grow-CxaAxl6-.js} +300 -303
  5. package/dist/InputComp-CDuJJKaD.js +105 -0
  6. package/dist/LoadRoute-CVas28CM.js +123 -0
  7. package/dist/QuotesProgress-DaL4L4Db.js +27 -0
  8. package/dist/{SwapAsset-CkPNtJ5Z.js → SwapAsset-DSV6l90O.js} +13 -14
  9. package/dist/{Tooltip-Du4SfKmq.js → Tooltip-PAQ9gquY.js} +35 -35
  10. package/dist/TxnButton-BiO4vJ-y.js +207 -0
  11. package/dist/ccip-B6-4PQvj.js +226 -0
  12. package/dist/core-SB441dD5.js +13166 -0
  13. package/dist/{down-DbUDTC9S.js → down-DJH_apvy.js} +267 -270
  14. package/dist/{getChainIds-Dnj79lnq.js → getChainIds-CBclVfs9.js} +178 -180
  15. package/dist/getCosmosAddress-CI7CTn-0.js +57 -0
  16. package/dist/{hamburger-BtEtsv7a.js → hamburger-Dp-PI6Yn.js} +153 -153
  17. package/dist/{index-ZDMBVRLP.js → index-5WTwgH9q.js} +3 -3
  18. package/dist/index-B-FRPlBv.js +3240 -0
  19. package/dist/index-B158Vaz9.js +146 -0
  20. package/dist/{index-ZzUKHS4f.js → index-B9PIELoY.js} +5115 -5260
  21. package/dist/{index-B03PUlPY.js → index-BGt3GtoG.js} +1 -1
  22. package/dist/index-BuGCRLd5.js +198 -0
  23. package/dist/index-CRhXLwtt.js +7445 -0
  24. package/dist/{index-C4AhSjEZ.js → index-Dmf6i8k4.js} +3 -4
  25. package/dist/{index-BQ82b0Bz.js → index-PxQusjX0.js} +3368 -3415
  26. package/dist/index-UFdEurQ_.js +48579 -0
  27. package/dist/{index.es-eZ31W0zo.js → index.es-AaEds8Wm.js} +81 -83
  28. package/dist/index.es-Df0KTgu4.js +13127 -0
  29. package/dist/index.es.js +1 -1
  30. package/dist/{unsupportedProp-9RcsuuVU.js → unsupportedProp-BlS305Lt.js} +1 -1
  31. package/dist/{useRegisterError-lBlc4VLM.js → useRegisterError-BvjIv1Yc.js} +1668 -1701
  32. package/dist/widget.css +1 -1
  33. package/package.json +3 -2
  34. package/dist/EstGas-oDFlpjSW.js +0 -20281
  35. package/dist/InputComp-Dvng88xF.js +0 -105
  36. package/dist/LoadRoute-Cd75OEeT.js +0 -125
  37. package/dist/QuotesProgress-DLkS2eIB.js +0 -28
  38. package/dist/TxnButton-B1GkXFSh.js +0 -223
  39. package/dist/add-Dy-pn86L.js +0 -19
  40. package/dist/all-wallets-DA1Z5Cop.js +0 -10
  41. package/dist/app-store-x_6nCb7H.js +0 -21
  42. package/dist/apple-9Ay4GKtb.js +0 -22
  43. package/dist/arrow-bottom-18IDuPdg.js +0 -12
  44. package/dist/arrow-bottom-circle-C-WRrwmS.js +0 -15
  45. package/dist/arrow-left-DWFV43Cf.js +0 -12
  46. package/dist/arrow-right-CDRqwfO1.js +0 -12
  47. package/dist/arrow-top-DpR9F1Zo.js +0 -12
  48. package/dist/bank-Crxq2thP.js +0 -18
  49. package/dist/basic-PUh1GfJc.js +0 -5783
  50. package/dist/browser-Dfq6PNhC.js +0 -18
  51. package/dist/card-B9qMqocN.js +0 -18
  52. package/dist/ccip-Cf2jO5BW.js +0 -228
  53. package/dist/checkmark-BpwBRy8u.js +0 -15
  54. package/dist/checkmark-bold-CWJMusMr.js +0 -12
  55. package/dist/chevron-bottom-CEM1QdIG.js +0 -12
  56. package/dist/chevron-left-8vrWG4Fd.js +0 -12
  57. package/dist/chevron-right-DUaL3bYu.js +0 -12
  58. package/dist/chevron-top-4yRnski9.js +0 -12
  59. package/dist/chrome-store-BrR0Mo1P.js +0 -65
  60. package/dist/clock-CtzcJX1M.js +0 -12
  61. package/dist/close-B8P3E47p.js +0 -12
  62. package/dist/coinPlaceholder-DhDuAiLE.js +0 -12
  63. package/dist/compass-BPPWXJ9J.js +0 -12
  64. package/dist/copy-CoDhu1Ub.js +0 -19
  65. package/dist/core-sNzLDgNd.js +0 -14967
  66. package/dist/cursor-CtGaAByR.js +0 -7
  67. package/dist/cursor-transparent-DzDZGaUH.js +0 -16
  68. package/dist/desktop-Cj6KJIR5.js +0 -13
  69. package/dist/disconnect-0YabDe1z.js +0 -12
  70. package/dist/discord-BliaK0NG.js +0 -21
  71. package/dist/etherscan-Bu-d0d8T.js +0 -10
  72. package/dist/exclamation-triangle-CkhIEkFa.js +0 -8
  73. package/dist/extension-2PmFOLpz.js +0 -12
  74. package/dist/external-link-D5PBXR8n.js +0 -12
  75. package/dist/facebook-DvVHhnfi.js +0 -30
  76. package/dist/farcaster-DhlI9PJI.js +0 -16
  77. package/dist/filters-D4VXGXuc.js +0 -12
  78. package/dist/getCosmosAddress-D5-u0UJp.js +0 -9566
  79. package/dist/github-DZzzrfMb.js +0 -22
  80. package/dist/google-BJIEVX0w.js +0 -22
  81. package/dist/help-circle-BZN3LxgA.js +0 -16
  82. package/dist/id-qpbgew6W.js +0 -16
  83. package/dist/image-BaqsaTku.js +0 -8
  84. package/dist/index-Bk1RmZa6.js +0 -992
  85. package/dist/index-Bp8U0z_r.js +0 -206
  86. package/dist/index-DIhlHD0K.js +0 -1491
  87. package/dist/index-DKVwgDNZ.js +0 -29422
  88. package/dist/index-DTish3yr.js +0 -1014
  89. package/dist/index-bGQWpwjq.js +0 -3190
  90. package/dist/index-xuyPmNnz.js +0 -160
  91. package/dist/index.es-CvlSpQGV.js +0 -11678
  92. package/dist/info-CT1yToBP.js +0 -7
  93. package/dist/info-circle-CMum6ujM.js +0 -16
  94. package/dist/lightbulb-e5tzYo3T.js +0 -7
  95. package/dist/mail-Cotk1RnP.js +0 -12
  96. package/dist/mobile-BQMdX8sa.js +0 -13
  97. package/dist/more-B7uYy_Eq.js +0 -15
  98. package/dist/network-placeholder-CIPNNK4H.js +0 -18
  99. package/dist/nftPlaceholder-D2GoBPY-.js +0 -12
  100. package/dist/off-BK14JFh_.js +0 -12
  101. package/dist/play-store-DwBENt3_.js +0 -36
  102. package/dist/plus-C0y88Ad4.js +0 -17
  103. package/dist/qr-code-CMdrrElE.js +0 -10
  104. package/dist/recycle-horizontal-BNN5ndLG.js +0 -13
  105. package/dist/refresh-ByH9t7MU.js +0 -12
  106. package/dist/reown-logo-cDM3ybDW.js +0 -16
  107. package/dist/search-vSwnIemK.js +0 -12
  108. package/dist/send-DxaTA9HH.js +0 -19
  109. package/dist/swapHorizontal-C3T9QpOz.js +0 -12
  110. package/dist/swapHorizontalBold-NoD7qi56.js +0 -12
  111. package/dist/swapHorizontalMedium-BdCnGCU3.js +0 -20
  112. package/dist/swapHorizontalRoundedBold-DOvYr1PV.js +0 -12
  113. package/dist/swapVertical-B_QsPb4Z.js +0 -12
  114. package/dist/telegram-Cgehpwsc.js +0 -20
  115. package/dist/three-dots-XdbxmzC6.js +0 -9
  116. package/dist/twitch-BGHF2xBF.js +0 -22
  117. package/dist/twitterIcon-DRtvBUSa.js +0 -10
  118. package/dist/verify-Cha1vhGY.js +0 -12
  119. package/dist/verify-filled-CpQ_9swy.js +0 -12
  120. package/dist/w3m-modal-BbwlJ8yr.js +0 -1471
  121. package/dist/wallet-DhTEGAG5.js +0 -12
  122. package/dist/wallet-placeholder-CBEwQiaT.js +0 -18
  123. package/dist/walletconnect-MNB_N68_.js +0 -36
  124. package/dist/warning-circle-CyvNTyr_.js +0 -16
  125. package/dist/x-CLNpY2cT.js +0 -16
@@ -0,0 +1,57 @@
1
+ import { useState as f, useEffect as m } from "react";
2
+ import { useQuery as E } from "@tanstack/react-query";
3
+ import { c as F, u as M } from "./useRegisterError-BvjIv1Yc.js";
4
+ import { u as c, g as R, b as g } from "./index-UFdEurQ_.js";
5
+ function W({ enabled: o, dependency: a, payload: d }) {
6
+ async function l(e, t, n, y, A, q, I, C, D) {
7
+ return await R({
8
+ recipient: C,
9
+ fromChainId: t.chainId,
10
+ toChainId: n.chainId,
11
+ fromAssetAddress: y.address,
12
+ toAssetAddress: A.address,
13
+ inputAmountDisplay: q,
14
+ slippage: I,
15
+ userWalletAddress: e,
16
+ ...D
17
+ });
18
+ }
19
+ const [h, s] = f(""), [p, i] = f({});
20
+ c((e) => e.userId), F(), M({});
21
+ const u = c((e) => e.selectedProvider);
22
+ c((e) => e.fromChain);
23
+ const r = E({
24
+ queryKey: a,
25
+ queryFn: async () => await l(...d),
26
+ refetchOnWindowFocus: !1,
27
+ refetchOnMount: !1,
28
+ retryOnMount: !1,
29
+ enabled: o
30
+ });
31
+ return m(() => {
32
+ if (r.data && !r.isFetching && !r.isLoading) {
33
+ let e = r.data;
34
+ if (e.status == "error" ? s({ error: e.message || e.error }) : s({ error: "" }), u.length) {
35
+ let t = e?.data?.quotes?.find((n) => n.provider == u);
36
+ i(t || e?.data?.quotes?.[0] || {});
37
+ } else
38
+ i(e?.data?.quotes?.[0] || {});
39
+ } else
40
+ s({ error: "" });
41
+ }, [r.data, r.isSuccess, r.isFetching, r.isLoading, u]), m(() => {
42
+ if (r.error) {
43
+ let e = r.error, t = e.details || e.message || e || "";
44
+ s({ error: t });
45
+ }
46
+ }, [r.error]), { routes: r, errorMessage: h, routesData: p, setRoutesData: i, setErrorMessage: s };
47
+ }
48
+ function b(o, a) {
49
+ if (o) {
50
+ let d = g.fromBech32(o);
51
+ return g.toBech32(a, d.data);
52
+ }
53
+ }
54
+ export {
55
+ b as g,
56
+ W as u
57
+ };