@blockend/widget 1.0.47 → 1.0.48-beta.0
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-DzeVxLDj.js → AllRoutes-D8LuuVmM.js} +9 -9
- package/dist/{Box-Ci2zRQrs.js → Box-DM9yFOex.js} +8 -8
- package/dist/EstGas-BeT31S57.js +13644 -0
- package/dist/{Grow-BE3H0oa5.js → Grow-DOn6L3co.js} +2 -2
- package/dist/{InputComp-CJp-XwEr.js → InputComp-NuVHgaJr.js} +5 -5
- package/dist/{LoadRoute-eUX6vrIQ.js → LoadRoute-B67KdzDM.js} +18 -18
- package/dist/QuotesProgress-QaDMFoy1.js +28 -0
- package/dist/{SwapAsset-Dk21ATof.js → SwapAsset-DS1khTG7.js} +1 -1
- package/dist/{Tooltip-BZfJNVn-.js → Tooltip-Ba3WFgGd.js} +15 -15
- package/dist/TxnButton-tr4Dz_jE.js +223 -0
- package/dist/{add-ZLHbLJJu.js → add-q9Nf6prg.js} +1 -1
- package/dist/{all-wallets-d2aKzL33.js → all-wallets-DPeT0Mif.js} +1 -1
- package/dist/{app-store-D64ScJNv.js → app-store-DN3WdWdo.js} +1 -1
- package/dist/{apple-Du4IHASB.js → apple-DyzMqifv.js} +1 -1
- package/dist/{arrow-bottom-Dv2epYGz.js → arrow-bottom-DqoHxj9Z.js} +1 -1
- package/dist/{arrow-bottom-circle-UWVTMTVh.js → arrow-bottom-circle-gYCPf_-a.js} +1 -1
- package/dist/{arrow-left-BKfIGA7r.js → arrow-left-BCb0WGCp.js} +1 -1
- package/dist/{arrow-right-2mONf0tM.js → arrow-right-COFDKXwO.js} +1 -1
- package/dist/{arrow-top-X4pWUiKn.js → arrow-top-A2hPO7gg.js} +1 -1
- package/dist/{bank-CsABCgFp.js → bank-DzMH-tSV.js} +1 -1
- package/dist/{basic-BPWB_wOx.js → basic-C5wivloW.js} +3 -3
- package/dist/{browser-DwbBRE2D.js → browser-pBih3Y0E.js} +1 -1
- package/dist/{card-BewgfynW.js → card-CnPr5FkC.js} +1 -1
- package/dist/{ccip-CLnQdUd7.js → ccip-Di_Zaa6h.js} +16 -16
- package/dist/{checkmark-CQhUJTfi.js → checkmark-DuHkawx4.js} +1 -1
- package/dist/{checkmark-bold-CedqjnnO.js → checkmark-bold-CbTyGrPC.js} +1 -1
- package/dist/{chevron-bottom-DJ4X9Prx.js → chevron-bottom-ClujWrwS.js} +1 -1
- package/dist/{chevron-left-DWynSM9B.js → chevron-left-Bk48p4Zx.js} +1 -1
- package/dist/{chevron-right-DvWAAqhV.js → chevron-right-DNGloKKX.js} +1 -1
- package/dist/{chevron-top-BR530r9H.js → chevron-top-BeF-AMWu.js} +1 -1
- package/dist/{chrome-store-_0c6caxN.js → chrome-store-DbhS7z0N.js} +1 -1
- package/dist/{clock-VdAYDjqL.js → clock-C_6_l4to.js} +1 -1
- package/dist/{close-CO-0N2CX.js → close-CSt1jFt2.js} +1 -1
- package/dist/{coinPlaceholder-ujAsyqU0.js → coinPlaceholder-BCj1y0PN.js} +1 -1
- package/dist/{compass-VKJy5_W5.js → compass-BylNTlMa.js} +1 -1
- package/dist/{copy-osfd8JXZ.js → copy-B5chXsW-.js} +1 -1
- package/dist/{core-B_HqNWOu.js → core-DMrbUYAd.js} +16 -17
- package/dist/{cursor-DpjQo7re.js → cursor-DOai1hPO.js} +1 -1
- package/dist/{cursor-transparent-xK4CF8Hs.js → cursor-transparent-Cadcmy6E.js} +1 -1
- package/dist/{desktop-BMPBQv2t.js → desktop-DCy_OF9q.js} +1 -1
- package/dist/{disconnect-Cl9LGKMz.js → disconnect-d_9YI8yP.js} +1 -1
- package/dist/{discord-CZVHD-wp.js → discord-C5PncbsA.js} +1 -1
- package/dist/{down-Ct-xismN.js → down-B0DJRPMS.js} +2 -2
- package/dist/{etherscan-DdrzJHLk.js → etherscan-ClGwr9lW.js} +1 -1
- package/dist/{exclamation-triangle-CIQaYDSx.js → exclamation-triangle-UG68kEuv.js} +1 -1
- package/dist/{extension-Bb_ygQH_.js → extension-Bhr-Ssau.js} +1 -1
- package/dist/{external-link-Ddh7vP38.js → external-link-BRJo7SZO.js} +1 -1
- package/dist/{facebook-D6zpX69B.js → facebook-BnA-xxoO.js} +1 -1
- package/dist/{farcaster-ifhEe-N4.js → farcaster-CvgpGB8R.js} +1 -1
- package/dist/{filters-DkeDbJhM.js → filters-2DNvXC2d.js} +1 -1
- package/dist/{getChainIds-B9EIXuqY.js → getChainIds-BJOBostX.js} +2 -2
- package/dist/getCosmosAddress-nYlLagxO.js +8398 -0
- package/dist/{github-DBFD3-Hx.js → github-CqCIZfoi.js} +1 -1
- package/dist/{google-CoR2VD6q.js → google-Cb46Xe1N.js} +1 -1
- package/dist/{hamburger-Bw36etpI.js → hamburger-Cj81xHVG.js} +5 -5
- package/dist/{help-circle-DUrhwW6n.js → help-circle-BQm3Y4uL.js} +1 -1
- package/dist/{id-Bq9kGLxW.js → id-DlZAWXhX.js} +1 -1
- package/dist/{image-m0IwqZ1Z.js → image-C-Rdb3yG.js} +1 -1
- package/dist/{index-DOop9kfD.js → index-BEianCH_.js} +374 -349
- package/dist/{index-DbRR6GNq.js → index-BJtXFuWZ.js} +8 -7
- package/dist/{index-ZWAnsHEz.js → index-BKAQ3OTd.js} +11 -11
- package/dist/{index-D2EfKDiV.js → index-CPAph-rb.js} +4 -4
- package/dist/{index-C-aKTD_P.js → index-CUDhfiq5.js} +10 -10
- package/dist/{index-BsWWdDAF.js → index-CxxmgFkL.js} +1 -1
- package/dist/{index-Cdagj5-o.js → index-DD4yqUTK.js} +78 -78
- package/dist/index-DQ-upUtl.js +85050 -0
- package/dist/{index-CUx6_xcj.js → index-DeBuj-lE.js} +1 -1
- package/dist/{index-U2mQgSOl.js → index-N4PNqcjR.js} +2 -2
- package/dist/index-eC9_VgZe.js +3183 -0
- package/dist/{index.es-BYDUqEHk.js → index.es-BkvYD6Tp.js} +3032 -3244
- package/dist/{index.es-D8AzsbDB.js → index.es-DGhokHli.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-circle-Cpd8vFSP.js → info-circle-BweemjWa.js} +1 -1
- package/dist/{info-anm9CSBd.js → info-o_cb8tTT.js} +1 -1
- package/dist/{lightbulb-DPXldPzr.js → lightbulb-CIREQKfQ.js} +1 -1
- package/dist/{mail-r4sP3-4z.js → mail-D7pla8qN.js} +1 -1
- package/dist/{mobile-D0nLhS3C.js → mobile-BfSFqXTR.js} +1 -1
- package/dist/{more-BKn6NMxN.js → more-Cm2OZt-4.js} +1 -1
- package/dist/{network-placeholder-YBGnG39d.js → network-placeholder-cja_SKEh.js} +1 -1
- package/dist/{nftPlaceholder-B2s--N4I.js → nftPlaceholder-CPMGC0YA.js} +1 -1
- package/dist/{off-BMZ4jVAS.js → off-2ov8-cMg.js} +1 -1
- package/dist/{play-store-BjMQicZs.js → play-store-K7jF5Tx9.js} +1 -1
- package/dist/{plus-CYx41gPe.js → plus-D2hT5Tke.js} +1 -1
- package/dist/{qr-code-Drc3pJQ_.js → qr-code-DdAcFtyy.js} +1 -1
- package/dist/{recycle-horizontal-rWs7v9lF.js → recycle-horizontal-C_hgDyOE.js} +1 -1
- package/dist/{refresh-D2BcFG4j.js → refresh-DmHZ_uHs.js} +1 -1
- package/dist/{reown-logo-wUSSdW9D.js → reown-logo-C7Ew_uaV.js} +1 -1
- package/dist/{search-B-YtHXtd.js → search-DIQ1nJd8.js} +1 -1
- package/dist/{send-DLvL_BbY.js → send-oPtL6xIE.js} +1 -1
- package/dist/{swapHorizontal-D44_OZ9u.js → swapHorizontal-Csk-Etan.js} +1 -1
- package/dist/{swapHorizontalBold-Cep1eyxj.js → swapHorizontalBold-BcWknhY6.js} +1 -1
- package/dist/{swapHorizontalMedium-CwPNAHyv.js → swapHorizontalMedium-DmNmthd2.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-s5nQTCKq.js → swapHorizontalRoundedBold-Cqili0jK.js} +1 -1
- package/dist/{swapVertical-Bc1o38Xk.js → swapVertical-CmQhV1BW.js} +1 -1
- package/dist/{telegram-BW1hx271.js → telegram-8VqDFrbM.js} +1 -1
- package/dist/{three-dots-BY9EVUEH.js → three-dots-54YC22RW.js} +1 -1
- package/dist/{twitch-Cte3S7e8.js → twitch-BG66DH8z.js} +1 -1
- package/dist/{twitterIcon-CSNk9-ke.js → twitterIcon-B3TRjKnO.js} +1 -1
- package/dist/{unsupportedProp-7kgM9Qp3.js → unsupportedProp-DxJPUr4X.js} +1 -1
- package/dist/useRegisterError-RP3LuUvG.js +8913 -0
- package/dist/{verify-D1ht4LA_.js → verify-Cxrk9OZf.js} +1 -1
- package/dist/{verify-filled-dnv72m5L.js → verify-filled-DTYh5fHd.js} +1 -1
- package/dist/{w3m-modal-C6GoV_9z.js → w3m-modal-BtzAU8Rd.js} +2 -2
- package/dist/{wallet-Bprt1UAo.js → wallet-CqHzy9UL.js} +1 -1
- package/dist/{wallet-placeholder-Gxhin3eq.js → wallet-placeholder-DUpL8Wi-.js} +1 -1
- package/dist/{walletconnect-BtGZzptI.js → walletconnect-CMShOjhI.js} +1 -1
- package/dist/{warning-circle-Dg0PEAqK.js → warning-circle-C-6BUTdg.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-DvzFvpB5.js → x-Bs3i9yGj.js} +1 -1
- package/package.json +6 -2
- package/dist/EstGas-CObudv5z.js +0 -12661
- package/dist/QuotesProgress-DCNTk9oc.js +0 -28
- package/dist/TxnButton-DEs1au8L.js +0 -208
- package/dist/getCosmosAddress-CyskK48O.js +0 -9565
- package/dist/index-BcWL0DrD.js +0 -30399
- package/dist/index-BeQiCUcq.js +0 -3010
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/useRegisterError-JoAAYTsQ.js +0 -8812
@@ -1,28 +0,0 @@
|
|
1
|
-
import { jsxs as o, jsx as t, Fragment as m } from "react/jsx-runtime";
|
2
|
-
import { s as l } from "./WidgetForm.module-QHJ0-m5f.js";
|
3
|
-
import { u as g } from "./index-BcWL0DrD.js";
|
4
|
-
function u({ routesData: x, routes: a, quoteTimer: n, amount: c }) {
|
5
|
-
var s, b, d, w;
|
6
|
-
const r = g((i) => i.configuration), e = g((i) => i.gradient);
|
7
|
-
return c && !a.isFetching && typeof a.data < "u" && ((d = (b = (s = a.data) == null ? void 0 : s.data) == null ? void 0 : b.quotes) != null && d.length) ? /* @__PURE__ */ o("div", { className: "bw-flex bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
8
|
-
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "New Quote in" }),
|
9
|
-
/* @__PURE__ */ t("div", { className: " bw-w-[250px] bw-flex-1 bw-bg-border-primary bw-h-[3px] bw-overflow-x-hidden", children: /* @__PURE__ */ t(
|
10
|
-
"div",
|
11
|
-
{
|
12
|
-
style: {
|
13
|
-
height: "100%",
|
14
|
-
...r.gradientStyle,
|
15
|
-
width: `${100 - n / x.deadline * 100}%`
|
16
|
-
},
|
17
|
-
className: ` ${e || `${(w = r.gradientStyle) != null && w.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${l.overlay}`} bw-relative `
|
18
|
-
}
|
19
|
-
) }),
|
20
|
-
/* @__PURE__ */ o("div", { style: { ...r.gradientStyle }, className: `${e ? `${e} bw-bg-clip-text bw-text-transparent` : l.gradienttext} bw-relative bw-text-right bw-w-max bw-text-2xl bw-font-semibold bw-text-transparent `, children: [
|
21
|
-
n,
|
22
|
-
"s"
|
23
|
-
] })
|
24
|
-
] }) : /* @__PURE__ */ t(m, {});
|
25
|
-
}
|
26
|
-
export {
|
27
|
-
u as default
|
28
|
-
};
|
@@ -1,208 +0,0 @@
|
|
1
|
-
import { jsx as N } from "react/jsx-runtime";
|
2
|
-
import { useState as q, useEffect as P } from "react";
|
3
|
-
import { useSwitchNetwork as je, useDynamicContext as Ae, useIsLoggedIn as ze } from "@dynamic-labs/sdk-react-core";
|
4
|
-
import { a as we, u as T, az as ve, aA as Me } from "./index-BcWL0DrD.js";
|
5
|
-
import { s as f } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
-
import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as qe } from "wagmi";
|
7
|
-
import { u as ae, d as Pe, c as _e, C as oe } from "./useRegisterError-JoAAYTsQ.js";
|
8
|
-
import "./getCosmosAddress-CyskK48O.js";
|
9
|
-
import { v as He } from "./validError-CDlJpg_f.js";
|
10
|
-
import { u as Je, p as Ke } from "./index-DOop9kfD.js";
|
11
|
-
function Qe(n) {
|
12
|
-
const { wallet: h, address: g } = we(), [E, S] = q(0);
|
13
|
-
async function m() {
|
14
|
-
const A = await window.tronWeb.trx.getBalance(g);
|
15
|
-
S(A / Math.pow(10, 6));
|
16
|
-
}
|
17
|
-
return P(() => {
|
18
|
-
g && (n == null ? void 0 : n.networkType) === "tron" && m();
|
19
|
-
}, [g, n == null ? void 0 : n.networkType]), { tronBal: E };
|
20
|
-
}
|
21
|
-
function j(n) {
|
22
|
-
if (n.key.toLowerCase() === "backpacksol")
|
23
|
-
return !0;
|
24
|
-
}
|
25
|
-
function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: m, handleConfirmClose: A, balanceSol: L, getCoinBalance: be, handleSuccess: ue }) {
|
26
|
-
var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
|
27
|
-
const o = T((s) => s.gradient), x = T((s) => s.configuration), e = T((s) => s.fromChain), i = T((s) => s.fromCoin), r = T((s) => s.toChain), w = T((s) => s.toCoin), { isConnected: F, address: _, chain: I } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
|
28
|
-
chainData: e
|
29
|
-
}), { connected: H, address: J, disconnect: Ue } = we(), z = T((s) => s.toDisconnect), d = T((s) => s.customWallet), { getWallet: Ie } = ae({ chainData: e }), he = xe(e, r), [v, Te] = q("101"), { tronBal: M } = Qe(e), { cosmosBalance: K } = Je(), O = ((Y = e.chain) == null ? void 0 : Y.length) && ((Z = r.chain) == null ? void 0 : Z.length), R = ((W = i.address) == null ? void 0 : W.length) && ((k = w.address) == null ? void 0 : k.length), me = Pe(), Ne = ve(), { switchChain: Xe, switchChainAsync: fe, isPending: Be } = Ve({
|
30
|
-
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
31
|
-
config: pe,
|
32
|
-
throwForSwitchChainNotSupported: !0,
|
33
|
-
onError(s) {
|
34
|
-
He(s.message) && me({ module: "wallet-error-switch", error: s.message });
|
35
|
-
}
|
36
|
-
}), y = qe({
|
37
|
-
address: _,
|
38
|
-
token: "",
|
39
|
-
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
40
|
-
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
41
|
-
}), Q = _e(be || 0, 11), [l, a] = q({
|
42
|
-
text: "",
|
43
|
-
isGradient: !1,
|
44
|
-
color: "bw-bg-border-primary"
|
45
|
-
});
|
46
|
-
async function Ge() {
|
47
|
-
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
|
48
|
-
try {
|
49
|
-
await fe({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
50
|
-
} catch {
|
51
|
-
}
|
52
|
-
else if ((e == null ? void 0 : e.networkType) === "sol" && v !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
53
|
-
try {
|
54
|
-
let s = await ge({ wallet: b, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
55
|
-
U();
|
56
|
-
} catch {
|
57
|
-
}
|
58
|
-
else
|
59
|
-
Ne.emit(Me.TransactionStarted, {
|
60
|
-
...n
|
61
|
-
}), B && (ue(!1), A());
|
62
|
-
}
|
63
|
-
const { primaryWallet: b } = Ae(), V = ze(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = Ie(e)) == null ? void 0 : D.address) != null && C.length) : ye(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), U = async () => {
|
64
|
-
if (b)
|
65
|
-
try {
|
66
|
-
const s = await b.getNetwork();
|
67
|
-
Te(s);
|
68
|
-
} catch {
|
69
|
-
}
|
70
|
-
else
|
71
|
-
return;
|
72
|
-
};
|
73
|
-
P(() => {
|
74
|
-
U();
|
75
|
-
}, [b]);
|
76
|
-
function X(s, u) {
|
77
|
-
let p = s / Math.pow(10, u);
|
78
|
-
return p < 1e-6 ? p.toFixed(20) : p;
|
79
|
-
}
|
80
|
-
function Se() {
|
81
|
-
var s;
|
82
|
-
return Number(((s = y == null ? void 0 : y.data) == null ? void 0 : s.formatted) || 0);
|
83
|
-
}
|
84
|
-
function $e(s) {
|
85
|
-
var u;
|
86
|
-
return Number(((u = K[Ke(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
|
87
|
-
}
|
88
|
-
function Ee() {
|
89
|
-
var $;
|
90
|
-
let s = {};
|
91
|
-
function u(t, c) {
|
92
|
-
let G = Object.keys(s);
|
93
|
-
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 += X(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
|
94
|
-
amountInToken: c.amountInToken,
|
95
|
-
gas: X(c.amountInToken, t == null ? void 0 : t.decimals),
|
96
|
-
token: t,
|
97
|
-
nativeBal: (d == null ? void 0 : d.length) > 30 && !z && (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" ? M : (t == null ? void 0 : t.networkType) == "cosmos" ? $e(t) : Se(),
|
98
|
-
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
99
|
-
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 : G.length > 2 ? 3 : 2
|
100
|
-
};
|
101
|
-
}
|
102
|
-
($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
|
103
|
-
const { token: c } = t;
|
104
|
-
t.source.toLowerCase() == "from_source_wallet" && u(c, t);
|
105
|
-
});
|
106
|
-
let p = Q;
|
107
|
-
if (Number(g) > Number(p))
|
108
|
-
a({
|
109
|
-
text: `Insufficient Balance ${i.coin || ""}`,
|
110
|
-
isGradient: !1,
|
111
|
-
color: "bw-bg-border-primary"
|
112
|
-
});
|
113
|
-
else if ((y != null && y.isLoading || y.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !M && (e == null ? void 0 : e.networkType) === "tron")
|
114
|
-
a({
|
115
|
-
text: "Fetching Balance..",
|
116
|
-
isGradient: !1,
|
117
|
-
color: "bw-bg-border-primary"
|
118
|
-
});
|
119
|
-
else {
|
120
|
-
let t = Object.values(s).sort((c, G) => c.order - G.order);
|
121
|
-
t.some((c) => {
|
122
|
-
var G, de, le;
|
123
|
-
return c != null && c.isFromChain && Number(g) <= Number(p) && Number(c.nativeBal) - Number(g) < c.gas && (i != null && i.isNative) || Number(g) <= Number(p) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
|
124
|
-
text: `Insufficient ${((G = c == null ? void 0 : c.token) == null ? void 0 : G.symbol) || ""} for gas on ${c.token.blockchain}`,
|
125
|
-
isGradient: !1,
|
126
|
-
color: "bw-bg-border-primary"
|
127
|
-
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((de = c == null ? void 0 : c.token) == null ? void 0 : de.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
|
128
|
-
text: `Insufficient ${((le = c == null ? void 0 : c.token) == null ? void 0 : le.symbol) || ""} for gas on ${c.token.blockchain}`,
|
129
|
-
isGradient: !1,
|
130
|
-
color: "bw-bg-border-primary"
|
131
|
-
}), !0) : (a({
|
132
|
-
text: "",
|
133
|
-
isGradient: !0,
|
134
|
-
color: o || f.gradientbutton
|
135
|
-
}), !0);
|
136
|
-
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
137
|
-
text: "",
|
138
|
-
isGradient: !0,
|
139
|
-
color: o || f.gradientbutton
|
140
|
-
});
|
141
|
-
}
|
142
|
-
}
|
143
|
-
P(() => {
|
144
|
-
var s, u, p;
|
145
|
-
!i.coin.length || !(w != null && w.coin.length) ? a({
|
146
|
-
text: "Select Token",
|
147
|
-
isGradient: !0,
|
148
|
-
color: o || f.gradientbutton
|
149
|
-
}) : B ? typeof g < "u" && Number(g || 0) <= 0 ? a({
|
150
|
-
text: "Enter Amount",
|
151
|
-
isGradient: !1,
|
152
|
-
color: "bw-bg-border-primary"
|
153
|
-
}) : h.isFetching || !E ? a({
|
154
|
-
text: "Loading Routes...",
|
155
|
-
isGradient: !1,
|
156
|
-
color: "bw-bg-border-primary"
|
157
|
-
}) : e.chainId === "eclipse-svm" && !j(b) ? a({
|
158
|
-
text: `Select ${e.name} wallet`,
|
159
|
-
isGradient: !0,
|
160
|
-
color: o || f.gradientbutton
|
161
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? a({
|
162
|
-
text: "Enter recipient wallet address",
|
163
|
-
isGradient: !0,
|
164
|
-
color: o || f.gradientbutton
|
165
|
-
}) : (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && _ === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (b == null ? void 0 : b.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? a({
|
166
|
-
text: "From and To asset can not be the same!",
|
167
|
-
isGradient: !1,
|
168
|
-
color: "bw-bg-border-primary"
|
169
|
-
}) : (p = (u = (s = h == null ? void 0 : h.data) == null ? void 0 : s.data) == null ? void 0 : u.quotes) != null && p.length ? F && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id) && (e == null ? void 0 : e.networkType) === "evm" || V && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== v && (e == null ? void 0 : e.networkType) === "sol" ? a({
|
170
|
-
text: `Switch Chain to ${e.chain}`,
|
171
|
-
isGradient: !0,
|
172
|
-
color: o || f.gradientbutton
|
173
|
-
}) : Ee() : a({
|
174
|
-
text: "No Routes Found",
|
175
|
-
isGradient: !1,
|
176
|
-
color: "bw-bg-border-primary"
|
177
|
-
}) : a({
|
178
|
-
text: "",
|
179
|
-
isGradient: !0,
|
180
|
-
color: o || f.gradientbutton
|
181
|
-
});
|
182
|
-
}, [v, b, i, w, g, e, r, (ee = y.data) == null ? void 0 : ee.formatted, n, y.isFetching, y.isLoading, F, Q, B, h.isFetching, I == null ? void 0 : I.id, E, M, L, d, K]);
|
183
|
-
let Le = [`switch chain to ${(te = e.chain) == null ? void 0 : te.toLowerCase()}`, `select ${(se = e.chain) == null ? void 0 : se.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
|
184
|
-
function Fe() {
|
185
|
-
var s, u, p, $;
|
186
|
-
return B ? h.isFetching ? !0 : l.text.length ? !Le.includes((s = l.text) == null ? void 0 : s.toLowerCase()) : !(($ = (p = (u = h.data) == null ? void 0 : u.data) == null ? void 0 : p.quotes) != null && $.length) : !1;
|
187
|
-
}
|
188
|
-
return /* @__PURE__ */ N(
|
189
|
-
"button",
|
190
|
-
{
|
191
|
-
disabled: Fe(),
|
192
|
-
style: l != null && l.isGradient && O && R ? {
|
193
|
-
...x == null ? void 0 : x.gradientStyle,
|
194
|
-
boxShadow: x && x.customTheme && ((ce = (re = x.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
195
|
-
} : {
|
196
|
-
boxShadow: x && x.customTheme && ((ie = (ne = x.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
197
|
-
},
|
198
|
-
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${l != null && l.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${O && R && l.color} ${l.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${l != null && l.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
|
199
|
-
onClick: () => {
|
200
|
-
B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" && F || (e == null ? void 0 : e.networkType) !== "sol" && V && b !== null || (e == null ? void 0 : e.networkType) !== "tron" && H && J) && !z ? m("from") : F && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && H && J || z ? m("to") : m("from")), e.chainId === "eclipse-svm" && !j(b) ? (S(!0), m("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (S(!0), m("to")) : Ge();
|
201
|
-
},
|
202
|
-
children: /* @__PURE__ */ N("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__ */ N("p", { className: "bw-relative bw-z-20", children: O && R ? Be ? /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) : B ? l.text.length ? l.text : "Start Transaction" : `Connect ${he} Wallet` : /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
203
|
-
}
|
204
|
-
);
|
205
|
-
}
|
206
|
-
export {
|
207
|
-
nt as default
|
208
|
-
};
|