@blockend/widget 1.0.61-beta.6 → 1.0.62
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-Cxr3Nkrq.js → AllRoutes-pT_GYhLz.js} +198 -201
- package/dist/{Box-PCm99lPs.js → Box-CMXImt80.js} +1 -1
- package/dist/{EstGas-DAqnmtXg.js → EstGas-BEwQc47B.js} +802 -922
- package/dist/{Grow-PUq8zLdG.js → Grow-CYJk-72r.js} +192 -196
- package/dist/{InputComp-Cpbiu4nw.js → InputComp-B0QgFbsj.js} +3 -3
- package/dist/{LoadRoute-DMvruPxQ.js → LoadRoute-I--KmXYZ.js} +4 -4
- package/dist/{QuotesProgress-B8gCi4mg.js → QuotesProgress-Ct53CRUU.js} +1 -1
- package/dist/{SwapAsset-LXjTHOyg.js → SwapAsset-X7gAsFxL.js} +1 -1
- package/dist/{Tooltip-BBzQ_Niy.js → Tooltip-CsxhxDbM.js} +6 -9
- package/dist/{TxnButton-CzynEgC-.js → TxnButton-BZf2lfxu.js} +62 -65
- package/dist/{add-Dy5-Nff0.js → add-fqHpy_n_.js} +1 -1
- package/dist/{all-wallets-jwMVTU0s.js → all-wallets-BEiHad26.js} +1 -1
- package/dist/{app-store-DEcg75wd.js → app-store-BUrtll4M.js} +1 -1
- package/dist/{apple-C3gcxaZN.js → apple-DeP0r4ax.js} +1 -1
- package/dist/{arrow-bottom-Dz-dufK1.js → arrow-bottom-DOUsYrpS.js} +1 -1
- package/dist/{arrow-bottom-circle-CbmTfpof.js → arrow-bottom-circle-3zt0oM9l.js} +1 -1
- package/dist/{arrow-left-MSV3EbO3.js → arrow-left-CZi8gizN.js} +1 -1
- package/dist/{arrow-right-BIh4_fkF.js → arrow-right-Bp2k-sRU.js} +1 -1
- package/dist/{arrow-top-BKC3U-ao.js → arrow-top-Bdu-g3eb.js} +1 -1
- package/dist/{bank-DBtyASC7.js → bank-UM_6-xYg.js} +1 -1
- package/dist/{basic-BgV8RQ-A.js → basic-CfaJcj31.js} +4 -4
- package/dist/{browser-DC9IClot.js → browser-DE4dHUIn.js} +1 -1
- package/dist/{card-BT6koHhk.js → card-CpV_uFyN.js} +1 -1
- package/dist/{ccip-3LoUUUH-.js → ccip-CA2a9SDo.js} +1 -1
- package/dist/{checkmark-DSeqDz_Y.js → checkmark-CK8NZa3x.js} +1 -1
- package/dist/{checkmark-bold-BIkQqCzJ.js → checkmark-bold-DgI_WWpK.js} +1 -1
- package/dist/{chevron-bottom-CBXmsDV5.js → chevron-bottom-C_3_Lg-x.js} +1 -1
- package/dist/{chevron-left-DhVqX1hi.js → chevron-left-Dn-8RUKj.js} +1 -1
- package/dist/{chevron-right-B3rsG14_.js → chevron-right-BrzGCKbe.js} +1 -1
- package/dist/{chevron-top-BEjzOADe.js → chevron-top-DH4uxqMd.js} +1 -1
- package/dist/{chrome-store-DRLnmUBT.js → chrome-store-C6ftVKRM.js} +1 -1
- package/dist/{clock-eV75Aej3.js → clock-BMAqcMX9.js} +1 -1
- package/dist/{close-zdZMwNem.js → close-B99wQvJ_.js} +1 -1
- package/dist/{coinPlaceholder-CDI_BOjw.js → coinPlaceholder-DmuYNsmb.js} +1 -1
- package/dist/{compass-VmDWLUk0.js → compass-C4wdl146.js} +1 -1
- package/dist/{copy-BPf4wDQR.js → copy-DMJQyfJj.js} +1 -1
- package/dist/{core-FKJijvR4.js → core-v6ho39ji.js} +324 -390
- package/dist/{cursor-DyqcSARn.js → cursor-C-0knOkC.js} +1 -1
- package/dist/{cursor-transparent-BYUs3PjC.js → cursor-transparent-BLuqOo6k.js} +1 -1
- package/dist/{desktop-ajSWZf14.js → desktop-DpJrO84H.js} +1 -1
- package/dist/{disconnect-CesQDkW7.js → disconnect-k6w6zlk-.js} +1 -1
- package/dist/{discord-DRpBdD6a.js → discord-DLgkGibC.js} +1 -1
- package/dist/{down-BvpSLqv4.js → down-C4N-wh2D.js} +3 -4
- package/dist/{etherscan-T2x0uGqy.js → etherscan-DJTxjIAP.js} +1 -1
- package/dist/{exclamation-triangle-jiEvqZCt.js → exclamation-triangle-B1YdY5CX.js} +1 -1
- package/dist/{extension-VNmHHnl3.js → extension-CnhByDAh.js} +1 -1
- package/dist/{external-link-C1cNXEY_.js → external-link-CZmI3Q92.js} +1 -1
- package/dist/{facebook-BMo02i5k.js → facebook-CRHPGcBq.js} +1 -1
- package/dist/{farcaster-DGe5MIGO.js → farcaster-BYs6AvgJ.js} +1 -1
- package/dist/{filters-CUJYlRnZ.js → filters-BqJFiFCl.js} +1 -1
- package/dist/{getChainIds-D11guRHs.js → getChainIds-CPQkM2Fw.js} +4 -6
- package/dist/{getCosmosAddress-DgfHG7Hd.js → getCosmosAddress-CrzIqoe8.js} +2304 -2370
- package/dist/{github-Cs2pYb7C.js → github-WI_fsQyX.js} +1 -1
- package/dist/{google-DHT6lJFv.js → google-PDPeuX25.js} +1 -1
- package/dist/{hamburger-Yws20Vz4.js → hamburger-JHCSR4wq.js} +427 -436
- package/dist/{help-circle-DgP-m-Uz.js → help-circle-CC1LutMp.js} +1 -1
- package/dist/{id-B_EdR-1o.js → id-Dg4qm85K.js} +1 -1
- package/dist/{image-Cj7amYSJ.js → image-DvH3pCRi.js} +1 -1
- package/dist/{index-HFb_3Q0W.js → index-4DGqOb0b.js} +1 -1
- package/dist/{index-CWhe50Ec.js → index-BAjx9Sij.js} +451 -451
- package/dist/{index-D2IU_xeZ.js → index-BII8gr4h.js} +1134 -1151
- package/dist/{index-SFtx8RRR.js → index-Bl06WOfD.js} +14 -19
- package/dist/{index-BxH9oOBu.js → index-BrgwPS_u.js} +21 -32
- package/dist/{index-BXD_AzIx.js → index-ByNEeX9y.js} +1 -1
- package/dist/{index-BMBfrbLJ.js → index-CBMjkxpP.js} +5034 -5110
- package/dist/{index-BLrg6aM7.js → index-D8oYLVSL.js} +2 -2
- package/dist/{index-Bl2UpALc.js → index-DTish3yr.js} +1 -3
- package/dist/{index-mhA4TOGx.js → index-DbOqrlxW.js} +4 -4
- package/dist/{index-tEVjSKpt.js → index-Mqg8CWuX.js} +18 -32
- package/dist/{index-_c95MH6R.js → index-qIeZpXcg.js} +78 -78
- package/dist/{index.es-Cf2P8B_E.js → index.es-DV8y1ve_.js} +958 -978
- package/dist/{index.es-svtwMaZq.js → index.es-DkTmjrB8.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-Cp9JCjqN.js → info-Cjmzqm5P.js} +1 -1
- package/dist/{info-circle-DRaVj-ap.js → info-circle-Dimf4UPG.js} +1 -1
- package/dist/{lightbulb-CsW2vktv.js → lightbulb-BsZjMPbK.js} +1 -1
- package/dist/{mail-CWnCoK8z.js → mail-KNgNgUMG.js} +1 -1
- package/dist/{mobile-CA14tPHx.js → mobile-hJMru58F.js} +1 -1
- package/dist/{more-QAxcbEKq.js → more-B1Hz9ISJ.js} +1 -1
- package/dist/{network-placeholder-TIBJyj_I.js → network-placeholder-Ba37-PVe.js} +1 -1
- package/dist/{nftPlaceholder-CjKZ96cX.js → nftPlaceholder-Br6ZCUyX.js} +1 -1
- package/dist/{off-pDtmSFmO.js → off-DZv0f5qk.js} +1 -1
- package/dist/{play-store-CSc6NscT.js → play-store-PVT99oFp.js} +1 -1
- package/dist/{plus-C_Utdahs.js → plus-0JhMk1yC.js} +1 -1
- package/dist/{qr-code-DyK3HPLw.js → qr-code-CYMnN7H6.js} +1 -1
- package/dist/{recycle-horizontal-B2PCZE0j.js → recycle-horizontal-BODX35XL.js} +1 -1
- package/dist/{refresh-DCyPlTQE.js → refresh-KT2nzf4V.js} +1 -1
- package/dist/{reown-logo-BZtSC222.js → reown-logo-x-a1ehju.js} +1 -1
- package/dist/{search-zmw8hnGf.js → search-floOYVWE.js} +1 -1
- package/dist/{send-qpVD_BnX.js → send-rBEZNvkT.js} +1 -1
- package/dist/{swapHorizontal-DeiTZysc.js → swapHorizontal-FpW50anF.js} +1 -1
- package/dist/{swapHorizontalBold-DxXPoYvj.js → swapHorizontalBold-DJo2s6QM.js} +1 -1
- package/dist/{swapHorizontalMedium-Bk5t746S.js → swapHorizontalMedium-AdMIxAQ-.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-BKNTjAMS.js → swapHorizontalRoundedBold-DB7VaS-l.js} +1 -1
- package/dist/{swapVertical-BgErJn7M.js → swapVertical-CStjk8mq.js} +1 -1
- package/dist/{telegram-DLZsj0GL.js → telegram-B7o9hZwP.js} +1 -1
- package/dist/{three-dots-C639cevE.js → three-dots-DogTUFsH.js} +1 -1
- package/dist/{twitch-BjX2MWAc.js → twitch-B_TRhhNU.js} +1 -1
- package/dist/{twitterIcon-_EGscQMD.js → twitterIcon-ujuPKvRN.js} +1 -1
- package/dist/{unsupportedProp-qsTU86qU.js → unsupportedProp-BC6azYXA.js} +1 -1
- package/dist/useRegisterError-DMILz6N1.js +8918 -0
- package/dist/{verify-B9nCXXUk.js → verify-BRWSwLhn.js} +1 -1
- package/dist/{verify-filled-Cfe5su-B.js → verify-filled-z7UoRJXn.js} +1 -1
- package/dist/{w3m-modal-pIdI-nLd.js → w3m-modal-CuXPdser.js} +2 -2
- package/dist/{wallet-BLNq3D4p.js → wallet-BMFvv3DF.js} +1 -1
- package/dist/{wallet-placeholder-DNL9SHUB.js → wallet-placeholder-DFg6CZXP.js} +1 -1
- package/dist/{walletconnect-B8OExIGD.js → walletconnect-WSdSSZfM.js} +1 -1
- package/dist/{warning-circle-CbRvsp3p.js → warning-circle-BDW9xnhM.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-Booefzx8.js → x-DUDktTjC.js} +1 -1
- package/package.json +1 -1
- package/dist/AdvancedSettings-D7odvw7r.js +0 -47
- package/dist/useRegisterError-B1CjkI-p.js +0 -8923
@@ -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-CBMjkxpP.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-DMILz6N1.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-BAjx9Sij.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-CBMjkxpP.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-C4N-wh2D.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-ByNEeX9y.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-DMILz6N1.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-CBMjkxpP.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-CBMjkxpP.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-CYJk-72r.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, D as A, E as _o, w as No } from "./useRegisterError-
|
5
|
+
import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, D as A, E as _o, w as No } from "./useRegisterError-DMILz6N1.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -231,8 +231,7 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
231
231
|
current: o
|
232
232
|
} = p.useRef(Pe !== void 0);
|
233
233
|
p.useEffect(() => {
|
234
|
-
l && l.disabled && !o && m !== "" && l.tagName.toLowerCase()
|
235
|
-
`));
|
234
|
+
l && l.disabled && !o && m !== "" && l.tagName.toLowerCase();
|
236
235
|
}, [m, l, o]);
|
237
236
|
}
|
238
237
|
const q = Co(Je), T = p.useRef(), N = Ue(() => {
|
@@ -310,12 +309,10 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
310
309
|
onMouseMove: co
|
311
310
|
} : {});
|
312
311
|
B.env.NODE_ENV !== "production" && (a["data-mui-internal-clone-element"] = !0, p.useEffect(() => {
|
313
|
-
l &&
|
314
|
-
`));
|
312
|
+
l && l.getAttribute("data-mui-internal-clone-element");
|
315
313
|
}, [l]));
|
316
314
|
const v = {};
|
317
|
-
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(G, a.onMouseLeave), H || (v.onMouseOver = $, v.onMouseLeave = G)), qe || (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
|
318
|
-
`));
|
315
|
+
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(G, a.onMouseLeave), H || (v.onMouseOver = $, v.onMouseLeave = G)), qe || (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;
|
319
316
|
const uo = p.useMemo(() => {
|
320
317
|
var o;
|
321
318
|
let i = [{
|
@@ -1,41 +1,41 @@
|
|
1
1
|
import { jsx as G } from "react/jsx-runtime";
|
2
2
|
import { useState as v, useEffect as z } from "react";
|
3
3
|
import { useDynamicContext as xe, useSwitchNetwork as Me, useIsLoggedIn as Oe } from "@dynamic-labs/sdk-react-core";
|
4
|
-
import { a as _, u as
|
4
|
+
import { a as _, u as h, aA as Re, aB as pe } from "./index-CBMjkxpP.js";
|
5
5
|
import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
6
|
import { useAccount as Ve, useConfig as qe, useSwitchChain as Pe, useBalance as _e } from "wagmi";
|
7
|
-
import { u as
|
7
|
+
import { u as ge, d as Qe, c as He, C as ye } from "./useRegisterError-DMILz6N1.js";
|
8
8
|
import { v as Je } from "./validError-CDlJpg_f.js";
|
9
|
-
import { u as Ke, g as Ue, p as Xe } from "./index-
|
9
|
+
import { u as Ke, g as Ue, p as Xe } from "./index-BAjx9Sij.js";
|
10
10
|
function Ye(n) {
|
11
|
-
const { wallet:
|
11
|
+
const { wallet: u, address: l } = _(), [N, B] = v(0);
|
12
12
|
async function x() {
|
13
|
-
const F = await window.tronWeb.trx.getBalance(
|
13
|
+
const F = await window.tronWeb.trx.getBalance(l);
|
14
14
|
B(F / Math.pow(10, 6));
|
15
15
|
}
|
16
16
|
return z(() => {
|
17
|
-
|
18
|
-
}, [
|
17
|
+
l && (n == null ? void 0 : n.networkType) === "tron" && x();
|
18
|
+
}, [l, n == null ? void 0 : n.networkType]), { tronBal: N };
|
19
19
|
}
|
20
20
|
function A(n) {
|
21
|
-
if (
|
21
|
+
if (n.key.toLowerCase() === "backpacksol")
|
22
22
|
return !0;
|
23
23
|
}
|
24
24
|
function Ze() {
|
25
|
-
const [n,
|
25
|
+
const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: N } = xe();
|
26
26
|
async function B() {
|
27
|
-
let x = await
|
28
|
-
|
27
|
+
let x = await N.getBalance();
|
28
|
+
u(Number(x) || 0);
|
29
29
|
}
|
30
30
|
return z(() => {
|
31
|
-
(
|
32
|
-
}, [
|
31
|
+
(l.networkType === "btc" || l.networkType === "sui") && B();
|
32
|
+
}, [l.networkType, N]), n;
|
33
33
|
}
|
34
|
-
function lt({ routesData: n, routes:
|
34
|
+
function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowWallet: B, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: Te, handleSuccess: Q }) {
|
35
35
|
var C, ee, te, se, re, ce, ne, ie, de, ae, le, oe, we;
|
36
|
-
const w =
|
36
|
+
const w = h((s) => s.gradient), I = 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: m } = Ve(), { address: J, isConnected: We } = _(), Ie = qe(), me = Me(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
|
37
37
|
chainData: e
|
38
|
-
}), { connected: K, address: U, disconnect: De } = _(), M =
|
38
|
+
}), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: Be } = ge({ chainData: e }), fe = Ne(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: $e, isPending: Ee } = Pe({
|
39
39
|
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
40
40
|
config: Ie,
|
41
41
|
throwForSwitchChainNotSupported: !0,
|
@@ -47,7 +47,7 @@ function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowW
|
|
47
47
|
token: "",
|
48
48
|
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
49
49
|
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
50
|
-
}), W = He(Te || 0, 11), [o,
|
50
|
+
}), W = He(Te || 0, 11), [o, a] = v({
|
51
51
|
text: "",
|
52
52
|
isGradient: !1,
|
53
53
|
color: "bw-bg-border-primary"
|
@@ -55,30 +55,27 @@ function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowW
|
|
55
55
|
async function Fe() {
|
56
56
|
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id))
|
57
57
|
try {
|
58
|
-
await
|
59
|
-
} catch
|
60
|
-
console.log(s, "err");
|
58
|
+
await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
59
|
+
} catch {
|
61
60
|
}
|
62
61
|
else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
63
62
|
try {
|
64
63
|
let s = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
65
64
|
D();
|
66
|
-
} catch
|
67
|
-
console.log(s, "err");
|
65
|
+
} catch {
|
68
66
|
}
|
69
|
-
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(
|
67
|
+
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(pe.TransactionStarted, {
|
70
68
|
...n
|
71
|
-
}), f && (Q(!1), F())) : (Z.emit(
|
69
|
+
}), f && (Q(!1), F())) : (Z.emit(pe.TransactionStarted, {
|
72
70
|
...n
|
73
71
|
}), f && (Q(!1), F()));
|
74
72
|
}
|
75
|
-
const { primaryWallet: p } = xe(), P = Oe(), f = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Be(e)) == null ? void 0 : re.address) != null && ce.length) :
|
73
|
+
const { primaryWallet: p } = xe(), P = Oe(), f = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Be(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 () => {
|
76
74
|
if (p)
|
77
75
|
try {
|
78
76
|
const s = await p.getNetwork();
|
79
|
-
|
80
|
-
} catch
|
81
|
-
console.error("Error getting network:", s);
|
77
|
+
Ge(s);
|
78
|
+
} catch {
|
82
79
|
}
|
83
80
|
else
|
84
81
|
return;
|
@@ -86,67 +83,67 @@ function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowW
|
|
86
83
|
z(() => {
|
87
84
|
D();
|
88
85
|
}, [p]);
|
89
|
-
function k(s,
|
90
|
-
let
|
91
|
-
return
|
86
|
+
function k(s, g) {
|
87
|
+
let y = s / Math.pow(10, g);
|
88
|
+
return y < 1e-6 ? y.toFixed(20) : y;
|
92
89
|
}
|
93
90
|
function Le() {
|
94
91
|
var s;
|
95
92
|
return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
|
96
93
|
}
|
97
94
|
function je(s) {
|
98
|
-
var
|
99
|
-
return Number(((
|
95
|
+
var g;
|
96
|
+
return Number(((g = X[Xe(s.address)]) == null ? void 0 : g.amount) || 0) / Math.pow(10, s.decimals);
|
100
97
|
}
|
101
98
|
function Ae() {
|
102
|
-
var
|
99
|
+
var E;
|
103
100
|
let s = {};
|
104
|
-
async function
|
105
|
-
let
|
101
|
+
async function g(t, c) {
|
102
|
+
let $ = Object.keys(s);
|
106
103
|
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] = {
|
107
104
|
amountInToken: c.amountInToken,
|
108
105
|
gas: k(c.amountInToken, t == null ? void 0 : t.decimals),
|
109
106
|
token: t,
|
110
107
|
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(),
|
111
108
|
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
112
|
-
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 :
|
109
|
+
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 : $.length > 2 ? 3 : 2
|
113
110
|
};
|
114
111
|
}
|
115
|
-
(
|
112
|
+
(E = n == null ? void 0 : n.fee) == null || E.forEach((t) => {
|
116
113
|
const { token: c } = t;
|
117
|
-
t.source.toLowerCase() == "from_source_wallet" &&
|
114
|
+
t.source.toLowerCase() == "from_source_wallet" && g(c, t);
|
118
115
|
});
|
119
|
-
let
|
120
|
-
if (
|
121
|
-
|
116
|
+
let y = W;
|
117
|
+
if (Number(l) > Number(y))
|
118
|
+
a({
|
122
119
|
text: `Insufficient Balance ${i.coin || ""}`,
|
123
120
|
isGradient: !1,
|
124
121
|
color: "bw-bg-border-primary"
|
125
122
|
});
|
126
123
|
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")
|
127
|
-
|
124
|
+
a({
|
128
125
|
text: "Fetching Balance..",
|
129
126
|
isGradient: !1,
|
130
127
|
color: "bw-bg-border-primary"
|
131
128
|
});
|
132
129
|
else {
|
133
|
-
let t = Object.values(s).sort((c,
|
130
|
+
let t = Object.values(s).sort((c, $) => c.order - $.order);
|
134
131
|
t.some((c) => {
|
135
|
-
var
|
136
|
-
return c != null && c.isFromChain && Number(
|
137
|
-
text: `Insufficient ${((
|
132
|
+
var $, be, ue;
|
133
|
+
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({
|
134
|
+
text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
|
138
135
|
isGradient: !1,
|
139
136
|
color: "bw-bg-border-primary"
|
140
|
-
}), !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)) ? (
|
137
|
+
}), !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({
|
141
138
|
text: `Insufficient ${((ue = c == null ? void 0 : c.token) == null ? void 0 : ue.symbol) || ""} for gas on ${c.token.blockchain}`,
|
142
139
|
isGradient: !1,
|
143
140
|
color: "bw-bg-border-primary"
|
144
|
-
}), !0) : (
|
141
|
+
}), !0) : (a({
|
145
142
|
text: "",
|
146
143
|
isGradient: !0,
|
147
144
|
color: w || S.gradientbutton
|
148
145
|
}), !0);
|
149
|
-
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") &&
|
146
|
+
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
150
147
|
text: "",
|
151
148
|
isGradient: !0,
|
152
149
|
color: w || S.gradientbutton
|
@@ -154,53 +151,53 @@ function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowW
|
|
154
151
|
}
|
155
152
|
}
|
156
153
|
z(() => {
|
157
|
-
var s,
|
158
|
-
!i.coin.length || !(b != null && b.coin.length) ?
|
154
|
+
var s, g, y;
|
155
|
+
!i.coin.length || !(b != null && b.coin.length) ? a({
|
159
156
|
text: "Select Token",
|
160
157
|
isGradient: !0,
|
161
158
|
color: w || S.gradientbutton
|
162
|
-
}) : f ? typeof
|
159
|
+
}) : f ? typeof l < "u" && Number(l || 0) <= 0 ? a({
|
163
160
|
text: "Enter Amount",
|
164
161
|
isGradient: !1,
|
165
162
|
color: "bw-bg-border-primary"
|
166
|
-
}) :
|
163
|
+
}) : u.isFetching || !N ? a({
|
167
164
|
text: "Loading Routes...",
|
168
165
|
isGradient: !1,
|
169
166
|
color: "bw-bg-border-primary"
|
170
|
-
}) : e.chainId === "eclipse-svm" && !A(p) ?
|
167
|
+
}) : e.chainId === "eclipse-svm" && !A(p) ? a({
|
171
168
|
text: `Select ${e.name} wallet`,
|
172
169
|
isGradient: !0,
|
173
170
|
color: w || S.gradientbutton
|
174
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ?
|
171
|
+
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? a({
|
175
172
|
text: "Enter recipient wallet address",
|
176
173
|
isGradient: !0,
|
177
174
|
color: w || S.gradientbutton
|
178
|
-
}) : (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.chainId) === (r == null ? void 0 : r.chainId) || (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) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) ?
|
175
|
+
}) : (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.chainId) === (r == null ? void 0 : r.chainId) || (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) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) ? a({
|
179
176
|
text: "From and To asset can not be the same!",
|
180
177
|
isGradient: !1,
|
181
178
|
color: "bw-bg-border-primary"
|
182
|
-
}) : (
|
179
|
+
}) : (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({
|
183
180
|
text: "Failed to fetch Quotes",
|
184
181
|
isGradient: !1,
|
185
182
|
color: "bw-bg-border-primary"
|
186
|
-
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.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" ?
|
183
|
+
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.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({
|
187
184
|
text: `Switch Chain to ${e.chain}`,
|
188
185
|
isGradient: !0,
|
189
186
|
color: w || S.gradientbutton
|
190
|
-
}) : Ae() :
|
187
|
+
}) : Ae() : a({
|
191
188
|
text: "No Routes Found",
|
192
189
|
isGradient: !1,
|
193
190
|
color: "bw-bg-border-primary"
|
194
|
-
}) :
|
191
|
+
}) : a({
|
195
192
|
text: "",
|
196
193
|
isGradient: !0,
|
197
194
|
color: w || S.gradientbutton
|
198
195
|
});
|
199
|
-
}, [O, p, i, b,
|
196
|
+
}, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, f, u.isFetching, m == null ? void 0 : m.id, N, R, L, d, Y, X, J]);
|
200
197
|
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"];
|
201
198
|
function ze() {
|
202
|
-
var s,
|
203
|
-
return f ?
|
199
|
+
var s, g, y, E;
|
200
|
+
return f ? u.isFetching ? !0 : o.text.length ? !ve.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !((E = (y = (g = u.data) == null ? void 0 : g.data) == null ? void 0 : y.quotes) != null && E.length) : !1;
|
204
201
|
}
|
205
202
|
return /* @__PURE__ */ G(
|
206
203
|
"button",
|
@@ -216,7 +213,7 @@ function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowW
|
|
216
213
|
onClick: () => {
|
217
214
|
f || (B(!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) ? (B(!0), x("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? (B(!0), x("to")) : Fe();
|
218
215
|
},
|
219
|
-
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 ?
|
216
|
+
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 ? Ee ? /* @__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" }) }) : f ? o.text.length ? o.text : "Start Transaction" : `Connect ${fe} 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" }) }) }) })
|
220
217
|
}
|
221
218
|
);
|
222
219
|
}
|
@@ -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-v6ho39ji.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-qIeZpXcg.js";
|
3
|
+
import { n as Wn } from "./index-CBMjkxpP.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|
@@ -899,7 +899,7 @@ let xt = class extends A {
|
|
899
899
|
tabIdx=${W(this.tabIdx)}
|
900
900
|
></w3m-connect-recommended-widget>`;
|
901
901
|
default:
|
902
|
-
return
|
902
|
+
return null;
|
903
903
|
}
|
904
904
|
});
|
905
905
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ad as L, ae as b, af as F, ag as N, ah as P, ai as w, aj as S, ak as E, al as $, am as C, an as I, ao as m, ap as G, aq as R, ar as k, as as y, at as O, au as q, av as T, aw as v, ax as D, ay as A, az as H } from "./index-
|
1
|
+
import { ad as L, ae as b, af as F, ag as N, ah as P, ai as w, aj as S, ak as E, al as $, am as C, an as I, ao as m, ap as G, aq as R, ar as k, as as y, at as O, au as q, av as T, aw as v, ax as D, ay as A, az as H } from "./index-CBMjkxpP.js";
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
3
3
|
function x(t) {
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|