@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.
- package/dist/{AllRoutes-CZLcXz0H.js → AllRoutes-DIde2MHr.js} +910 -929
- package/dist/{Box-DeJ0aAds.js → Box-DQB1ZyEK.js} +16 -16
- package/dist/EstGas-C7sLxEX_.js +1523 -0
- package/dist/{Grow-CAO6QGlH.js → Grow-CxaAxl6-.js} +300 -303
- package/dist/InputComp-CDuJJKaD.js +105 -0
- package/dist/LoadRoute-CVas28CM.js +123 -0
- package/dist/QuotesProgress-DaL4L4Db.js +27 -0
- package/dist/{SwapAsset-CkPNtJ5Z.js → SwapAsset-DSV6l90O.js} +13 -14
- package/dist/{Tooltip-Du4SfKmq.js → Tooltip-PAQ9gquY.js} +35 -35
- package/dist/TxnButton-BiO4vJ-y.js +207 -0
- package/dist/ccip-B6-4PQvj.js +226 -0
- package/dist/core-SB441dD5.js +13166 -0
- package/dist/{down-DbUDTC9S.js → down-DJH_apvy.js} +267 -270
- package/dist/{getChainIds-Dnj79lnq.js → getChainIds-CBclVfs9.js} +178 -180
- package/dist/getCosmosAddress-CI7CTn-0.js +57 -0
- package/dist/{hamburger-BtEtsv7a.js → hamburger-Dp-PI6Yn.js} +153 -153
- package/dist/{index-ZDMBVRLP.js → index-5WTwgH9q.js} +3 -3
- package/dist/index-B-FRPlBv.js +3240 -0
- package/dist/index-B158Vaz9.js +146 -0
- package/dist/{index-ZzUKHS4f.js → index-B9PIELoY.js} +5115 -5260
- package/dist/{index-B03PUlPY.js → index-BGt3GtoG.js} +1 -1
- package/dist/index-BuGCRLd5.js +198 -0
- package/dist/index-CRhXLwtt.js +7445 -0
- package/dist/{index-C4AhSjEZ.js → index-Dmf6i8k4.js} +3 -4
- package/dist/{index-BQ82b0Bz.js → index-PxQusjX0.js} +3368 -3415
- package/dist/index-UFdEurQ_.js +48579 -0
- package/dist/{index.es-eZ31W0zo.js → index.es-AaEds8Wm.js} +81 -83
- package/dist/index.es-Df0KTgu4.js +13127 -0
- package/dist/index.es.js +1 -1
- package/dist/{unsupportedProp-9RcsuuVU.js → unsupportedProp-BlS305Lt.js} +1 -1
- package/dist/{useRegisterError-lBlc4VLM.js → useRegisterError-BvjIv1Yc.js} +1668 -1701
- package/dist/widget.css +1 -1
- package/package.json +3 -2
- package/dist/EstGas-oDFlpjSW.js +0 -20281
- package/dist/InputComp-Dvng88xF.js +0 -105
- package/dist/LoadRoute-Cd75OEeT.js +0 -125
- package/dist/QuotesProgress-DLkS2eIB.js +0 -28
- package/dist/TxnButton-B1GkXFSh.js +0 -223
- package/dist/add-Dy-pn86L.js +0 -19
- package/dist/all-wallets-DA1Z5Cop.js +0 -10
- package/dist/app-store-x_6nCb7H.js +0 -21
- package/dist/apple-9Ay4GKtb.js +0 -22
- package/dist/arrow-bottom-18IDuPdg.js +0 -12
- package/dist/arrow-bottom-circle-C-WRrwmS.js +0 -15
- package/dist/arrow-left-DWFV43Cf.js +0 -12
- package/dist/arrow-right-CDRqwfO1.js +0 -12
- package/dist/arrow-top-DpR9F1Zo.js +0 -12
- package/dist/bank-Crxq2thP.js +0 -18
- package/dist/basic-PUh1GfJc.js +0 -5783
- package/dist/browser-Dfq6PNhC.js +0 -18
- package/dist/card-B9qMqocN.js +0 -18
- package/dist/ccip-Cf2jO5BW.js +0 -228
- package/dist/checkmark-BpwBRy8u.js +0 -15
- package/dist/checkmark-bold-CWJMusMr.js +0 -12
- package/dist/chevron-bottom-CEM1QdIG.js +0 -12
- package/dist/chevron-left-8vrWG4Fd.js +0 -12
- package/dist/chevron-right-DUaL3bYu.js +0 -12
- package/dist/chevron-top-4yRnski9.js +0 -12
- package/dist/chrome-store-BrR0Mo1P.js +0 -65
- package/dist/clock-CtzcJX1M.js +0 -12
- package/dist/close-B8P3E47p.js +0 -12
- package/dist/coinPlaceholder-DhDuAiLE.js +0 -12
- package/dist/compass-BPPWXJ9J.js +0 -12
- package/dist/copy-CoDhu1Ub.js +0 -19
- package/dist/core-sNzLDgNd.js +0 -14967
- package/dist/cursor-CtGaAByR.js +0 -7
- package/dist/cursor-transparent-DzDZGaUH.js +0 -16
- package/dist/desktop-Cj6KJIR5.js +0 -13
- package/dist/disconnect-0YabDe1z.js +0 -12
- package/dist/discord-BliaK0NG.js +0 -21
- package/dist/etherscan-Bu-d0d8T.js +0 -10
- package/dist/exclamation-triangle-CkhIEkFa.js +0 -8
- package/dist/extension-2PmFOLpz.js +0 -12
- package/dist/external-link-D5PBXR8n.js +0 -12
- package/dist/facebook-DvVHhnfi.js +0 -30
- package/dist/farcaster-DhlI9PJI.js +0 -16
- package/dist/filters-D4VXGXuc.js +0 -12
- package/dist/getCosmosAddress-D5-u0UJp.js +0 -9566
- package/dist/github-DZzzrfMb.js +0 -22
- package/dist/google-BJIEVX0w.js +0 -22
- package/dist/help-circle-BZN3LxgA.js +0 -16
- package/dist/id-qpbgew6W.js +0 -16
- package/dist/image-BaqsaTku.js +0 -8
- package/dist/index-Bk1RmZa6.js +0 -992
- package/dist/index-Bp8U0z_r.js +0 -206
- package/dist/index-DIhlHD0K.js +0 -1491
- package/dist/index-DKVwgDNZ.js +0 -29422
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/index-bGQWpwjq.js +0 -3190
- package/dist/index-xuyPmNnz.js +0 -160
- package/dist/index.es-CvlSpQGV.js +0 -11678
- package/dist/info-CT1yToBP.js +0 -7
- package/dist/info-circle-CMum6ujM.js +0 -16
- package/dist/lightbulb-e5tzYo3T.js +0 -7
- package/dist/mail-Cotk1RnP.js +0 -12
- package/dist/mobile-BQMdX8sa.js +0 -13
- package/dist/more-B7uYy_Eq.js +0 -15
- package/dist/network-placeholder-CIPNNK4H.js +0 -18
- package/dist/nftPlaceholder-D2GoBPY-.js +0 -12
- package/dist/off-BK14JFh_.js +0 -12
- package/dist/play-store-DwBENt3_.js +0 -36
- package/dist/plus-C0y88Ad4.js +0 -17
- package/dist/qr-code-CMdrrElE.js +0 -10
- package/dist/recycle-horizontal-BNN5ndLG.js +0 -13
- package/dist/refresh-ByH9t7MU.js +0 -12
- package/dist/reown-logo-cDM3ybDW.js +0 -16
- package/dist/search-vSwnIemK.js +0 -12
- package/dist/send-DxaTA9HH.js +0 -19
- package/dist/swapHorizontal-C3T9QpOz.js +0 -12
- package/dist/swapHorizontalBold-NoD7qi56.js +0 -12
- package/dist/swapHorizontalMedium-BdCnGCU3.js +0 -20
- package/dist/swapHorizontalRoundedBold-DOvYr1PV.js +0 -12
- package/dist/swapVertical-B_QsPb4Z.js +0 -12
- package/dist/telegram-Cgehpwsc.js +0 -20
- package/dist/three-dots-XdbxmzC6.js +0 -9
- package/dist/twitch-BGHF2xBF.js +0 -22
- package/dist/twitterIcon-DRtvBUSa.js +0 -10
- package/dist/verify-Cha1vhGY.js +0 -12
- package/dist/verify-filled-CpQ_9swy.js +0 -12
- package/dist/w3m-modal-BbwlJ8yr.js +0 -1471
- package/dist/wallet-DhTEGAG5.js +0 -12
- package/dist/wallet-placeholder-CBEwQiaT.js +0 -18
- package/dist/walletconnect-MNB_N68_.js +0 -36
- package/dist/warning-circle-CyvNTyr_.js +0 -16
- 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
|
+
};
|