@blockend/widget 1.0.50 → 1.0.52
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-CULIQsat.js → AllRoutes-kKOYSrNS.js} +9 -9
- package/dist/{Box-NqP6AVwQ.js → Box-DD2rDHYN.js} +1 -1
- package/dist/EstGas-3YaFsaqq.js +20281 -0
- package/dist/{Grow-DimeDg31.js → Grow-B_GQW4_x.js} +2 -2
- package/dist/{InputComp-yY8lKNsS.js → InputComp-CORUBHuj.js} +3 -3
- package/dist/{LoadRoute-C9PROsCB.js → LoadRoute-BPrygCCX.js} +4 -4
- package/dist/{QuotesProgress-BqAtKdL0.js → QuotesProgress-DRw4SQ0r.js} +1 -1
- package/dist/{SwapAsset-CZhHktg2.js → SwapAsset-CkQizd1M.js} +1 -1
- package/dist/{Tooltip-BiZCYxM1.js → Tooltip-CrSPOtOO.js} +3 -3
- package/dist/TxnButton-w_U38ob4.js +223 -0
- package/dist/{add-h0-mWiyZ.js → add-CD961dgq.js} +1 -1
- package/dist/{all-wallets-B1G-BF4O.js → all-wallets-apJrqQx8.js} +1 -1
- package/dist/{app-store-C6terlTd.js → app-store-BwPPWbZ-.js} +1 -1
- package/dist/{apple-BAMP6vUT.js → apple-C5GBBzKu.js} +1 -1
- package/dist/{arrow-bottom-5NtikK9r.js → arrow-bottom-DJFMgU8u.js} +1 -1
- package/dist/{arrow-bottom-circle-GWblbKB-.js → arrow-bottom-circle-hjkHJiRS.js} +1 -1
- package/dist/{arrow-left-CuwEORVr.js → arrow-left-DbapUhyG.js} +1 -1
- package/dist/{arrow-right-B7p52n9L.js → arrow-right-DfwZPj3f.js} +1 -1
- package/dist/{arrow-top-X0Z_PT4J.js → arrow-top-CsNBUZSP.js} +1 -1
- package/dist/{bank-I9RgXHkl.js → bank-CCcBm5-d.js} +1 -1
- package/dist/{basic-DlZzE8fW.js → basic-BjFK2vXh.js} +3 -3
- package/dist/{browser-y883UdyY.js → browser-CyDiApkv.js} +1 -1
- package/dist/{card-DFwMQe6t.js → card-C7cgC8He.js} +1 -1
- package/dist/{ccip-BdqG54tP.js → ccip-CGp4v-Ik.js} +1 -1
- package/dist/{checkmark-DwHPcz7y.js → checkmark-CvC9xsHE.js} +1 -1
- package/dist/{checkmark-bold-CwUU9faI.js → checkmark-bold-CV7kkVJ6.js} +1 -1
- package/dist/{chevron-bottom-CM8xoehI.js → chevron-bottom-GP9ijdKd.js} +1 -1
- package/dist/{chevron-left-Bv_KYFge.js → chevron-left-BzU9rDXH.js} +1 -1
- package/dist/{chevron-right-CuU7ZCUE.js → chevron-right-C-O85byK.js} +1 -1
- package/dist/{chevron-top-FBXj-YJj.js → chevron-top-CPbBRhHs.js} +1 -1
- package/dist/{chrome-store-BIA_g9fd.js → chrome-store-DLb3LMor.js} +1 -1
- package/dist/{clock-CgcPvmV3.js → clock-u8NvqjTh.js} +1 -1
- package/dist/{close-Dro7okSF.js → close-DGnBB14u.js} +1 -1
- package/dist/{coinPlaceholder-Df9r_k0L.js → coinPlaceholder-B_vbKW0d.js} +1 -1
- package/dist/{compass-zmLyV0WT.js → compass-VjDuwtpH.js} +1 -1
- package/dist/{copy-CIamcXhE.js → copy-CpwxxVFk.js} +1 -1
- package/dist/{core-2WkYhq16.js → core-Hivezgcn.js} +3 -3
- package/dist/{cursor-C2EB1DLY.js → cursor-CKztTS80.js} +1 -1
- package/dist/{cursor-transparent-BRACM7k5.js → cursor-transparent-MbRcJDkf.js} +1 -1
- package/dist/{desktop-Nj8wnhrx.js → desktop-C0hQOtTz.js} +1 -1
- package/dist/{disconnect-BA3_H2TE.js → disconnect-CbngTTe6.js} +1 -1
- package/dist/{discord-BnYi_b4O.js → discord-CeP387Uz.js} +1 -1
- package/dist/{down-BiWYZhrl.js → down-A88TfxuQ.js} +2 -2
- package/dist/{etherscan-Oni_KoX7.js → etherscan-DHgjcKzd.js} +1 -1
- package/dist/{exclamation-triangle-DensxwAC.js → exclamation-triangle-BKbjxRSf.js} +1 -1
- package/dist/{extension-CJ-ksDa9.js → extension-DKdg1MMc.js} +1 -1
- package/dist/{external-link-D2xEf8Lc.js → external-link-D_9l5Fag.js} +1 -1
- package/dist/{facebook-Dc9l2BHT.js → facebook-2lC7Kpys.js} +1 -1
- package/dist/{farcaster-PnjVCWz_.js → farcaster-DvDKv86N.js} +1 -1
- package/dist/{filters-BHTpF3UH.js → filters-7ekV1CBZ.js} +1 -1
- package/dist/{getChainIds-CfrzTUBX.js → getChainIds-ClTf-7B7.js} +2 -2
- package/dist/{getCosmosAddress-CQBPedP-.js → getCosmosAddress-CAHzTotY.js} +3 -2
- package/dist/{github-SsGUhatp.js → github-C_2AeCoD.js} +1 -1
- package/dist/{google-ClSrT1Rw.js → google-onzWiElr.js} +1 -1
- package/dist/{hamburger-CnBL_kWz.js → hamburger-DG8CUWPY.js} +5 -5
- package/dist/{help-circle-6WH3b0xJ.js → help-circle-BsEBhuFe.js} +1 -1
- package/dist/{id-BpdNL8xg.js → id-C4NyttJs.js} +1 -1
- package/dist/{image-D98hwlBe.js → image-DKwx-krp.js} +1 -1
- package/dist/{index-yf9XBWfH.js → index-16MzijM6.js} +573 -525
- package/dist/{index-CdSs-KXV.js → index-BJRMxl7-.js} +11 -11
- package/dist/{index-DbBaCDf8.js → index-BYgXlFDF.js} +78 -78
- package/dist/{index-BYEfYYbR.js → index-BkdZ8Dv5.js} +10 -10
- package/dist/{index-CbunQDKM.js → index-BpQ0XXSG.js} +1 -1
- package/dist/{index-Kcq8t_TI.js → index-CFjOCNdT.js} +1 -1
- package/dist/{index-BD7sxHzc.js → index-CVtXIHyR.js} +2 -2
- package/dist/{index-Hx1OgUt3.js → index-CWUtWgcV.js} +51 -51
- package/dist/{index-270jcL0T.js → index-DB3YpCzK.js} +8 -7
- package/dist/{index-VwOzTBuI.js → index-DSmx3mnG.js} +2886 -2899
- package/dist/index-l3lZQnPO.js +3190 -0
- package/dist/{index.es-DNIrxJpP.js → index.es-BC-Prg32.js} +1 -1
- package/dist/{index.es-extFs-He.js → index.es-BDiTU_FA.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/{info-CX4R9q8L.js → info-B8W2xzJC.js} +1 -1
- package/dist/{info-circle-ByA7titS.js → info-circle-xd4z9C36.js} +1 -1
- package/dist/{lightbulb-DpdMU1eo.js → lightbulb-D5I8lTbi.js} +1 -1
- package/dist/{mail-D7BloLRj.js → mail-F3uJmECQ.js} +1 -1
- package/dist/{mobile-BfhAPCLe.js → mobile-k7XFALbp.js} +1 -1
- package/dist/{more-2Fi4UnXg.js → more-D-JzQpLw.js} +1 -1
- package/dist/{network-placeholder-CQk-R-eu.js → network-placeholder-BCZ9Tznt.js} +1 -1
- package/dist/{nftPlaceholder-D67aKpf-.js → nftPlaceholder-C3lY-4pO.js} +1 -1
- package/dist/{off-CER3l2ZF.js → off-oyzD1zym.js} +1 -1
- package/dist/{play-store-D3OG1Nf5.js → play-store-DmzOyb5N.js} +1 -1
- package/dist/{plus-XfyglU6D.js → plus-B3_zXKdB.js} +1 -1
- package/dist/{qr-code-C2QzWWzi.js → qr-code-CDCi7YJ2.js} +1 -1
- package/dist/{recycle-horizontal-BNoCX8eV.js → recycle-horizontal-gYQpyQu-.js} +1 -1
- package/dist/{refresh-BtgNPYm1.js → refresh-BxJP9XlY.js} +1 -1
- package/dist/{reown-logo-BfwHREPj.js → reown-logo-4_2efEyI.js} +1 -1
- package/dist/{search-xILtKxp2.js → search-BgURoQ8D.js} +1 -1
- package/dist/{send-Cbq82Ise.js → send-B04E7tqz.js} +1 -1
- package/dist/{swapHorizontal-ieu8keoA.js → swapHorizontal-Bn3fSbb_.js} +1 -1
- package/dist/{swapHorizontalBold-DB9kV8I4.js → swapHorizontalBold-BrwcTxbN.js} +1 -1
- package/dist/{swapHorizontalMedium-CFcq-Eii.js → swapHorizontalMedium-DmeGLuiC.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-J-bBHkKw.js → swapHorizontalRoundedBold-BS3lUe20.js} +1 -1
- package/dist/{swapVertical-CdsB-iHQ.js → swapVertical-ChLqgWg7.js} +1 -1
- package/dist/{telegram-BcA4SOe-.js → telegram-DnPhgih8.js} +1 -1
- package/dist/{three-dots-tnSr7FoX.js → three-dots-bNEejC0G.js} +1 -1
- package/dist/{twitch-C0EXCOL_.js → twitch-GAMBWGM1.js} +1 -1
- package/dist/{twitterIcon-D8gUfoR9.js → twitterIcon-BLC3bD_g.js} +1 -1
- package/dist/{unsupportedProp-ClTIJsqE.js → unsupportedProp-C6jj5a32.js} +1 -1
- package/dist/{useRegisterError-BrX0SzkP.js → useRegisterError-Dtth7zv3.js} +1457 -1357
- package/dist/{verify-1fQ9qDGq.js → verify-BExXvDwE.js} +1 -1
- package/dist/{verify-filled-B-Bua_F7.js → verify-filled-Bi2V73zt.js} +1 -1
- package/dist/{w3m-modal-B4ljhCgE.js → w3m-modal-DqiyguGn.js} +2 -2
- package/dist/{wallet-CHuFygGk.js → wallet-CZWVV7qT.js} +1 -1
- package/dist/{wallet-placeholder-BY3FPHTK.js → wallet-placeholder-DWCfOWed.js} +1 -1
- package/dist/{walletconnect-1yfFjEWg.js → walletconnect-B30uBUwZ.js} +1 -1
- package/dist/{warning-circle-CtfJ6Xr4.js → warning-circle-BkKJHk9B.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-j-7tNFTH.js → x-BGtdpZh4.js} +1 -1
- package/package.json +7 -5
- package/dist/EstGas-Dh9afjPx.js +0 -12661
- package/dist/TxnButton-BZKqys7R.js +0 -212
- package/dist/index-uMBmZTqD.js +0 -3010
@@ -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, aE 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-
|
3
|
+
import { p as J, P as i, aE 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-DSmx3mnG.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-Dtth7zv3.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-DSmx3mnG.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-Dtth7zv3.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-16MzijM6.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-DSmx3mnG.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-A88TfxuQ.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-CFjOCNdT.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-Dtth7zv3.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-DSmx3mnG.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-DSmx3mnG.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-B_GQW4_x.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-Dtth7zv3.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -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, aA as Re, aB as pe } from "./index-DSmx3mnG.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-Dtth7zv3.js";
|
8
|
+
import "./getCosmosAddress-CAHzTotY.js";
|
9
|
+
import { v as Je } from "./validError-CDlJpg_f.js";
|
10
|
+
import { u as Ke, g as Ue, p as Xe } from "./index-16MzijM6.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: $e, isPending: Ee } = 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 $e({ 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 E;
|
101
|
+
let s = {};
|
102
|
+
async function g(t, c) {
|
103
|
+
let $ = 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 : $.length > 2 ? 3 : 2
|
111
|
+
};
|
112
|
+
}
|
113
|
+
(E = n == null ? void 0 : n.fee) == null || E.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, $) => c.order - $.order);
|
132
|
+
t.some((c) => {
|
133
|
+
var $, 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 ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.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, E;
|
201
|
+
return B ? 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;
|
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 ? 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" }) }) : 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-Hivezgcn.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-BYgXlFDF.js";
|
3
|
+
import { n as Wn } from "./index-DSmx3mnG.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|
@@ -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-DSmx3mnG.js";
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
3
3
|
function x(t) {
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { B as et } from "./index-DTish3yr.js";
|
2
|
-
import { I as Wr, c as Zu, f as Tt, t as pt, a as U, g as re, b as us, C as Xu, d as Qu, e as ui, s as co, h as fl, i as er, k as Ti, A as ml, E as nt, j as eh, l as th, y as Ct, m as Ws, r as zr, O as Wo, o as kt, n as sh, p as zo, q as Ho, u as vn, N as Vo, P as ca, Q as rh, v as ih, w as nh, x as la, z as _r, B as wl, D as is, F as Vt, G as hs, H as Bt } from "./index.es-
|
3
|
-
import { p as Se } from "./index-
|
2
|
+
import { I as Wr, c as Zu, f as Tt, t as pt, a as U, g as re, b as us, C as Xu, d as Qu, e as ui, s as co, h as fl, i as er, k as Ti, A as ml, E as nt, j as eh, l as th, y as Ct, m as Ws, r as zr, O as Wo, o as kt, n as sh, p as zo, q as Ho, u as vn, N as Vo, P as ca, Q as rh, v as ih, w as nh, x as la, z as _r, B as wl, D as is, F as Vt, G as hs, H as Bt } from "./index.es-BDiTU_FA.js";
|
3
|
+
import { p as Se } from "./index-DSmx3mnG.js";
|
4
4
|
import { formatUnits as oh, recoverAddress as ah, fallback as ua, http as Wi, toHex as ha } from "viem";
|
5
5
|
const z = {
|
6
6
|
WC_NAME_SUFFIX: ".reown.id",
|
@@ -14903,7 +14903,7 @@ class Yu extends NE {
|
|
14903
14903
|
}
|
14904
14904
|
async injectModalUi() {
|
14905
14905
|
if (!pl && Z.isClient()) {
|
14906
|
-
if (await import("./basic-
|
14906
|
+
if (await import("./basic-BjFK2vXh.js"), await import("./w3m-modal-DqiyguGn.js"), !document.querySelector("w3m-modal")) {
|
14907
14907
|
const s = document.createElement("w3m-modal");
|
14908
14908
|
!O.state.disableAppend && !O.state.enableEmbedded && document.body.insertAdjacentElement("beforeend", s);
|
14909
14909
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as st } from "react/jsx-runtime";
|
2
2
|
import { useRef as _e, useEffect as xe } from "react";
|
3
|
-
import { m as X, u as me } from "./index-
|
4
|
-
import { L as ve } from "./useRegisterError-
|
3
|
+
import { m as X, u as me } from "./index-DSmx3mnG.js";
|
4
|
+
import { L as ve } from "./useRegisterError-Dtth7zv3.js";
|
5
5
|
var m = {}, F = { exports: {} };
|
6
6
|
F.exports;
|
7
7
|
var qt;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as C } from "./core-
|
1
|
+
import { m as C } from "./core-Hivezgcn.js";
|
2
2
|
const t = C`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
3
3
|
<path d="M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z" fill="currentColor"/>
|
4
4
|
</svg>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { m as h } from "./core-
|
1
|
+
import { m as h } from "./core-Hivezgcn.js";
|
2
2
|
const a = h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
|
3
3
|
<rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
|
4
4
|
<path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
|