@blockend/widget 1.0.31 → 1.0.33
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-B04uZfaa.js +2209 -0
- package/dist/Box-BWDJCGbI.js +55 -0
- package/dist/EstGas-QSPrdq3Y.js +12863 -0
- package/dist/Grow-37t11tle.js +1656 -0
- package/dist/InputComp-bKVjlcbT.js +106 -0
- package/dist/LoadRoute-C3vokLk0.js +126 -0
- package/dist/QuotesProgress-DlgLQ2zo.js +28 -0
- package/dist/SwapAsset-tD6wSJDD.js +64 -0
- package/dist/Tooltip-BqYgFn1F.js +572 -0
- package/dist/TxnButton-DefErcCE.js +207 -0
- package/dist/WidgetForm.module-QHJ0-m5f.js +9 -0
- package/dist/{add-B8AfyNIx.js → add-D32G_xKI.js} +3 -3
- package/dist/{all-wallets-BaLLU39i.js → all-wallets-LjjqiTnJ.js} +3 -3
- package/dist/{app-store-DNpoABj1.js → app-store-S7C23kTz.js} +3 -3
- package/dist/{apple-DzzHtaL4.js → apple-DMd4RArz.js} +3 -3
- package/dist/{arrow-bottom-D2c13c51.js → arrow-bottom-C0cVMl2n.js} +3 -3
- package/dist/{arrow-bottom-circle-ls9OCLx1.js → arrow-bottom-circle-veMvHYVR.js} +3 -3
- package/dist/{arrow-left-BI3rQkNI.js → arrow-left-B6VdOxSY.js} +3 -3
- package/dist/{arrow-right-rnMzhVod.js → arrow-right-CyrokJyU.js} +3 -3
- package/dist/{arrow-top-CfA6PVMz.js → arrow-top-S8qh5z92.js} +3 -3
- package/dist/{bank-CmpAmHgg.js → bank-B9ySjxm-.js} +3 -3
- package/dist/basic-BXha5sM_.js +5783 -0
- package/dist/{browser-mEcjgS1H.js → browser-CWmyZDF1.js} +3 -3
- package/dist/{card-DkgIWcMc.js → card-TzoSVbiE.js} +3 -3
- package/dist/ccip-B97isPV8.js +228 -0
- package/dist/{checkmark-B_A013n2.js → checkmark-Be4tNZY8.js} +3 -3
- package/dist/{checkmark-bold-DestuG2T.js → checkmark-bold-sAoooMoy.js} +3 -3
- package/dist/{chevron-bottom-Di3S86dj.js → chevron-bottom-Cdd52Yir.js} +3 -3
- package/dist/{chevron-left-A9Wj-3tj.js → chevron-left-Dp8rM2qD.js} +3 -3
- package/dist/{chevron-right-UFxJogOZ.js → chevron-right-kH3Pgt8h.js} +3 -3
- package/dist/{chevron-top-BbZs3eaC.js → chevron-top-lx-9iWm1.js} +3 -3
- package/dist/{chrome-store-B4F6hJmy.js → chrome-store-BGxPgdkC.js} +3 -3
- package/dist/{clock-BbAQ09uV.js → clock-B3r9UiFY.js} +3 -3
- package/dist/clockIcon-C2W5xvyt.js +76 -0
- package/dist/{close-CY3oZP_D.js → close-Cc6SJ0A9.js} +3 -3
- package/dist/{coinPlaceholder-DpfsobZT.js → coinPlaceholder-DqH2n2v1.js} +3 -3
- package/dist/{compass-CHS7RZFk.js → compass-CiKYczAi.js} +3 -3
- package/dist/{copy-CEd4nGhs.js → copy-DR0dlbF5.js} +3 -3
- package/dist/core-D9oRINim.js +14967 -0
- package/dist/{cursor-transparent-Tm6k6Ws4.js → cursor-transparent-BABlb938.js} +3 -3
- package/dist/cursor-vv-pXAzC.js +7 -0
- package/dist/{desktop-CrSyXZkL.js → desktop-aFWdAU4O.js} +3 -3
- package/dist/{disconnect-BooT10E1.js → disconnect-Cz0MwjuJ.js} +3 -3
- package/dist/{discord-B982Qaml.js → discord-BkNiORDh.js} +3 -3
- package/dist/down-BAe_uoMx.js +606 -0
- package/dist/{etherscan-CFL0IcNl.js → etherscan-4wT3rhj5.js} +3 -3
- package/dist/ethertousd-CC_ezooz.js +6 -0
- package/dist/{exclamation-triangle-BBeGXYgt.js → exclamation-triangle-CSv7sjYs.js} +3 -3
- package/dist/{extension-C5WqJw73.js → extension-B4acJb16.js} +3 -3
- package/dist/{external-link-CcSxVDcd.js → external-link-zFdRyGh8.js} +3 -3
- package/dist/{facebook-DF0v9ED8.js → facebook-D2h4REjy.js} +3 -3
- package/dist/{farcaster-Boq7M4VK.js → farcaster-acRwWMSn.js} +3 -3
- package/dist/{filters-DfeymbPx.js → filters-DE1yHCJy.js} +3 -3
- package/dist/getChainIds-B4BLdhKd.js +1888 -0
- package/dist/getCosmosAddress-BfMdDDaH.js +9565 -0
- package/dist/{github-DQ8FV4bD.js → github-BrCBPjDS.js} +3 -3
- package/dist/{google-Dm8FDDZR.js → google-DYC6Um96.js} +3 -3
- package/dist/hamburger-sg42nvNd.js +3915 -0
- package/dist/{help-circle-CbgiAebR.js → help-circle-CKvIeM4J.js} +3 -3
- package/dist/{id-CzqxUksI.js → id-FXzF1V3L.js} +3 -3
- package/dist/{image-CsCGTIN-.js → image-rOZMtN9o.js} +3 -3
- package/dist/index-B0E-rGOh.js +159 -0
- package/dist/index-B5gV3APh.js +992 -0
- package/dist/index-CDq3vNnP.js +22 -0
- package/dist/index-CIjTGwYH.js +9 -0
- package/dist/index-Cmj3dp3U.js +473 -0
- package/dist/index-DEovHqJS.js +3010 -0
- package/dist/index-DOcwHfd3.js +13583 -0
- package/dist/index-DSlXIHtr.js +28701 -0
- package/dist/index-DTish3yr.js +1014 -0
- package/dist/index-PIAjHNgG.js +18613 -0
- package/dist/index-SiMIoFT9.js +331 -0
- package/dist/index-Y94UWILI.js +1460 -0
- package/dist/index-baetUfmH.js +252 -0
- package/dist/index.es-D6RvS0tB.js +366 -0
- package/dist/index.es-TLoHC_Sf.js +11678 -0
- package/dist/index.es.js +4 -4
- package/dist/{info-circle-Bt350Yzj.js → info-circle-BYfEprqC.js} +3 -3
- package/dist/{info-fKCfLW0k.js → info-dh7qmm_R.js} +3 -3
- package/dist/{lightbulb-BL9YBxiA.js → lightbulb-3S8w5B31.js} +3 -3
- package/dist/{mail-_g6CHQeQ.js → mail-DgcPoOPs.js} +3 -3
- package/dist/{mobile-B-EQ4IcH.js → mobile-C8egRR0V.js} +3 -3
- package/dist/{more-C3rpOdUy.js → more-CU_oPwwY.js} +3 -3
- package/dist/{network-placeholder-D9Ak7Xj_.js → network-placeholder-CqjaxlS7.js} +3 -3
- package/dist/{nftPlaceholder-CIIm2V_o.js → nftPlaceholder-D6mZlZmz.js} +3 -3
- package/dist/{off-DZjgI0eE.js → off-DHeUICx6.js} +3 -3
- package/dist/{play-store-DvRnagoF.js → play-store-DyGxjYv5.js} +3 -3
- package/dist/{plus-C2jN2huZ.js → plus-k4hEdLAH.js} +3 -3
- package/dist/{qr-code-B64HnZgi.js → qr-code-CkavLc0Z.js} +3 -3
- package/dist/{recycle-horizontal-CovcJGa_.js → recycle-horizontal-YzkyX2fY.js} +3 -3
- package/dist/{refresh-J1Vw6QMA.js → refresh-E1vpdqCO.js} +3 -3
- package/dist/{reown-logo-BsXoZ3KT.js → reown-logo-BZbc_-R6.js} +3 -3
- package/dist/{search-BC86wYXR.js → search-B9vQkIsQ.js} +3 -3
- package/dist/{send-BPA1bK5G.js → send-C9ROxhya.js} +3 -3
- package/dist/shareicon-CLveBf8l.js +262 -0
- package/dist/{sortDown-cDA6MpOw.js → sortDown-CjBaDQTU.js} +13 -13
- package/dist/{swapHorizontal-47_8ePle.js → swapHorizontal-BhLDDuiL.js} +3 -3
- package/dist/{swapHorizontalBold-CJ7TzeQP.js → swapHorizontalBold-B1IxJLem.js} +3 -3
- package/dist/{swapHorizontalMedium-CTACgUR9.js → swapHorizontalMedium--fvn_6KH.js} +3 -3
- package/dist/{swapHorizontalRoundedBold-Ht3_LABp.js → swapHorizontalRoundedBold-fZowAp5m.js} +3 -3
- package/dist/{swapVertical-DlS0V6DD.js → swapVertical-CDwndQ4s.js} +3 -3
- package/dist/{telegram-UZ00kvIE.js → telegram-BLbguJ3E.js} +3 -3
- package/dist/{three-dots-D9zVXr1j.js → three-dots-DyIG0Aiq.js} +3 -3
- package/dist/truncate-D9t92mVX.js +7 -0
- package/dist/{twitch-CP6rpz4m.js → twitch-054mPrps.js} +3 -3
- package/dist/{twitterIcon-Cm3I3FRU.js → twitterIcon-DrlgKmas.js} +3 -3
- package/dist/unsupportedProp-Dr6Tadlk.js +10 -0
- package/dist/useRegisterError-C52MuupC.js +9857 -0
- package/dist/validError-CDlJpg_f.js +6 -0
- package/dist/{verify-filled-CfgydKPa.js → verify-filled-Dw1_4VEj.js} +3 -3
- package/dist/{verify-DuUE85WT.js → verify-uz7q7EMX.js} +3 -3
- package/dist/w3m-modal-CJM8um8G.js +1471 -0
- package/dist/{wallet-BC2LSDlF.js → wallet-a9cCMI05.js} +3 -3
- package/dist/{wallet-placeholder-DugEJ7xM.js → wallet-placeholder-Cqiz2_rA.js} +3 -3
- package/dist/{walletconnect-wayCaYfk.js → walletconnect-96twp7MP.js} +7 -9
- package/dist/{warning-circle-Cy9YuvwU.js → warning-circle-C4mV6fIZ.js} +3 -3
- package/dist/{x-jggPFiy-.js → x-vRe7FHUS.js} +3 -3
- package/package.json +7 -19
- package/dist/AllRoutes-Bdi5ZW8W.js +0 -2604
- package/dist/Box-e4gA-y_H.js +0 -60
- package/dist/EstGas-C5ihS0Mw.js +0 -17108
- package/dist/Grow-B4K-I-E-.js +0 -2212
- package/dist/InputComp-C_UUZxNU.js +0 -114
- package/dist/LoadRoute-CnDhVKdh.js +0 -142
- package/dist/QuotesProgress-DxgPgPJE.js +0 -29
- package/dist/SwapAsset-CmmuxeQF.js +0 -65
- package/dist/Tooltip-D8YjOOKU.js +0 -718
- package/dist/TxnButton-CF-TLZrD.js +0 -302
- package/dist/WidgetForm.module-DhUUlwZP.js +0 -13
- package/dist/basic-Cx2xxgd9.js +0 -7109
- package/dist/ccip-BKpquA5i.js +0 -250
- package/dist/clockIcon-jSNFFrLy.js +0 -76
- package/dist/core-C-gr9X18.js +0 -17217
- package/dist/cursor-BTtIlTHP.js +0 -7
- package/dist/down-DDk8OoJG.js +0 -809
- package/dist/ethertousd-BOknTgU4.js +0 -7
- package/dist/getChainIds-6iugk2h0.js +0 -2431
- package/dist/getCosmosAddress-BgD5iV6f.js +0 -13998
- package/dist/hamburger-BYe_G11E.js +0 -4562
- package/dist/index-BAmjBHYR.js +0 -1087
- package/dist/index-BxHeZ9IF.js +0 -543
- package/dist/index-C7cb2O7r.js +0 -16078
- package/dist/index-CF9p4S_X.js +0 -11
- package/dist/index-C_vo1L7p.js +0 -24384
- package/dist/index-Ch7w83dW.js +0 -4217
- package/dist/index-Crhenmgw.js +0 -188
- package/dist/index-Cz5Dosd2.js +0 -412
- package/dist/index-D5OnT-__.js +0 -35858
- package/dist/index-DArR1lwi.js +0 -1759
- package/dist/index-hEJSpZe-.js +0 -308
- package/dist/index-m2O0cbD8.js +0 -1883
- package/dist/index-sLx4Edw4.js +0 -22
- package/dist/index.es-DIbGJsfa.js +0 -475
- package/dist/index.es-t6sHlseh.js +0 -12916
- package/dist/secp256k1-BkBK0mD5.js +0 -1681
- package/dist/shareicon-C88Wx-AM.js +0 -314
- package/dist/truncate-DSxFWEga.js +0 -7
- package/dist/unsupportedProp-DkeDzLfM.js +0 -14
- package/dist/useRegisterError-W_UfecIN.js +0 -19288
- package/dist/validError-rariWQ7G.js +0 -14
- package/dist/w3m-modal-Bl-DPlah.js +0 -1721
@@ -0,0 +1,207 @@
|
|
1
|
+
import { jsx as N } from "react/jsx-runtime";
|
2
|
+
import { useState as q, useEffect as P } from "react";
|
3
|
+
import { useSwitchNetwork as Fe, useDynamicContext as je, useIsLoggedIn as ve } from "@dynamic-labs/sdk-react-core";
|
4
|
+
import { a as we, u as T, aG as ze, aH as Ae } from "./index-DSlXIHtr.js";
|
5
|
+
import { s as f } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
+
import { useAccount as Me, useSwitchChain as Oe, useBalance as Re } from "wagmi";
|
7
|
+
import { u as ae, k as Ve, j as qe, C as oe } from "./useRegisterError-C52MuupC.js";
|
8
|
+
import "./getCosmosAddress-BfMdDDaH.js";
|
9
|
+
import { v as Pe } from "./validError-CDlJpg_f.js";
|
10
|
+
import { u as _e, p as He } from "./index-Y94UWILI.js";
|
11
|
+
function Je(n) {
|
12
|
+
const { wallet: h, address: g } = we(), [E, G] = q(0);
|
13
|
+
async function m() {
|
14
|
+
const v = await window.tronWeb.trx.getBalance(g);
|
15
|
+
G(v / 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 st({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowWallet: G, setConnectWalletField: m, handleConfirmClose: v, 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 } = Me(), pe = Fe(), { getBothWalletConnection: ge, getConnectWallet: ye } = ae({
|
28
|
+
chainData: e
|
29
|
+
}), { connected: H, address: J, disconnect: Ke } = we(), z = T((s) => s.toDisconnect), d = T((s) => s.customWallet), { getWallet: xe } = ae({ chainData: e }), Ie = ye(e, r), [A, he] = q("101"), { tronBal: M } = Je(e), { cosmosBalance: K } = _e(), 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), Te = Ve(), me = ze(), { switchChain: Ne, isPending: fe } = Oe({
|
30
|
+
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
31
|
+
throwForSwitchChainNotSupported: !0,
|
32
|
+
onError(s) {
|
33
|
+
Pe(s.message) && Te({ module: "wallet-error-switch", error: s.message });
|
34
|
+
}
|
35
|
+
}), y = Re({
|
36
|
+
address: _,
|
37
|
+
token: "",
|
38
|
+
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
39
|
+
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
40
|
+
}), Q = qe(be || 0, 11), [l, a] = q({
|
41
|
+
text: "",
|
42
|
+
isGradient: !1,
|
43
|
+
color: "bw-bg-border-primary"
|
44
|
+
});
|
45
|
+
async function Be() {
|
46
|
+
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
|
47
|
+
try {
|
48
|
+
Ne({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
49
|
+
} catch {
|
50
|
+
}
|
51
|
+
else if ((e == null ? void 0 : e.networkType) === "sol" && A !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
52
|
+
try {
|
53
|
+
let s = await pe({ wallet: b, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
54
|
+
U();
|
55
|
+
} catch {
|
56
|
+
}
|
57
|
+
else
|
58
|
+
me.emit(Ae.TransactionStarted, {
|
59
|
+
...n
|
60
|
+
}), ue(!1), v();
|
61
|
+
}
|
62
|
+
const { primaryWallet: b } = je(), V = ve(), S = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = xe(e)) == null ? void 0 : D.address) != null && C.length) : ge(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), U = async () => {
|
63
|
+
if (b)
|
64
|
+
try {
|
65
|
+
const s = await b.getNetwork();
|
66
|
+
he(s);
|
67
|
+
} catch {
|
68
|
+
}
|
69
|
+
else
|
70
|
+
return;
|
71
|
+
};
|
72
|
+
P(() => {
|
73
|
+
U();
|
74
|
+
}, [b]);
|
75
|
+
function X(s, u) {
|
76
|
+
let p = s / Math.pow(10, u);
|
77
|
+
return p < 1e-6 ? p.toFixed(20) : p;
|
78
|
+
}
|
79
|
+
function Ge() {
|
80
|
+
var s;
|
81
|
+
return Number(((s = y == null ? void 0 : y.data) == null ? void 0 : s.formatted) || 0);
|
82
|
+
}
|
83
|
+
function Se(s) {
|
84
|
+
var u;
|
85
|
+
return Number(((u = K[He(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
|
86
|
+
}
|
87
|
+
function $e() {
|
88
|
+
var $;
|
89
|
+
let s = {};
|
90
|
+
function u(t, c) {
|
91
|
+
let B = Object.keys(s);
|
92
|
+
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] = {
|
93
|
+
amountInToken: c.amountInToken,
|
94
|
+
gas: X(c.amountInToken, t == null ? void 0 : t.decimals),
|
95
|
+
token: t,
|
96
|
+
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" ? Se(t) : Ge(),
|
97
|
+
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
98
|
+
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 : B.length > 2 ? 3 : 2
|
99
|
+
};
|
100
|
+
}
|
101
|
+
($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
|
102
|
+
const { token: c } = t;
|
103
|
+
t.source.toLowerCase() == "from_source_wallet" && u(c, t);
|
104
|
+
});
|
105
|
+
let p = Q;
|
106
|
+
if (Number(g) > Number(p))
|
107
|
+
a({
|
108
|
+
text: `Insufficient Balance ${i.coin || ""}`,
|
109
|
+
isGradient: !1,
|
110
|
+
color: "bw-bg-border-primary"
|
111
|
+
});
|
112
|
+
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")
|
113
|
+
a({
|
114
|
+
text: "Fetching Balance..",
|
115
|
+
isGradient: !1,
|
116
|
+
color: "bw-bg-border-primary"
|
117
|
+
});
|
118
|
+
else {
|
119
|
+
let t = Object.values(s).sort((c, B) => c.order - B.order);
|
120
|
+
t.some((c) => {
|
121
|
+
var B, de, le;
|
122
|
+
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({
|
123
|
+
text: `Insufficient ${((B = c == null ? void 0 : c.token) == null ? void 0 : B.symbol) || ""} for gas on ${c.token.blockchain}`,
|
124
|
+
isGradient: !1,
|
125
|
+
color: "bw-bg-border-primary"
|
126
|
+
}), !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({
|
127
|
+
text: `Insufficient ${((le = c == null ? void 0 : c.token) == null ? void 0 : le.symbol) || ""} for gas on ${c.token.blockchain}`,
|
128
|
+
isGradient: !1,
|
129
|
+
color: "bw-bg-border-primary"
|
130
|
+
}), !0) : (a({
|
131
|
+
text: "",
|
132
|
+
isGradient: !0,
|
133
|
+
color: o || f.gradientbutton
|
134
|
+
}), !0);
|
135
|
+
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
136
|
+
text: "",
|
137
|
+
isGradient: !0,
|
138
|
+
color: o || f.gradientbutton
|
139
|
+
});
|
140
|
+
}
|
141
|
+
}
|
142
|
+
P(() => {
|
143
|
+
var s, u, p;
|
144
|
+
!i.coin.length || !(w != null && w.coin.length) ? a({
|
145
|
+
text: "Select Token",
|
146
|
+
isGradient: !0,
|
147
|
+
color: o || f.gradientbutton
|
148
|
+
}) : S ? typeof g < "u" && Number(g || 0) <= 0 ? a({
|
149
|
+
text: "Enter Amount",
|
150
|
+
isGradient: !1,
|
151
|
+
color: "bw-bg-border-primary"
|
152
|
+
}) : h.isFetching || !E ? a({
|
153
|
+
text: "Loading Routes...",
|
154
|
+
isGradient: !1,
|
155
|
+
color: "bw-bg-border-primary"
|
156
|
+
}) : e.chainId === "eclipse-svm" && !j(b) ? a({
|
157
|
+
text: `Select ${e.name} wallet`,
|
158
|
+
isGradient: !0,
|
159
|
+
color: o || f.gradientbutton
|
160
|
+
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? a({
|
161
|
+
text: "Enter recipient wallet address",
|
162
|
+
isGradient: !0,
|
163
|
+
color: o || f.gradientbutton
|
164
|
+
}) : (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({
|
165
|
+
text: "From and To asset can not be the same!",
|
166
|
+
isGradient: !1,
|
167
|
+
color: "bw-bg-border-primary"
|
168
|
+
}) : (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") !== A && (e == null ? void 0 : e.networkType) === "sol" ? a({
|
169
|
+
text: `Switch Chain to ${e.chain}`,
|
170
|
+
isGradient: !0,
|
171
|
+
color: o || f.gradientbutton
|
172
|
+
}) : $e() : a({
|
173
|
+
text: "No Routes Found",
|
174
|
+
isGradient: !1,
|
175
|
+
color: "bw-bg-border-primary"
|
176
|
+
}) : a({
|
177
|
+
text: "",
|
178
|
+
isGradient: !0,
|
179
|
+
color: o || f.gradientbutton
|
180
|
+
});
|
181
|
+
}, [A, b, i, w, g, e, r, (ee = y.data) == null ? void 0 : ee.formatted, n, y.isFetching, y.isLoading, F, Q, S, h.isFetching, I == null ? void 0 : I.id, E, M, L, d, K]);
|
182
|
+
let Ee = [`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"];
|
183
|
+
function Le() {
|
184
|
+
var s, u, p, $;
|
185
|
+
return S ? h.isFetching ? !0 : l.text.length ? !Ee.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;
|
186
|
+
}
|
187
|
+
return /* @__PURE__ */ N(
|
188
|
+
"button",
|
189
|
+
{
|
190
|
+
disabled: Le(),
|
191
|
+
style: l != null && l.isGradient && O && R ? {
|
192
|
+
...x == null ? void 0 : x.gradientStyle,
|
193
|
+
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)"
|
194
|
+
} : {
|
195
|
+
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)"
|
196
|
+
},
|
197
|
+
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"}`,
|
198
|
+
onClick: () => {
|
199
|
+
S || (G(!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) ? (G(!0), m("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (G(!0), m("to")) : Be();
|
200
|
+
},
|
201
|
+
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 ? fe ? /* @__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" }) }) : S ? l.text.length ? l.text : "Start Transaction" : `Connect ${Ie} 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" }) }) }) })
|
202
|
+
}
|
203
|
+
);
|
204
|
+
}
|
205
|
+
export {
|
206
|
+
st as default
|
207
|
+
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as l } from "./core-D9oRINim.js";
|
2
|
+
const o = l`<svg
|
3
3
|
width="14"
|
4
4
|
height="14"
|
5
5
|
viewBox="0 0 14 14"
|
@@ -15,5 +15,5 @@ const addSvg = b`<svg
|
|
15
15
|
/></svg
|
16
16
|
>`;
|
17
17
|
export {
|
18
|
-
addSvg
|
18
|
+
o as addSvg
|
19
19
|
};
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as a } from "./core-D9oRINim.js";
|
2
|
+
const o = a`<svg fill="none" viewBox="0 0 24 24">
|
3
3
|
<path
|
4
4
|
style="fill: var(--wui-color-accent-100);"
|
5
5
|
d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
|
6
6
|
/>
|
7
7
|
</svg>`;
|
8
8
|
export {
|
9
|
-
allWalletsSvg
|
9
|
+
o as allWalletsSvg
|
10
10
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as a } from "./core-D9oRINim.js";
|
2
|
+
const e = a`
|
3
3
|
<svg width="36" height="36">
|
4
4
|
<path
|
5
5
|
d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
|
@@ -17,5 +17,5 @@ const appStoreSvg = b`
|
|
17
17
|
</defs>
|
18
18
|
</svg>`;
|
19
19
|
export {
|
20
|
-
appStoreSvg
|
20
|
+
e as appStoreSvg
|
21
21
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as l } from "./core-D9oRINim.js";
|
2
|
+
const f = l`<svg fill="none" viewBox="0 0 40 40">
|
3
3
|
<g clip-path="url(#a)">
|
4
4
|
<g clip-path="url(#b)">
|
5
5
|
<circle cx="20" cy="19.89" r="20" fill="#000" />
|
@@ -18,5 +18,5 @@ const appleSvg = b`<svg fill="none" viewBox="0 0 40 40">
|
|
18
18
|
</defs>
|
19
19
|
</svg>`;
|
20
20
|
export {
|
21
|
-
appleSvg
|
21
|
+
f as appleSvg
|
22
22
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as o } from "./core-D9oRINim.js";
|
2
|
+
const e = o`<svg fill="none" viewBox="0 0 14 15">
|
3
3
|
<path
|
4
4
|
fill="currentColor"
|
5
5
|
fill-rule="evenodd"
|
@@ -8,5 +8,5 @@ const arrowBottomSvg = b`<svg fill="none" viewBox="0 0 14 15">
|
|
8
8
|
/>
|
9
9
|
</svg>`;
|
10
10
|
export {
|
11
|
-
arrowBottomSvg
|
11
|
+
e as arrowBottomSvg
|
12
12
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as C } from "./core-D9oRINim.js";
|
2
|
+
const e = C`<svg
|
3
3
|
fill="none"
|
4
4
|
viewBox="0 0 21 20"
|
5
5
|
>
|
@@ -11,5 +11,5 @@ const arrowBottomCircleSvg = b`<svg
|
|
11
11
|
/></svg
|
12
12
|
>`;
|
13
13
|
export {
|
14
|
-
arrowBottomCircleSvg
|
14
|
+
e as arrowBottomCircleSvg
|
15
15
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as e } from "./core-D9oRINim.js";
|
2
|
+
const o = e`<svg fill="none" viewBox="0 0 14 15">
|
3
3
|
<path
|
4
4
|
fill="currentColor"
|
5
5
|
fill-rule="evenodd"
|
@@ -8,5 +8,5 @@ const arrowLeftSvg = b`<svg fill="none" viewBox="0 0 14 15">
|
|
8
8
|
/>
|
9
9
|
</svg>`;
|
10
10
|
export {
|
11
|
-
arrowLeftSvg
|
11
|
+
o as arrowLeftSvg
|
12
12
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as l } from "./core-D9oRINim.js";
|
2
|
+
const e = l`<svg fill="none" viewBox="0 0 14 15">
|
3
3
|
<path
|
4
4
|
fill="currentColor"
|
5
5
|
fill-rule="evenodd"
|
@@ -8,5 +8,5 @@ const arrowRightSvg = b`<svg fill="none" viewBox="0 0 14 15">
|
|
8
8
|
/>
|
9
9
|
</svg>`;
|
10
10
|
export {
|
11
|
-
arrowRightSvg
|
11
|
+
e as arrowRightSvg
|
12
12
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as o } from "./core-D9oRINim.js";
|
2
|
+
const e = o`<svg fill="none" viewBox="0 0 14 15">
|
3
3
|
<path
|
4
4
|
fill="currentColor"
|
5
5
|
fill-rule="evenodd"
|
@@ -8,5 +8,5 @@ const arrowTopSvg = b`<svg fill="none" viewBox="0 0 14 15">
|
|
8
8
|
/>
|
9
9
|
</svg>`;
|
10
10
|
export {
|
11
|
-
arrowTopSvg
|
11
|
+
e as arrowTopSvg
|
12
12
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { m as
|
2
|
-
const
|
1
|
+
import { m as e } from "./core-D9oRINim.js";
|
2
|
+
const o = e`<svg
|
3
3
|
xmlns="http://www.w3.org/2000/svg"
|
4
4
|
width="12"
|
5
5
|
height="13"
|
@@ -14,5 +14,5 @@ const bankSvg = b`<svg
|
|
14
14
|
/></svg
|
15
15
|
>`;
|
16
16
|
export {
|
17
|
-
bankSvg
|
17
|
+
o as bankSvg
|
18
18
|
};
|