@blockend/widget 1.0.49-beta.5 → 1.0.51
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-LD5p98zn.js → AllRoutes-CV0ZvXKH.js} +9 -9
- package/dist/{Box-Cs3JEIFG.js → Box-Cb39MKJA.js} +9 -9
- package/dist/EstGas-DScDuqvp.js +14426 -0
- package/dist/{Grow-BvHTdetx.js → Grow-CyOgpnIU.js} +2 -2
- package/dist/{InputComp-COwG8q-J.js → InputComp-B5PYzgiO.js} +3 -3
- package/dist/{LoadRoute-DsdVO6Oo.js → LoadRoute-DVPHaKWi.js} +4 -4
- package/dist/{QuotesProgress-B8bDI4r6.js → QuotesProgress-ClcaHGJM.js} +1 -1
- package/dist/{SwapAsset-Ddh66LWB.js → SwapAsset-Blw4SFxU.js} +1 -1
- package/dist/{Tooltip-hBxzXSU3.js → Tooltip-C0P7i2vF.js} +15 -15
- package/dist/TxnButton-CHHh05qr.js +223 -0
- package/dist/{add-DGq3NqFo.js → add-B1LcVGSW.js} +1 -1
- package/dist/{all-wallets-CzWn7-6X.js → all-wallets-BeJrQ3-B.js} +1 -1
- package/dist/{app-store-BGFzY2oe.js → app-store-CaDVWZZh.js} +1 -1
- package/dist/{apple-D5zFxCbx.js → apple-CkGFfDmj.js} +1 -1
- package/dist/{arrow-bottom-circle-CskusJTk.js → arrow-bottom-circle-KdHp0Ttj.js} +1 -1
- package/dist/{arrow-bottom-D25Ef730.js → arrow-bottom-riUHz5wW.js} +1 -1
- package/dist/{arrow-left-Bn-AuY99.js → arrow-left-4uZ_FCKk.js} +1 -1
- package/dist/{arrow-right-DJQCv_ak.js → arrow-right-CQx64HKf.js} +1 -1
- package/dist/{arrow-top-Do8qEhLT.js → arrow-top-DCNA0fLu.js} +1 -1
- package/dist/{bank-CBeLsi0M.js → bank-BnOJ4hFp.js} +1 -1
- package/dist/{basic-DLf5LiFg.js → basic-BwxnVi-O.js} +3 -3
- package/dist/{browser-DVamy-m2.js → browser-B5n8jjez.js} +1 -1
- package/dist/{card-tFF7X_nt.js → card-CyQg9FUR.js} +1 -1
- package/dist/{ccip-C4idlAuS.js → ccip-BJVsdO9f.js} +14 -14
- package/dist/{checkmark-DkVW1LY2.js → checkmark-TXxWxJ06.js} +1 -1
- package/dist/{checkmark-bold-BbQos6bO.js → checkmark-bold-D0241gVT.js} +1 -1
- package/dist/{chevron-bottom-DokKka1d.js → chevron-bottom-BUgj0Jms.js} +1 -1
- package/dist/{chevron-left-BPwuTnF_.js → chevron-left-CMc-uR1E.js} +1 -1
- package/dist/{chevron-right-Djdm9Vly.js → chevron-right-DgxFd0Bj.js} +1 -1
- package/dist/{chevron-top-DviiO5xj.js → chevron-top-DiIar6gP.js} +1 -1
- package/dist/{chrome-store-BFukaYHs.js → chrome-store-B8MGsjNr.js} +1 -1
- package/dist/{clock-gPhvJPEh.js → clock-Cyg_My5N.js} +1 -1
- package/dist/{close-CWK6JCCg.js → close-RY0sGjCf.js} +1 -1
- package/dist/{coinPlaceholder-DuZ2QujM.js → coinPlaceholder-DE_qwsbW.js} +1 -1
- package/dist/{compass-DlrcJ8Hk.js → compass-CEHhCP6E.js} +1 -1
- package/dist/{copy-CNAncK5I.js → copy-FM62Yyrj.js} +1 -1
- package/dist/{core-BkrnmkI7.js → core-BhR-bSA_.js} +16 -17
- package/dist/{cursor-BknQSZIa.js → cursor-DladmQh5.js} +1 -1
- package/dist/{cursor-transparent-D7K-weum.js → cursor-transparent-D0WNWO9Y.js} +1 -1
- package/dist/{desktop-Dvki1QtU.js → desktop-B6eJupyA.js} +1 -1
- package/dist/{disconnect-QbJ6g-Q9.js → disconnect-VPpMScfC.js} +1 -1
- package/dist/{discord-BtkOmfcK.js → discord-wBtYxM-t.js} +1 -1
- package/dist/{down-DRC2u-nt.js → down-Owe76_31.js} +2 -2
- package/dist/{etherscan-C4RKkVrP.js → etherscan-9nLZ-l75.js} +1 -1
- package/dist/{exclamation-triangle-CEoAdk7x.js → exclamation-triangle-BWl_FP8O.js} +1 -1
- package/dist/{extension-DkOomXUg.js → extension-BzBM3WFk.js} +1 -1
- package/dist/{external-link-D9HfOXel.js → external-link-Dyl12aJV.js} +1 -1
- package/dist/{facebook-zQmBHowA.js → facebook-CBkAbn5g.js} +1 -1
- package/dist/{farcaster-Cfy-sjqY.js → farcaster-BRpuoVay.js} +1 -1
- package/dist/{filters-Cq1K6QWb.js → filters-B7NeWYDv.js} +1 -1
- package/dist/{getChainIds-Btq6EjyX.js → getChainIds-3ucdX-1p.js} +2 -2
- package/dist/getCosmosAddress-COhqxzQU.js +8398 -0
- package/dist/{github-gNR-tm3O.js → github-BkQ92Psg.js} +1 -1
- package/dist/{google-rmnuGsrL.js → google-D-_oWzT6.js} +1 -1
- package/dist/{hamburger-CEQO6OZs.js → hamburger-BumvcHR4.js} +5 -5
- package/dist/{help-circle-Cj4bjfia.js → help-circle-YBo375ZL.js} +1 -1
- package/dist/{id-nb5m-NKY.js → id-125Dr2Fp.js} +1 -1
- package/dist/{image-BlK2k80L.js → image-KqH_HXHv.js} +1 -1
- package/dist/{index-CZQdiy7b.js → index-1-e5pJ-0.js} +2 -2
- package/dist/{index-salSLcoU.js → index-Bpdql1-8.js} +1 -1
- package/dist/{index-pieshoDv.js → index-CEXnASRZ.js} +466 -451
- package/dist/{index-7R8NiD42.js → index-CkwDOdMt.js} +1 -1
- package/dist/{index-D5aVEHZL.js → index-DJxdLFXV.js} +51 -51
- package/dist/index-DRUdCBxf.js +3189 -0
- package/dist/{index-7iRnvPpN.js → index-Drhw6mFH.js} +8 -7
- package/dist/{index-D0tb6mUR.js → index-DvuINyOl.js} +11 -11
- package/dist/{index-CbycATvf.js → index-O7aWWjZs.js} +78 -78
- package/dist/index-aoGlnTj5.js +70013 -0
- package/dist/{index-1OzJ9Z6-.js → index-uIBPDdlb.js} +10 -10
- package/dist/{index.es-CJ-ZznBF.js → index.es-C5JaVECC.js} +3032 -3244
- package/dist/{index.es-Ce_QYzsk.js → index.es-Dg8PGfqY.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-6RBhKgcd.js → info-D7JbYWOR.js} +1 -1
- package/dist/{info-circle-BlIbWe25.js → info-circle-wQJP08na.js} +1 -1
- package/dist/{lightbulb-CS3_wKY8.js → lightbulb-DvxJHkNC.js} +1 -1
- package/dist/{mail-CRsD8jAA.js → mail-BdTr8Qhk.js} +1 -1
- package/dist/{mobile-DMLTKouh.js → mobile-BYMl9NU4.js} +1 -1
- package/dist/{more-uoTJ3kvy.js → more-_GkH6PVz.js} +1 -1
- package/dist/{network-placeholder-D-XL3hqx.js → network-placeholder-RkFane_-.js} +1 -1
- package/dist/{nftPlaceholder-CiYWPSAY.js → nftPlaceholder-brLois7k.js} +1 -1
- package/dist/{off-B79emGaW.js → off-BvoRAKQk.js} +1 -1
- package/dist/{play-store-B828L964.js → play-store-PAYBmMKL.js} +1 -1
- package/dist/{plus-BRVCC9lV.js → plus-C7ndQrVG.js} +1 -1
- package/dist/{qr-code-qp9DeEO9.js → qr-code-BzVDMXG9.js} +1 -1
- package/dist/{recycle-horizontal-DoDvFScD.js → recycle-horizontal-CcSjuPBD.js} +1 -1
- package/dist/{refresh-BuegBzBd.js → refresh-EnEB4S0q.js} +1 -1
- package/dist/{reown-logo-BrUAyTxC.js → reown-logo-D-m3ZlCn.js} +1 -1
- package/dist/{search-CzpyG7ky.js → search-rK2TO8oW.js} +1 -1
- package/dist/{send-BHMxC1xj.js → send-ewC_Dr5a.js} +1 -1
- package/dist/{swapHorizontal-Bq8mR1QZ.js → swapHorizontal-D4_CLnQ1.js} +1 -1
- package/dist/{swapHorizontalBold-2ueiC4L9.js → swapHorizontalBold-BxJSvW__.js} +1 -1
- package/dist/{swapHorizontalMedium-9jh3zunE.js → swapHorizontalMedium-BC6YI70K.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-BIk7kp2S.js → swapHorizontalRoundedBold-BvJ7MjAm.js} +1 -1
- package/dist/{swapVertical-DM_T3EzD.js → swapVertical-uQyY1dbd.js} +1 -1
- package/dist/{telegram-CbeDajqU.js → telegram-Dzfv7CZN.js} +1 -1
- package/dist/{three-dots-DUntIedp.js → three-dots-O3uLZLkz.js} +1 -1
- package/dist/{twitch-DIXNVK7h.js → twitch-CUtrbmL-.js} +1 -1
- package/dist/{twitterIcon-nHRKKmzg.js → twitterIcon-DZMQ8Bmn.js} +1 -1
- package/dist/{unsupportedProp-BAk0ueJt.js → unsupportedProp-Dh57ZITi.js} +1 -1
- package/dist/useRegisterError-Bp8xpLyh.js +8912 -0
- package/dist/{verify-CbyVHS7l.js → verify-1kJPzvCP.js} +1 -1
- package/dist/{verify-filled-QZDBE0oP.js → verify-filled-D6xGY8A5.js} +1 -1
- package/dist/{w3m-modal-Bp3nI0EC.js → w3m-modal-slf0WTO2.js} +2 -2
- package/dist/{wallet-DVjsV39Q.js → wallet-CI9ZKXI5.js} +1 -1
- package/dist/{wallet-placeholder-BgrGGLNk.js → wallet-placeholder-DHsdhsL5.js} +1 -1
- package/dist/{walletconnect-zriuFVFg.js → walletconnect-YEeO3478.js} +1 -1
- package/dist/{warning-circle-CpWwL8_f.js → warning-circle-CnXCXT-G.js} +1 -1
- package/dist/{x-DN0-dY3F.js → x-ChzZn6EY.js} +1 -1
- package/package.json +5 -2
- package/dist/EstGas-H-UdwS1f.js +0 -12659
- package/dist/TxnButton-jGgemD8y.js +0 -205
- package/dist/getCosmosAddress-Bu-V7Ot0.js +0 -9565
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/index-Fv4UV6Sc.js +0 -30707
- package/dist/index-vM1noC-w.js +0 -3136
- package/dist/useRegisterError-tq4Tke9I.js +0 -8812
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as D from "react";
|
2
2
|
import kt from "react";
|
3
|
-
import { p as J, P as i,
|
3
|
+
import { p as J, P as i, aU as St, n as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-aoGlnTj5.js";
|
4
4
|
import { jsx as de } from "react/jsx-runtime";
|
5
|
-
import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-
|
5
|
+
import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-Bp8xpLyh.js";
|
6
6
|
let nt = 0;
|
7
7
|
function Jt(e) {
|
8
8
|
const [t, r] = D.useState(e), n = e || t;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as b, jsx as t, Fragment as k } from "react/jsx-runtime";
|
2
|
-
import { u as n, S as W } from "./index-
|
2
|
+
import { u as n, S as W } from "./index-aoGlnTj5.js";
|
3
3
|
import { useState as S, useRef as x } from "react";
|
4
|
-
import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-
|
4
|
+
import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-Bp8xpLyh.js";
|
5
5
|
import { useAccount as T, useBalance as A } from "wagmi";
|
6
6
|
import "@dynamic-labs/sdk-react-core";
|
7
|
-
import { c as B, r as G } from "./index-
|
7
|
+
import { c as B, r as G } from "./index-CEXnASRZ.js";
|
8
8
|
function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBalanceLoading: f }) {
|
9
9
|
var d, o;
|
10
10
|
const s = n((a) => a.configuration), e = n((a) => a.fromCoin), r = n((a) => a.fromChain), { isAnyWalletConnected: g } = j({ chainData: r }), [$, z] = S(40), { address: N } = T(), v = x(), { defaultCoin: y } = I;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsx as e, jsxs as t, Fragment as m } from "react/jsx-runtime";
|
2
2
|
import { t as te } from "./truncate-D9t92mVX.js";
|
3
|
-
import { u as r, S as o, l as we } from "./index-
|
3
|
+
import { u as r, S as o, l as we } from "./index-aoGlnTj5.js";
|
4
4
|
import { useState as ie, useEffect as le } from "react";
|
5
5
|
import { s as a } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
6
|
import { G as ce, C as de, S as me } from "./clockIcon-C2W5xvyt.js";
|
7
|
-
import { S as re } from "./down-
|
7
|
+
import { S as re } from "./down-Owe76_31.js";
|
8
8
|
import { e as se } from "./ethertousd-CC_ezooz.js";
|
9
|
-
import { O as H } from "./index-
|
10
|
-
import { F as J, i as ae } from "./useRegisterError-
|
9
|
+
import { O as H } from "./index-CkwDOdMt.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-Bp8xpLyh.js";
|
11
11
|
function oe({ fill: n }) {
|
12
12
|
return /* @__PURE__ */ e(
|
13
13
|
"svg",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as o, jsx as a, Fragment as m } from "react/jsx-runtime";
|
2
2
|
import { s as l } from "./WidgetForm.module-QHJ0-m5f.js";
|
3
|
-
import { u as g } from "./index-
|
3
|
+
import { u as g } from "./index-aoGlnTj5.js";
|
4
4
|
function y({ routesData: x, routes: e, quoteTimer: n, amount: c }) {
|
5
5
|
var s, b, d, w;
|
6
6
|
const r = g((i) => i.configuration), t = g((i) => i.gradient);
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-
|
1
|
+
import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-aoGlnTj5.js";
|
2
2
|
import * as p from "react";
|
3
|
-
import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-
|
3
|
+
import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-CyOgpnIU.js";
|
4
4
|
import { jsx as j, jsxs as Se } from "react/jsx-runtime";
|
5
|
-
import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo,
|
5
|
+
import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, E as A, G as _o, w as No } from "./useRegisterError-Bp8xpLyh.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -194,10 +194,10 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
194
194
|
children: U,
|
195
195
|
components: O = {},
|
196
196
|
componentsProps: h = {},
|
197
|
-
describeChild:
|
198
|
-
disableFocusListener:
|
197
|
+
describeChild: Ge = !1,
|
198
|
+
disableFocusListener: Ye = !1,
|
199
199
|
disableHoverListener: he = !1,
|
200
|
-
disableInteractive:
|
200
|
+
disableInteractive: qe = !1,
|
201
201
|
disableTouchListener: Ke = !1,
|
202
202
|
enterDelay: be = 100,
|
203
203
|
enterNextDelay: ge = 0,
|
@@ -219,7 +219,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
219
219
|
TransitionProps: eo
|
220
220
|
} = S, Re = vo(S, $o), c = /* @__PURE__ */ p.isValidElement(U) ? U : /* @__PURE__ */ j("span", {
|
221
221
|
children: U
|
222
|
-
}), Ce = xo(), oo = wo(), [l, xe] = p.useState(), [z, to] = p.useState(null), M = p.useRef(!1), H =
|
222
|
+
}), Ce = xo(), oo = wo(), [l, xe] = p.useState(), [z, to] = p.useState(null), M = p.useRef(!1), H = qe || W, Oe = I(), G = I(), _ = I(), Ee = I(), [ro, Me] = Ro({
|
223
223
|
controlled: Pe,
|
224
224
|
default: !1,
|
225
225
|
name: "Tooltip",
|
@@ -234,7 +234,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
234
234
|
l && l.disabled && !o && m !== "" && l.tagName.toLowerCase();
|
235
235
|
}, [m, l, o]);
|
236
236
|
}
|
237
|
-
const
|
237
|
+
const Y = Co(Je), T = p.useRef(), N = Ue(() => {
|
238
238
|
T.current !== void 0 && (document.body.style.WebkitUserSelect = T.current, T.current = void 0), Ee.clear();
|
239
239
|
});
|
240
240
|
p.useEffect(() => N, [N]);
|
@@ -252,11 +252,11 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
252
252
|
});
|
253
253
|
}
|
254
254
|
), $ = (o) => {
|
255
|
-
M.current && o.type !== "touchstart" || (l && l.removeAttribute("title"),
|
255
|
+
M.current && o.type !== "touchstart" || (l && l.removeAttribute("title"), G.clear(), _.clear(), be || F && ge ? G.start(F ? ge : be, () => {
|
256
256
|
_e(o);
|
257
257
|
}) : _e(o));
|
258
|
-
},
|
259
|
-
|
258
|
+
}, q = (o) => {
|
259
|
+
G.clear(), _.start(Te, () => {
|
260
260
|
L(o);
|
261
261
|
});
|
262
262
|
}, {
|
@@ -265,7 +265,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
265
265
|
onFocus: so,
|
266
266
|
ref: po
|
267
267
|
} = Oo(), [, Le] = p.useState(!1), $e = (o) => {
|
268
|
-
no(o), Ne.current === !1 && (Le(!1),
|
268
|
+
no(o), Ne.current === !1 && (Le(!1), q(o));
|
269
269
|
}, De = (o) => {
|
270
270
|
l || xe(o.currentTarget), so(o), Ne.current === !0 && (Le(!0), $(o));
|
271
271
|
}, je = (o) => {
|
@@ -300,7 +300,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
300
300
|
y: o.clientY
|
301
301
|
}, K.current && K.current.update();
|
302
302
|
}, y = {}, X = typeof m == "string";
|
303
|
-
|
303
|
+
Ge ? (y.title = !u && X && !he ? m : null, y["aria-describedby"] = u ? Y : null) : (y["aria-label"] = X ? m : null, y["aria-labelledby"] = u && !X ? Y : null);
|
304
304
|
const a = n({}, y, Re, c.props, {
|
305
305
|
className: D(Re.className, c.props.className),
|
306
306
|
onTouchStart: je,
|
@@ -312,7 +312,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
312
312
|
l && l.getAttribute("data-mui-internal-clone-element");
|
313
313
|
}, [l]));
|
314
314
|
const v = {};
|
315
|
-
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(
|
315
|
+
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(q, a.onMouseLeave), H || (v.onMouseOver = $, v.onMouseLeave = q)), Ye || (a.onFocus = k(De, a.onFocus), a.onBlur = k($e, a.onBlur), H || (v.onFocus = De, v.onBlur = $e)), B.env.NODE_ENV !== "production" && c.props.title;
|
316
316
|
const uo = p.useMemo(() => {
|
317
317
|
var o;
|
318
318
|
let i = [{
|
@@ -356,7 +356,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
356
356
|
} : l,
|
357
357
|
popperRef: K,
|
358
358
|
open: l ? u : !1,
|
359
|
-
id:
|
359
|
+
id: Y,
|
360
360
|
transition: !0
|
361
361
|
}, v, mo, {
|
362
362
|
popperOptions: uo,
|
@@ -0,0 +1,223 @@
|
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
2
|
+
import { useState as v, useEffect as z } from "react";
|
3
|
+
import { useDynamicContext as xe, useSwitchNetwork as Me, useIsLoggedIn as Oe } from "@dynamic-labs/sdk-react-core";
|
4
|
+
import { a as _, u as h, aE as Re, aF as pe } from "./index-aoGlnTj5.js";
|
5
|
+
import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
+
import { useAccount as Ve, useConfig as qe, useSwitchChain as Pe, useBalance as _e } from "wagmi";
|
7
|
+
import { u as ge, d as Qe, c as He, C as ye } from "./useRegisterError-Bp8xpLyh.js";
|
8
|
+
import "./getCosmosAddress-COhqxzQU.js";
|
9
|
+
import { v as Je } from "./validError-CDlJpg_f.js";
|
10
|
+
import { u as Ke, g as Ue, p as Xe } from "./index-CEXnASRZ.js";
|
11
|
+
function Ye(n) {
|
12
|
+
const { wallet: u, address: l } = _(), [f, N] = v(0);
|
13
|
+
async function x() {
|
14
|
+
const F = await window.tronWeb.trx.getBalance(l);
|
15
|
+
N(F / Math.pow(10, 6));
|
16
|
+
}
|
17
|
+
return z(() => {
|
18
|
+
l && (n == null ? void 0 : n.networkType) === "tron" && x();
|
19
|
+
}, [l, n == null ? void 0 : n.networkType]), { tronBal: f };
|
20
|
+
}
|
21
|
+
function A(n) {
|
22
|
+
if (n.key.toLowerCase() === "backpacksol")
|
23
|
+
return !0;
|
24
|
+
}
|
25
|
+
function Ze() {
|
26
|
+
const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: f } = xe();
|
27
|
+
async function N() {
|
28
|
+
let x = await f.getBalance();
|
29
|
+
u(Number(x) || 0);
|
30
|
+
}
|
31
|
+
return z(() => {
|
32
|
+
(l.networkType === "btc" || l.networkType === "sui") && N();
|
33
|
+
}, [l.networkType, f]), n;
|
34
|
+
}
|
35
|
+
function ot({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowWallet: N, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: Te, handleSuccess: Q }) {
|
36
|
+
var C, ee, te, se, re, ce, ne, ie, de, ae, le, oe, we;
|
37
|
+
const w = h((s) => s.gradient), m = h((s) => s.configuration), e = h((s) => s.fromChain), i = h((s) => s.fromCoin), r = h((s) => s.toChain), b = h((s) => s.toCoin), { isConnected: j, address: H, chain: I } = Ve(), { address: J, isConnected: We } = _(), me = qe(), Ie = Me(), { getBothWalletConnection: he, getConnectWallet: fe } = ge({
|
38
|
+
chainData: e
|
39
|
+
}), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: Ne } = ge({ chainData: e }), Be = fe(e, r), [O, Ge] = v("101"), { tronBal: R } = Ye(e), { cosmosBalance: X } = Ke(), Y = Ze(), V = ((C = e.chain) == null ? void 0 : C.length) && ((ee = r.chain) == null ? void 0 : ee.length), q = ((te = i.address) == null ? void 0 : te.length) && ((se = b.address) == null ? void 0 : se.length), Se = Qe(), Z = Re(), { switchChain: ke, switchChainAsync: Ee, isPending: $e } = Pe({
|
40
|
+
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
41
|
+
config: me,
|
42
|
+
throwForSwitchChainNotSupported: !0,
|
43
|
+
onError(s) {
|
44
|
+
Je(s.message) && Se({ module: "wallet-error-switch", error: s.message });
|
45
|
+
}
|
46
|
+
}), T = _e({
|
47
|
+
address: H,
|
48
|
+
token: "",
|
49
|
+
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
50
|
+
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
51
|
+
}), W = He(Te || 0, 11), [o, a] = v({
|
52
|
+
text: "",
|
53
|
+
isGradient: !1,
|
54
|
+
color: "bw-bg-border-primary"
|
55
|
+
});
|
56
|
+
async function Fe() {
|
57
|
+
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
|
58
|
+
try {
|
59
|
+
await Ee({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
60
|
+
} catch {
|
61
|
+
}
|
62
|
+
else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
63
|
+
try {
|
64
|
+
let s = await Ie({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
65
|
+
D();
|
66
|
+
} catch {
|
67
|
+
}
|
68
|
+
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(pe.TransactionStarted, {
|
69
|
+
...n
|
70
|
+
}), B && (Q(!1), F())) : (Z.emit(pe.TransactionStarted, {
|
71
|
+
...n
|
72
|
+
}), B && (Q(!1), F()));
|
73
|
+
}
|
74
|
+
const { primaryWallet: p } = xe(), P = Oe(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Ne(e)) == null ? void 0 : re.address) != null && ce.length) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), D = async () => {
|
75
|
+
if (p)
|
76
|
+
try {
|
77
|
+
const s = await p.getNetwork();
|
78
|
+
Ge(s);
|
79
|
+
} catch {
|
80
|
+
}
|
81
|
+
else
|
82
|
+
return;
|
83
|
+
};
|
84
|
+
z(() => {
|
85
|
+
D();
|
86
|
+
}, [p]);
|
87
|
+
function k(s, g) {
|
88
|
+
let y = s / Math.pow(10, g);
|
89
|
+
return y < 1e-6 ? y.toFixed(20) : y;
|
90
|
+
}
|
91
|
+
function Le() {
|
92
|
+
var s;
|
93
|
+
return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
|
94
|
+
}
|
95
|
+
function je(s) {
|
96
|
+
var g;
|
97
|
+
return Number(((g = X[Xe(s.address)]) == null ? void 0 : g.amount) || 0) / Math.pow(10, s.decimals);
|
98
|
+
}
|
99
|
+
function Ae() {
|
100
|
+
var $;
|
101
|
+
let s = {};
|
102
|
+
async function g(t, c) {
|
103
|
+
let E = Object.keys(s);
|
104
|
+
s[t == null ? void 0 : t.chainId] ? (s[t == null ? void 0 : t.chainId].amountInToken += c.amountInToken, s[t == null ? void 0 : t.chainId].gas += k(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
|
105
|
+
amountInToken: c.amountInToken,
|
106
|
+
gas: k(c.amountInToken, t == null ? void 0 : t.decimals),
|
107
|
+
token: t,
|
108
|
+
nativeBal: (d == null ? void 0 : d.length) > 30 && !M && (t == null ? void 0 : t.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (t == null ? void 0 : t.networkType) == "sol" ? L : (t == null ? void 0 : t.networkType) == "tron" ? R : (t == null ? void 0 : t.networkType) == "btc" || (t == null ? void 0 : t.networkType) == "sui" ? Y : (t == null ? void 0 : t.networkType) == "cosmos" ? je(t) : (t == null ? void 0 : t.networkType) == "tron" ? Ue(J) : Le(),
|
109
|
+
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
110
|
+
order: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (t == null ? void 0 : t.chainId) ? 2 : E.length > 2 ? 3 : 2
|
111
|
+
};
|
112
|
+
}
|
113
|
+
($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
|
114
|
+
const { token: c } = t;
|
115
|
+
t.source.toLowerCase() == "from_source_wallet" && g(c, t);
|
116
|
+
});
|
117
|
+
let y = W;
|
118
|
+
if (Number(l) > Number(y))
|
119
|
+
a({
|
120
|
+
text: `Insufficient Balance ${i.coin || ""}`,
|
121
|
+
isGradient: !1,
|
122
|
+
color: "bw-bg-border-primary"
|
123
|
+
});
|
124
|
+
else if ((T != null && T.isLoading || T.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !R && (e == null ? void 0 : e.networkType) === "tron")
|
125
|
+
a({
|
126
|
+
text: "Fetching Balance..",
|
127
|
+
isGradient: !1,
|
128
|
+
color: "bw-bg-border-primary"
|
129
|
+
});
|
130
|
+
else {
|
131
|
+
let t = Object.values(s).sort((c, E) => c.order - E.order);
|
132
|
+
t.some((c) => {
|
133
|
+
var E, be, ue;
|
134
|
+
return c != null && c.isFromChain && Number(l) <= Number(y) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(y) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
|
135
|
+
text: `Insufficient ${((E = c == null ? void 0 : c.token) == null ? void 0 : E.symbol) || ""} for gas on ${c.token.blockchain}`,
|
136
|
+
isGradient: !1,
|
137
|
+
color: "bw-bg-border-primary"
|
138
|
+
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
|
139
|
+
text: `Insufficient ${((ue = c == null ? void 0 : c.token) == null ? void 0 : ue.symbol) || ""} for gas on ${c.token.blockchain}`,
|
140
|
+
isGradient: !1,
|
141
|
+
color: "bw-bg-border-primary"
|
142
|
+
}), !0) : (a({
|
143
|
+
text: "",
|
144
|
+
isGradient: !0,
|
145
|
+
color: w || S.gradientbutton
|
146
|
+
}), !0);
|
147
|
+
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
148
|
+
text: "",
|
149
|
+
isGradient: !0,
|
150
|
+
color: w || S.gradientbutton
|
151
|
+
});
|
152
|
+
}
|
153
|
+
}
|
154
|
+
z(() => {
|
155
|
+
var s, g, y;
|
156
|
+
!i.coin.length || !(b != null && b.coin.length) ? a({
|
157
|
+
text: "Select Token",
|
158
|
+
isGradient: !0,
|
159
|
+
color: w || S.gradientbutton
|
160
|
+
}) : B ? typeof l < "u" && Number(l || 0) <= 0 ? a({
|
161
|
+
text: "Enter Amount",
|
162
|
+
isGradient: !1,
|
163
|
+
color: "bw-bg-border-primary"
|
164
|
+
}) : u.isFetching || !f ? a({
|
165
|
+
text: "Loading Routes...",
|
166
|
+
isGradient: !1,
|
167
|
+
color: "bw-bg-border-primary"
|
168
|
+
}) : e.chainId === "eclipse-svm" && !A(p) ? a({
|
169
|
+
text: `Select ${e.name} wallet`,
|
170
|
+
isGradient: !0,
|
171
|
+
color: w || S.gradientbutton
|
172
|
+
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? a({
|
173
|
+
text: "Enter recipient wallet address",
|
174
|
+
isGradient: !0,
|
175
|
+
color: w || S.gradientbutton
|
176
|
+
}) : (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && H === d && (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) || (e == null ? void 0 : e.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) ? a({
|
177
|
+
text: "From and To asset can not be the same!",
|
178
|
+
isGradient: !1,
|
179
|
+
color: "bw-bg-border-primary"
|
180
|
+
}) : (y = (g = (s = u == null ? void 0 : u.data) == null ? void 0 : s.data) == null ? void 0 : g.quotes) != null && y.length ? u != null && u.error ? a({
|
181
|
+
text: "Failed to fetch Quotes",
|
182
|
+
isGradient: !1,
|
183
|
+
color: "bw-bg-border-primary"
|
184
|
+
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== O && (e == null ? void 0 : e.networkType) === "sol" ? a({
|
185
|
+
text: `Switch Chain to ${e.chain}`,
|
186
|
+
isGradient: !0,
|
187
|
+
color: w || S.gradientbutton
|
188
|
+
}) : Ae() : a({
|
189
|
+
text: "No Routes Found",
|
190
|
+
isGradient: !1,
|
191
|
+
color: "bw-bg-border-primary"
|
192
|
+
}) : a({
|
193
|
+
text: "",
|
194
|
+
isGradient: !0,
|
195
|
+
color: w || S.gradientbutton
|
196
|
+
});
|
197
|
+
}, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, B, u.isFetching, I == null ? void 0 : I.id, f, R, L, d, Y, X, J]);
|
198
|
+
let ve = [`switch chain to ${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, `select ${(de = e.chain) == null ? void 0 : de.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
|
199
|
+
function ze() {
|
200
|
+
var s, g, y, $;
|
201
|
+
return B ? u.isFetching ? !0 : o.text.length ? !ve.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !(($ = (y = (g = u.data) == null ? void 0 : g.data) == null ? void 0 : y.quotes) != null && $.length) : !1;
|
202
|
+
}
|
203
|
+
return /* @__PURE__ */ G(
|
204
|
+
"button",
|
205
|
+
{
|
206
|
+
disabled: ze(),
|
207
|
+
style: o != null && o.isGradient && V && q ? {
|
208
|
+
...m == null ? void 0 : m.gradientStyle,
|
209
|
+
boxShadow: m && m.customTheme && ((le = (ae = m.customTheme) == null ? void 0 : ae.shadow) == null ? void 0 : le.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
210
|
+
} : {
|
211
|
+
boxShadow: m && m.customTheme && ((we = (oe = m.customTheme) == null ? void 0 : oe.shadow) == null ? void 0 : we.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
212
|
+
},
|
213
|
+
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${o != null && o.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${V && q && o.color} ${o.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${o != null && o.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
|
214
|
+
onClick: () => {
|
215
|
+
B || (N(!0), ((e == null ? void 0 : e.networkType) !== "evm" && j || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && K && U) && !M ? x("from") : j && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && K && U || M ? x("to") : x("from")), e.chainId === "eclipse-svm" && !A(p) ? (N(!0), x("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? (N(!0), x("to")) : Fe();
|
216
|
+
},
|
217
|
+
children: /* @__PURE__ */ G("div", { className: "bw-rounded-sm bw-bg-background-container bw-flex bw-items-center bw-justify-center b-w-full bw-h-full", children: /* @__PURE__ */ G("p", { className: "bw-relative bw-z-20", children: V && q ? $e ? /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) : B ? o.text.length ? o.text : "Start Transaction" : `Connect ${Be} Wallet` : /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
218
|
+
}
|
219
|
+
);
|
220
|
+
}
|
221
|
+
export {
|
222
|
+
ot as default
|
223
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-
|
2
|
-
import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-
|
3
|
-
import { n as Wn } from "./index-
|
1
|
+
import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-BhR-bSA_.js";
|
2
|
+
import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-O7aWWjZs.js";
|
3
|
+
import { n as Wn } from "./index-aoGlnTj5.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ah as L, ai as b, aj as F, ak as N, al as P, am as w, an as S, ao as E, ap as $, aq as C, ar as I, as as m, at as D, au as A, av as R, aw as y, ax as O, ay as q, az as G, aA as T, aB as v, aC as k, aD as H } from "./index-aoGlnTj5.js";
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
3
3
|
function x(t) {
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|
@@ -45,8 +45,8 @@ function j(t) {
|
|
45
45
|
})();
|
46
46
|
return w(e.outputs, c);
|
47
47
|
}
|
48
|
-
const
|
49
|
-
async function
|
48
|
+
const B = "x-batch-gateway:true";
|
49
|
+
async function U(t) {
|
50
50
|
const { data: s, ccipRequest: a } = t, { args: [r] } = I({ abi: m, data: s }), e = [], c = [];
|
51
51
|
return await Promise.all(r.map(async (n, o) => {
|
52
52
|
try {
|
@@ -66,16 +66,16 @@ function _(t) {
|
|
66
66
|
errorName: "HttpError",
|
67
67
|
args: [t.status, t.shortMessage]
|
68
68
|
}) : x({
|
69
|
-
abi: [
|
69
|
+
abi: [D],
|
70
70
|
errorName: "Error",
|
71
71
|
args: ["shortMessage" in t ? t.shortMessage : t.message]
|
72
72
|
});
|
73
73
|
}
|
74
74
|
function z(t, s) {
|
75
|
-
if (!
|
76
|
-
throw new
|
77
|
-
if (!
|
78
|
-
throw new
|
75
|
+
if (!A(t, { strict: !1 }))
|
76
|
+
throw new R({ address: t });
|
77
|
+
if (!A(s, { strict: !1 }))
|
78
|
+
throw new R({ address: s });
|
79
79
|
return t.toLowerCase() === s.toLowerCase();
|
80
80
|
}
|
81
81
|
class J extends y {
|
@@ -149,20 +149,20 @@ const Y = "0x556f1830", Q = {
|
|
149
149
|
]
|
150
150
|
};
|
151
151
|
async function Z(t, { blockNumber: s, blockTag: a, data: r, to: e }) {
|
152
|
-
const { args: c } =
|
152
|
+
const { args: c } = G({
|
153
153
|
data: r,
|
154
154
|
abi: [Q]
|
155
155
|
}), [n, o, u, f, d] = c, { ccipRead: i } = t, g = i && typeof (i == null ? void 0 : i.request) == "function" ? i.request : V;
|
156
156
|
try {
|
157
157
|
if (!z(e, n))
|
158
158
|
throw new K({ sender: n, to: e });
|
159
|
-
const l = o.includes(
|
159
|
+
const l = o.includes(B) ? await U({
|
160
160
|
data: u,
|
161
161
|
ccipRequest: g
|
162
|
-
}) : await g({ data: u, sender: n, urls: o }), { data: M } = await
|
162
|
+
}) : await g({ data: u, sender: n, urls: o }), { data: M } = await T(t, {
|
163
163
|
blockNumber: s,
|
164
164
|
blockTag: a,
|
165
|
-
data:
|
165
|
+
data: v([
|
166
166
|
f,
|
167
167
|
w([{ type: "bytes" }, { type: "bytes" }], [l, d])
|
168
168
|
]),
|
@@ -193,7 +193,7 @@ async function V({ data: t, sender: s, urls: a }) {
|
|
193
193
|
});
|
194
194
|
let i;
|
195
195
|
if ((e = d.headers.get("Content-Type")) != null && e.startsWith("application/json") ? i = (await d.json()).data : i = await d.text(), !d.ok) {
|
196
|
-
r = new
|
196
|
+
r = new k({
|
197
197
|
body: u,
|
198
198
|
details: i != null && i.error ? q(i.error) : d.statusText,
|
199
199
|
headers: d.headers,
|
@@ -211,7 +211,7 @@ async function V({ data: t, sender: s, urls: a }) {
|
|
211
211
|
}
|
212
212
|
return i;
|
213
213
|
} catch (d) {
|
214
|
-
r = new
|
214
|
+
r = new k({
|
215
215
|
body: u,
|
216
216
|
details: d.message,
|
217
217
|
url: n
|