@blockend/widget 1.0.33 → 1.0.34
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 → AllRoutes-DW-2t6-d.js} +25 -25
- package/dist/{Box-BWDJCGbI.js → Box-C4X6PUtu.js} +22 -23
- package/dist/{EstGas-QSPrdq3Y.js → EstGas-Lj2vKAmO.js} +8 -8
- package/dist/{Grow-37t11tle.js → Grow-CCS_DglL.js} +78 -78
- package/dist/{InputComp-bKVjlcbT.js → InputComp-FIX0Q9qG.js} +13 -14
- package/dist/{LoadRoute-C3vokLk0.js → LoadRoute-Di4rBHfs.js} +6 -7
- package/dist/{QuotesProgress-DlgLQ2zo.js → QuotesProgress-CDe2mdH1.js} +1 -1
- package/dist/{SwapAsset-tD6wSJDD.js → SwapAsset-B0GIHqge.js} +1 -1
- package/dist/{Tooltip-BqYgFn1F.js → Tooltip-CsLgOKrX.js} +62 -62
- package/dist/{TxnButton-DefErcCE.js → TxnButton-CFquc6ws.js} +17 -17
- package/dist/{add-D32G_xKI.js → add-Cb5Hpxtd.js} +1 -1
- package/dist/{all-wallets-LjjqiTnJ.js → all-wallets-IvJFyonp.js} +1 -1
- package/dist/{app-store-S7C23kTz.js → app-store-DGHaTAGg.js} +1 -1
- package/dist/{apple-DMd4RArz.js → apple-BzfrhDcG.js} +1 -1
- package/dist/{arrow-bottom-C0cVMl2n.js → arrow-bottom-BTM5yMbs.js} +1 -1
- package/dist/{arrow-bottom-circle-veMvHYVR.js → arrow-bottom-circle-wJZrQ1UB.js} +1 -1
- package/dist/{arrow-left-B6VdOxSY.js → arrow-left-yb9jvZLF.js} +1 -1
- package/dist/{arrow-right-CyrokJyU.js → arrow-right-CNq-seAV.js} +1 -1
- package/dist/{arrow-top-S8qh5z92.js → arrow-top-viS3mMCD.js} +1 -1
- package/dist/{bank-B9ySjxm-.js → bank-BCcggibH.js} +1 -1
- package/dist/{basic-BXha5sM_.js → basic-DaTq2wkc.js} +3 -3
- package/dist/{browser-CWmyZDF1.js → browser-CmA0GPLB.js} +1 -1
- package/dist/{card-TzoSVbiE.js → card-BO4I6Psi.js} +1 -1
- package/dist/{ccip-B97isPV8.js → ccip-CkXLKCYn.js} +20 -20
- package/dist/{checkmark-Be4tNZY8.js → checkmark-DF8VoFaX.js} +1 -1
- package/dist/{checkmark-bold-sAoooMoy.js → checkmark-bold-C6OPR-mV.js} +1 -1
- package/dist/{chevron-bottom-Cdd52Yir.js → chevron-bottom-BTjaTIFm.js} +1 -1
- package/dist/{chevron-left-Dp8rM2qD.js → chevron-left-D6wphcsV.js} +1 -1
- package/dist/{chevron-right-kH3Pgt8h.js → chevron-right-Ba05aF4G.js} +1 -1
- package/dist/{chevron-top-lx-9iWm1.js → chevron-top-I_q0NhsC.js} +1 -1
- package/dist/{chrome-store-BGxPgdkC.js → chrome-store-DvzERGX1.js} +1 -1
- package/dist/{clock-B3r9UiFY.js → clock-GIv_XdGS.js} +1 -1
- package/dist/{close-Cc6SJ0A9.js → close-ChDp2HIX.js} +1 -1
- package/dist/{coinPlaceholder-DqH2n2v1.js → coinPlaceholder-D6rBGR5B.js} +1 -1
- package/dist/{compass-CiKYczAi.js → compass-DFCkTDdC.js} +1 -1
- package/dist/{copy-DR0dlbF5.js → copy-DyQCksHx.js} +1 -1
- package/dist/{core-D9oRINim.js → core-BnRPnZUj.js} +3 -3
- package/dist/{cursor-vv-pXAzC.js → cursor-BhR8wfWc.js} +1 -1
- package/dist/{cursor-transparent-BABlb938.js → cursor-transparent-CYfTh9TG.js} +1 -1
- package/dist/{desktop-aFWdAU4O.js → desktop-CdNR2WGz.js} +1 -1
- package/dist/{disconnect-Cz0MwjuJ.js → disconnect-Bbfhuf4x.js} +1 -1
- package/dist/{discord-BkNiORDh.js → discord-04uw628s.js} +1 -1
- package/dist/{down-BAe_uoMx.js → down-DmSxEW66.js} +2 -2
- package/dist/{etherscan-4wT3rhj5.js → etherscan-D7Ga60vG.js} +1 -1
- package/dist/{exclamation-triangle-CSv7sjYs.js → exclamation-triangle-CMEJoc37.js} +1 -1
- package/dist/{extension-B4acJb16.js → extension-C0IOh4C8.js} +1 -1
- package/dist/{external-link-zFdRyGh8.js → external-link-CEy2KY-H.js} +1 -1
- package/dist/{facebook-D2h4REjy.js → facebook-XHE6-OiD.js} +1 -1
- package/dist/{farcaster-acRwWMSn.js → farcaster-BVsAZpup.js} +1 -1
- package/dist/{filters-DE1yHCJy.js → filters-BjuqhDXY.js} +1 -1
- package/dist/{getChainIds-B4BLdhKd.js → getChainIds-cRV7v4Vu.js} +75 -75
- package/dist/{getCosmosAddress-BfMdDDaH.js → getCosmosAddress-Cm0YEa9v.js} +2 -2
- package/dist/{github-BrCBPjDS.js → github-C5YGtlqc.js} +1 -1
- package/dist/{google-DYC6Um96.js → google-DFDexaN0.js} +1 -1
- package/dist/{hamburger-sg42nvNd.js → hamburger-CZPNB-Jp.js} +20 -20
- package/dist/{help-circle-CKvIeM4J.js → help-circle-C2OFxIs0.js} +1 -1
- package/dist/{id-FXzF1V3L.js → id-CforGy9u.js} +1 -1
- package/dist/{image-rOZMtN9o.js → image-BLq9nQ13.js} +1 -1
- package/dist/{index-CIjTGwYH.js → index-BRrWKwgI.js} +1 -1
- package/dist/{index-B0E-rGOh.js → index-Bw4t164c.js} +45 -45
- package/dist/{index-PIAjHNgG.js → index-ByWf22Y4.js} +43 -43
- package/dist/{index-DSlXIHtr.js → index-C6pDnqRd.js} +11887 -10132
- package/dist/{index-Y94UWILI.js → index-Cx-XaRo6.js} +123 -123
- package/dist/{index-SiMIoFT9.js → index-D7-VO30b.js} +22 -23
- package/dist/{index-B5gV3APh.js → index-DKPTk58K.js} +78 -78
- package/dist/{index-baetUfmH.js → index-DrWi5MDR.js} +4 -4
- package/dist/{index-Cmj3dp3U.js → index-EuXqE26M.js} +53 -54
- package/dist/{index-DEovHqJS.js → index-HOk_h4cO.js} +14 -14
- package/dist/{index-DOcwHfd3.js → index-sSdagBAC.js} +93 -93
- package/dist/{index.es-TLoHC_Sf.js → index.es-B1r2oZcy.js} +2 -2
- package/dist/{index.es-D6RvS0tB.js → index.es-DP4lrxUS.js} +5 -5
- package/dist/index.es.js +1 -1
- package/dist/{info-dh7qmm_R.js → info-CJ1NTOxH.js} +1 -1
- package/dist/{info-circle-BYfEprqC.js → info-circle-Daj7vZoR.js} +1 -1
- package/dist/{lightbulb-3S8w5B31.js → lightbulb-BLkY2HTh.js} +1 -1
- package/dist/{mail-DgcPoOPs.js → mail-CAKz4cbl.js} +1 -1
- package/dist/{mobile-C8egRR0V.js → mobile-BopKRCBe.js} +1 -1
- package/dist/{more-CU_oPwwY.js → more-X_2v_wZ3.js} +1 -1
- package/dist/{network-placeholder-CqjaxlS7.js → network-placeholder-C1OcyWkc.js} +1 -1
- package/dist/{nftPlaceholder-D6mZlZmz.js → nftPlaceholder-B3ZKQ1U2.js} +1 -1
- package/dist/{off-DHeUICx6.js → off-OZ4tqosO.js} +1 -1
- package/dist/{play-store-DyGxjYv5.js → play-store-HsWGEr_g.js} +1 -1
- package/dist/{plus-k4hEdLAH.js → plus-C7yRM6wl.js} +1 -1
- package/dist/{qr-code-CkavLc0Z.js → qr-code-DfWVQYKi.js} +1 -1
- package/dist/{recycle-horizontal-YzkyX2fY.js → recycle-horizontal-C5u6LBUM.js} +1 -1
- package/dist/{refresh-E1vpdqCO.js → refresh-BYw1HzOO.js} +1 -1
- package/dist/{reown-logo-BZbc_-R6.js → reown-logo-CXMihtcp.js} +1 -1
- package/dist/{search-B9vQkIsQ.js → search-ByiAQZVh.js} +1 -1
- package/dist/{send-C9ROxhya.js → send-Bs5FwLBZ.js} +1 -1
- package/dist/shareicon-CG3v7iKI.js +10 -0
- package/dist/{swapHorizontal-BhLDDuiL.js → swapHorizontal-B7d_h2Se.js} +1 -1
- package/dist/{swapHorizontalBold-B1IxJLem.js → swapHorizontalBold-xBnEd6a1.js} +1 -1
- package/dist/{swapHorizontalMedium--fvn_6KH.js → swapHorizontalMedium-aLC75TbM.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-fZowAp5m.js → swapHorizontalRoundedBold-D1ph5kGS.js} +1 -1
- package/dist/{swapVertical-CDwndQ4s.js → swapVertical-DtfbArUn.js} +1 -1
- package/dist/{telegram-BLbguJ3E.js → telegram-0Il36fMk.js} +1 -1
- package/dist/{three-dots-DyIG0Aiq.js → three-dots-wNW622nV.js} +1 -1
- package/dist/{twitch-054mPrps.js → twitch-Dt1-Wtif.js} +1 -1
- package/dist/{twitterIcon-DrlgKmas.js → twitterIcon-CpSpHPYu.js} +1 -1
- package/dist/{unsupportedProp-Dr6Tadlk.js → unsupportedProp-DBVCAgxp.js} +1 -1
- package/dist/{useRegisterError-C52MuupC.js → useRegisterError-Cs0PKbRQ.js} +3257 -4302
- package/dist/{verify-uz7q7EMX.js → verify-BFIm6NMn.js} +1 -1
- package/dist/{verify-filled-Dw1_4VEj.js → verify-filled-bGZT7egL.js} +1 -1
- package/dist/{w3m-modal-CJM8um8G.js → w3m-modal-C6VaThR4.js} +2 -2
- package/dist/{wallet-a9cCMI05.js → wallet-BeQcPBdd.js} +1 -1
- package/dist/{wallet-placeholder-Cqiz2_rA.js → wallet-placeholder-CCGVvv4Q.js} +1 -1
- package/dist/{walletconnect-96twp7MP.js → walletconnect-BnSO61ut.js} +1 -1
- package/dist/{warning-circle-C4mV6fIZ.js → warning-circle-D80fIuKG.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-vRe7FHUS.js → x-4jy71myv.js} +1 -1
- package/package.json +1 -1
- package/dist/shareicon-CLveBf8l.js +0 -262
@@ -1,17 +1,17 @@
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as K } from "react/jsx-runtime";
|
2
2
|
import de, { useState as N, useEffect as B, useRef as I1, Suspense as B1 } from "react";
|
3
|
-
import { B as A1, i as Ee, u as ke, F as De, f as $e, C as _e, W as s1 } from "./useRegisterError-
|
4
|
-
import { u as a, l as pe, a as i1, c as Ve } from "./index-
|
5
|
-
import { C as
|
3
|
+
import { B as A1, i as Ee, u as ke, F as De, f as $e, C as _e, W as s1 } from "./useRegisterError-Cs0PKbRQ.js";
|
4
|
+
import { u as a, l as pe, a as i1, c as Ve, S as j1, M as P1 } from "./index-C6pDnqRd.js";
|
5
|
+
import { C as L1, M as F1, g as e1 } from "./getChainIds-cRV7v4Vu.js";
|
6
6
|
import { useQuery as l1 } from "@tanstack/react-query";
|
7
|
-
import { useAccount as ge, useConnect as
|
8
|
-
import { useDynamicContext as Ne, useIsLoggedIn as
|
9
|
-
import { S as
|
10
|
-
import { u as
|
11
|
-
import { useAccount as Oe, useStargateClient as a1, useSuggestChainAndConnect as
|
12
|
-
import { S as
|
13
|
-
import { R as
|
14
|
-
import { C as ze, P as be, u as
|
7
|
+
import { useAccount as ge, useConnect as M1, useConnections as E1, useBalance as O1 } from "wagmi";
|
8
|
+
import { useDynamicContext as Ne, useIsLoggedIn as R1, useUserWallets as $1 } from "@dynamic-labs/sdk-react-core";
|
9
|
+
import { S as _1 } from "./shareicon-CG3v7iKI.js";
|
10
|
+
import { u as V1, B as z1 } from "./index-EuXqE26M.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as a1, useSuggestChainAndConnect as S1, WalletType as Z1 } from "graz";
|
12
|
+
import { S as H1, D as G1 } from "./down-DmSxEW66.js";
|
13
|
+
import { R as K1 } from "./index-CDq3vNnP.js";
|
14
|
+
import { C as ze, P as be, u as J1, g as t1 } from "./getCosmosAddress-Cm0YEa9v.js";
|
15
15
|
function c1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ u(
|
17
17
|
"svg",
|
@@ -46,7 +46,7 @@ function c1({ fill: t }) {
|
|
46
46
|
}
|
47
47
|
);
|
48
48
|
}
|
49
|
-
function
|
49
|
+
function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
50
50
|
const [r, c] = N(t), [b, d] = N(""), { tick: l, defaultCoin: p } = Ee;
|
51
51
|
return /* @__PURE__ */ u("div", { children: [
|
52
52
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
@@ -94,8 +94,8 @@ function J1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
94
94
|
"div",
|
95
95
|
{
|
96
96
|
onClick: () => {
|
97
|
-
let
|
98
|
-
n(y), o(
|
97
|
+
let P = { chain: y.name, ...y };
|
98
|
+
n(y), o(P);
|
99
99
|
},
|
100
100
|
className: `first-letter:bw-py-2 bw-cursor-pointer bw-border-b bw-flex bw-items-center bw-justify-between bw-gap-x-3 bw-border-border-primary bw-text-sm bw-font-normal bw-text-text-primary
|
101
101
|
|
@@ -119,15 +119,15 @@ function J1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
119
119
|
}) })
|
120
120
|
] });
|
121
121
|
}
|
122
|
-
const
|
123
|
-
gradientbackground:
|
124
|
-
overlay:
|
122
|
+
const X1 = "_gradientbackground_7x8s8_1", Q1 = "_overlay_7x8s8_5", n1 = {
|
123
|
+
gradientbackground: X1,
|
124
|
+
overlay: Q1
|
125
125
|
};
|
126
|
-
function
|
126
|
+
function W1(t) {
|
127
127
|
let n = t.match(/[1-9A-HJ-NP-Za-km-z]{32,44}/);
|
128
128
|
return t.slice(0, 2) === "0x" ? !0 : n ? t == n : !1;
|
129
129
|
}
|
130
|
-
function
|
130
|
+
function U1(t) {
|
131
131
|
const [n, o] = N({}), s = a((l) => l.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: s,
|
133
133
|
multiChain: !0
|
@@ -140,8 +140,8 @@ function W1(t) {
|
|
140
140
|
if ((p = r == null ? void 0 : r[l]) != null && p.bech32Address && b) {
|
141
141
|
let T = await (b[l] || b).getAllBalances(
|
142
142
|
(y = r == null ? void 0 : r[l]) == null ? void 0 : y.bech32Address
|
143
|
-
),
|
144
|
-
o(
|
143
|
+
), P = pe.keyBy(T, "denom");
|
144
|
+
o(P);
|
145
145
|
}
|
146
146
|
}
|
147
147
|
return B(() => {
|
@@ -156,7 +156,7 @@ function b1(t) {
|
|
156
156
|
} else
|
157
157
|
return t;
|
158
158
|
}
|
159
|
-
function
|
159
|
+
function Y1({ fill: t }) {
|
160
160
|
return /* @__PURE__ */ u(
|
161
161
|
"svg",
|
162
162
|
{
|
@@ -191,7 +191,7 @@ function U1({ fill: t }) {
|
|
191
191
|
}
|
192
192
|
);
|
193
193
|
}
|
194
|
-
function
|
194
|
+
function D1({ selectedChain: t }) {
|
195
195
|
return /* @__PURE__ */ u("div", { className: "bw-h-[100%] bw-flex bw-flex-col bw-justify-center bw-items-center", children: [
|
196
196
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center bw-items-center", children: /* @__PURE__ */ u("div", { className: "bw-relative", children: [
|
197
197
|
t != null && t.image ? /* @__PURE__ */ e(
|
@@ -202,7 +202,7 @@ function Y1({ selectedChain: t }) {
|
|
202
202
|
alt: "chain"
|
203
203
|
}
|
204
204
|
) : /* @__PURE__ */ e(K, {}),
|
205
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-bg-background-container -bw-bottom-2 -bw-right-2 bw-flex bw-items-center bw-justify-center bw-rounded-full bw-border bw-border-border-primary bw-w-[44px] bw-h-[44px]", children: /* @__PURE__ */ e(
|
205
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-bg-background-container -bw-bottom-2 -bw-right-2 bw-flex bw-items-center bw-justify-center bw-rounded-full bw-border bw-border-border-primary bw-w-[44px] bw-h-[44px]", children: /* @__PURE__ */ e(Y1, { fill: "var(--tw-text-secondary)" }) })
|
206
206
|
] }) }),
|
207
207
|
/* @__PURE__ */ u("h2", { className: "bw-text-base bw-text-center bw-mt-3 bw-font-bold bw-text-text-primary", children: [
|
208
208
|
"No Tokens found on ",
|
@@ -216,12 +216,12 @@ function Y1({ selectedChain: t }) {
|
|
216
216
|
] })
|
217
217
|
] });
|
218
218
|
}
|
219
|
-
const
|
219
|
+
const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s, showExchangeList: r, setCoinData: c, setChainData: b }) {
|
220
220
|
var Be, Ae;
|
221
221
|
a((w) => w.searchCustomCoin);
|
222
|
-
const d = a((w) => w.setSearchCustomCoin), { ref: l, inView: p } =
|
223
|
-
|
224
|
-
const C = y(n), A = a((w) => w.fromChain), v = a((w) => w.fromCoin), Z = a((w) => w.toChain), H = a((w) => w.toCoin), [re,
|
222
|
+
const d = a((w) => w.setSearchCustomCoin), { ref: l, inView: p } = V1(), { getWallet: y } = ke({}), { connected: I, address: T } = i1(), { isConnected: P, address: f } = ge(), { primaryWallet: h } = Ne();
|
223
|
+
R1();
|
224
|
+
const C = y(n), A = a((w) => w.fromChain), v = a((w) => w.fromCoin), Z = a((w) => w.toChain), H = a((w) => w.toCoin), [re, L] = N(!1), { cosmosBalance: R } = U1(n), { defaultCoin: _ } = Ee, [J, g] = N(0), m = I1(null), { data: k } = Oe({
|
225
225
|
chainId: [n.chainId],
|
226
226
|
multiChain: !0
|
227
227
|
}), M = (n == null ? void 0 : n.networkType) === "evm" && f || (n == null ? void 0 : n.networkType) === "sol" && (h == null ? void 0 : h.address) || (n == null ? void 0 : n.networkType) === "tron" && T || (n == null ? void 0 : n.networkType) === "cosmos" && ((Be = k == null ? void 0 : k[n == null ? void 0 : n.chainId]) == null ? void 0 : Be.bech32Address), F = a((w) => w.toDisconnect);
|
@@ -238,10 +238,10 @@ const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
238
238
|
return w.networkType == "cosmos" ? $e(((ee = R == null ? void 0 : R[D]) == null ? void 0 : ee.amount) / Math.pow(10, w.decimals) || 0) || "" : $e((((W = (q = (se = (oe = (ae = Q.data) == null ? void 0 : ae.data) == null ? void 0 : oe[n == null ? void 0 : n.networkType]) == null ? void 0 : se[n.chainId]) == null ? void 0 : q[w.address]) == null ? void 0 : W.balance) || 0) / Math.pow(10, ((ne = (ce = (X = (S = (te = (U = Q.data) == null ? void 0 : U.data) == null ? void 0 : te[n == null ? void 0 : n.networkType]) == null ? void 0 : S[n.chainId]) == null ? void 0 : X[w.address]) == null ? void 0 : ce.asset) == null ? void 0 : ne.decimals) || 0) || 0) || "";
|
239
239
|
}
|
240
240
|
B(() => {
|
241
|
-
o.length > 40 &&
|
241
|
+
o.length > 40 && W1(o) && !V.length ? (L(!0), d({
|
242
242
|
chainId: n.chainId,
|
243
243
|
address: o
|
244
|
-
})) : o.length || (
|
244
|
+
})) : o.length || (L(!1), d({ chainId: "", address: "" }));
|
245
245
|
}, [o, V]), B(() => {
|
246
246
|
g(0);
|
247
247
|
}, [o]);
|
@@ -280,12 +280,12 @@ const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
280
280
|
|
281
281
|
}`,
|
282
282
|
onClick: async () => {
|
283
|
-
var S, X, ce, ne, Ce, le, we, je, ve,
|
283
|
+
var S, X, ce, ne, Ce, le, we, je, ve, Pe, Le;
|
284
284
|
let te = {
|
285
285
|
// ...coinData,
|
286
286
|
coin: w.symbol,
|
287
287
|
...w,
|
288
|
-
availBal: ((Ce = (ne = (ce = (X = (S = Q.data) == null ? void 0 : S.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : ce[n.chainId]) == null ? void 0 : ne[w.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((
|
288
|
+
availBal: ((Ce = (ne = (ce = (X = (S = Q.data) == null ? void 0 : S.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : ce[n.chainId]) == null ? void 0 : ne[w.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((Le = (Pe = (ve = (je = (we = (le = Q.data) == null ? void 0 : le.data) == null ? void 0 : we[n == null ? void 0 : n.networkType]) == null ? void 0 : je[n == null ? void 0 : n.chainId]) == null ? void 0 : ve[w.address.toLowerCase()]) == null ? void 0 : Pe.asset) == null ? void 0 : Le.decimals) || 0)
|
289
289
|
};
|
290
290
|
c(te), b(n), s(n, te), (n == null ? void 0 : n.networkType) === (Z == null ? void 0 : Z.networkType) || (n == null || n.networkType, A == null || A.networkType, O(""));
|
291
291
|
},
|
@@ -316,7 +316,7 @@ const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
316
316
|
te.stopPropagation();
|
317
317
|
},
|
318
318
|
className: "hover:bw-opacity-70",
|
319
|
-
children: /* @__PURE__ */ e(
|
319
|
+
children: /* @__PURE__ */ e(_1, { fill: "var(--tw-text-secondary)" })
|
320
320
|
}
|
321
321
|
)
|
322
322
|
] })
|
@@ -350,16 +350,16 @@ const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
350
350
|
},
|
351
351
|
D
|
352
352
|
);
|
353
|
-
}) : re && !($.isLoading && $.isFetching) ? /* @__PURE__ */ e(
|
353
|
+
}) : re && !($.isLoading && $.isFetching) ? /* @__PURE__ */ e(D1, { selectedChain: n }) : !o.length && /* @__PURE__ */ e("div", { className: "bw-w-full bw-flex bw-justify-center bw-mt-4 bw-text-text-primary", children: /* @__PURE__ */ e(_e, { color: "inherit", size: 30 }) }) });
|
354
354
|
});
|
355
|
-
function
|
355
|
+
function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coinData: r, showExchangeList: c, fetchChains: b }) {
|
356
356
|
var g, m, k, M, F;
|
357
|
-
const [d, l] = N(!1), [p, y] = N(""), I = a((x) => x.tokens), [T,
|
357
|
+
const [d, l] = N(!1), [p, y] = N(""), I = a((x) => x.tokens), [T, P] = N([]), [f, h] = N(0), [C, A] = N({ chain: "" }), v = a((x) => x.gradient), Z = a((x) => x.configuration), H = a((x) => x.chainObj);
|
358
358
|
B(() => {
|
359
359
|
var x, O, $, E;
|
360
360
|
if ((O = (x = b.data) == null ? void 0 : x.data) != null && O.length) {
|
361
361
|
let j = [...(E = ($ = b.data) == null ? void 0 : $.data) == null ? void 0 : E.slice(0, 9)], V = j.findIndex((z) => z.chainId === "137"), ie = j.findIndex((z) => z.chainId === "324"), Te = j.findIndex((z) => z.chainId === "10"), Y = j.findIndex((z) => z.chainId === "43114");
|
362
|
-
j.splice(V, 1, H[80094]), j.splice(ie, 1, H[2741]), j.splice(Te, 1, H["eclipse-svm"]), j.splice(Y, 1, H[999]), !!pe.keyBy(j, "chainId")[C.chainId] || (j.pop(), j.push(C)),
|
362
|
+
j.splice(V, 1, H[80094]), j.splice(ie, 1, H[2741]), j.splice(Te, 1, H["eclipse-svm"]), j.splice(Y, 1, H[999]), !!pe.keyBy(j, "chainId")[C.chainId] || (j.pop(), j.push(C)), P(j);
|
363
363
|
}
|
364
364
|
}, [H, (g = b.data) == null ? void 0 : g.data, s, C]), B(() => {
|
365
365
|
A(s);
|
@@ -374,14 +374,14 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
374
374
|
var $, E;
|
375
375
|
($ = x.chain) != null && $.length && ((E = O == null ? void 0 : O.coin) != null && E.length) && o();
|
376
376
|
}
|
377
|
-
function
|
377
|
+
function L() {
|
378
378
|
l(!1);
|
379
379
|
}
|
380
380
|
function R(x) {
|
381
381
|
A(x);
|
382
382
|
}
|
383
383
|
const { tick: _, defaultCoin: J } = Ee;
|
384
|
-
return d ? /* @__PURE__ */ e(
|
384
|
+
return d ? /* @__PURE__ */ e(q1, { handleSetChainData: R, data: (k = b.data) == null ? void 0 : k.data, handleBack: L, network: C }) : /* @__PURE__ */ u(K, { children: [
|
385
385
|
/* @__PURE__ */ u("div", { children: [
|
386
386
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
387
387
|
/* @__PURE__ */ e(
|
@@ -391,7 +391,7 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
391
391
|
o(), (!r.coin.length || !s.chain.length) && (n({ coin: "" }), t({ chain: "" }));
|
392
392
|
},
|
393
393
|
className: "bw-absolute bw-left-0 bw-top-[25%]",
|
394
|
-
children: /* @__PURE__ */ e(
|
394
|
+
children: /* @__PURE__ */ e(L1, { fill: "var(--tw-text-secondary)" })
|
395
395
|
}
|
396
396
|
),
|
397
397
|
/* @__PURE__ */ u("div", { className: "bw-text-base bw-font-normal bw-text-text-secondary", children: [
|
@@ -399,7 +399,7 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
399
399
|
" Network"
|
400
400
|
] })
|
401
401
|
] }),
|
402
|
-
b.isLoading ? /* @__PURE__ */ e(
|
402
|
+
b.isLoading ? /* @__PURE__ */ e(j1, { animation: "wave", variant: "rectangular", width: "100%", height: 134, className: "bw-rounded-md bw-flex bw-justify-center bw-bg-transparent bw-opacity-0 bw-items-center bw-text-text-primary" }) : /* @__PURE__ */ u("div", { className: "bw-grid bw-grid-cols-5 bw-gap-1 bw-overflow-y-auto bw-w-full", children: [
|
403
403
|
b.isSuccess && T.map((x, O) => {
|
404
404
|
var $, E;
|
405
405
|
return /* @__PURE__ */ e(
|
@@ -474,15 +474,15 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
474
474
|
placeholder: "Search Token Name or Contract Address"
|
475
475
|
}
|
476
476
|
),
|
477
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (I.isLoading || I.isFetching) && p.length ? /* @__PURE__ */ e("div", { className: " bw-bg-background-container bw-mt-1 bw-mr-1 bw-flex bw-items-center bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
|
477
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (I.isLoading || I.isFetching) && p.length ? /* @__PURE__ */ e("div", { className: " bw-bg-background-container bw-mt-1 bw-mr-1 bw-flex bw-items-center bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(H1, {}) }) : /* @__PURE__ */ e(c1, { fill: "var(--tw-background-secondary)" }) })
|
478
478
|
]
|
479
479
|
}
|
480
480
|
),
|
481
|
-
/* @__PURE__ */ e(
|
481
|
+
/* @__PURE__ */ e(et, { value: p, handleClosePopup: re, showExchangeList: c, setChainData: t, setCoinData: n, selectChainState: C })
|
482
482
|
] })
|
483
483
|
] });
|
484
484
|
}
|
485
|
-
function
|
485
|
+
function nt({
|
486
486
|
walletDetails: t,
|
487
487
|
handleToDisconnect: n,
|
488
488
|
show: o,
|
@@ -490,16 +490,16 @@ function tt({
|
|
490
490
|
handleShowWallet: r,
|
491
491
|
setConnectWalletField: c
|
492
492
|
}) {
|
493
|
-
const [b, d] = N(null), { address: l, chain: p, data: y, disconnect: I, ...T } = t, [
|
493
|
+
const [b, d] = N(null), { address: l, chain: p, data: y, disconnect: I, ...T } = t, [P, f] = N(), { connector: h } = ge(), { connectors: C } = M1(), A = () => {
|
494
494
|
c(o), o == "to" ? (v(), n(!0)) : v();
|
495
495
|
};
|
496
|
-
|
496
|
+
E1(), B(() => {
|
497
497
|
C.length && f(
|
498
498
|
pe.keyBy(C, (Z) => Z.uid)
|
499
499
|
);
|
500
500
|
}, [C]);
|
501
501
|
async function v() {
|
502
|
-
s === "evm" && (p == null ? void 0 : p.network) !== "custom" && (
|
502
|
+
s === "evm" && (p == null ? void 0 : p.network) !== "custom" && (P != null && P[h == null ? void 0 : h.uid]), r();
|
503
503
|
}
|
504
504
|
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
|
505
505
|
"button",
|
@@ -522,10 +522,10 @@ function tt({
|
|
522
522
|
) });
|
523
523
|
}
|
524
524
|
function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConnectWalletField: s, coinData: r, show: c }) {
|
525
|
-
var A, v, Z, H, re,
|
525
|
+
var A, v, Z, H, re, L, R, _, J;
|
526
526
|
const b = a((g) => g.configuration), d = a((g) => g.customWallet), { isConnected: l, isConnecting: p, isReconnecting: y } = ge();
|
527
527
|
Ne();
|
528
|
-
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet:
|
528
|
+
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet: P } = ke({
|
529
529
|
chainData: t,
|
530
530
|
show: c
|
531
531
|
});
|
@@ -557,7 +557,7 @@ function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConn
|
|
557
557
|
children: [
|
558
558
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-min-w-[78px] bw-min-h-[28px] bw-items-center bw-gap-x-2", children: [
|
559
559
|
(Z = r == null ? void 0 : r.coin) != null && Z.length ? /* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-bold bw-text-text-primary", children: r.coin }) : /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-text-primary bw-font-bold", children: "Select Token" }),
|
560
|
-
/* @__PURE__ */ e(
|
560
|
+
/* @__PURE__ */ e(G1, { fill: (H = r == null ? void 0 : r.coin) != null && H.length ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" })
|
561
561
|
] }),
|
562
562
|
(re = t == null ? void 0 : t.chain) != null && re.length ? /* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: `on ${t.chain}`.length > 12 ? `on ${t.chain.substring(0, 12)}..` : `on ${t.chain}` }) : /* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-bold bw-text-text-primary", children: "& Chain" })
|
563
563
|
]
|
@@ -566,17 +566,17 @@ function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConn
|
|
566
566
|
]
|
567
567
|
}
|
568
568
|
),
|
569
|
-
/* @__PURE__ */ e(
|
569
|
+
/* @__PURE__ */ e(rt, { isConnected: c == "to" ? (f == null ? void 0 : f.networkType) === (h == null ? void 0 : h.networkType) ? !!((R = (L = P(f)) == null ? void 0 : L.address) != null && R.length || (d == null ? void 0 : d.length) > 30) : !!((J = (_ = P(h)) == null ? void 0 : _.address) != null && J.length || (d == null ? void 0 : d.length) > 30) : T, setConnectWalletField: s, handleShowWallet: o, show: c, chainData: t, handleToDisconnect: C })
|
570
570
|
] });
|
571
571
|
}
|
572
|
-
function
|
572
|
+
function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet: o, show: s, chainData: r, handleToDisconnect: c }) {
|
573
573
|
var y;
|
574
574
|
const b = a((I) => I.customWallet), d = a((I) => I.fromChain), l = a((I) => I.toChain), { getWallet: p } = ke({
|
575
575
|
chainData: r,
|
576
576
|
show: s
|
577
577
|
});
|
578
578
|
return /* @__PURE__ */ e("div", { className: "bw-mt-2 bw-flex bw-justify-end", children: t ? /* @__PURE__ */ e(
|
579
|
-
|
579
|
+
nt,
|
580
580
|
{
|
581
581
|
walletDetails: (b == null ? void 0 : b.length) > 30 && s == "to" ? p({}) : (d == null ? void 0 : d.networkType) == (l == null ? void 0 : l.networkType) && s == "to" ? {
|
582
582
|
disconnect: c,
|
@@ -602,10 +602,10 @@ function nt({ isConnected: t, setConnectWalletField: n, handleShowWallet: o, sho
|
|
602
602
|
}
|
603
603
|
) });
|
604
604
|
}
|
605
|
-
const
|
606
|
-
gradient:
|
605
|
+
const ot = "_gradient_15zwe_1", Se = {
|
606
|
+
gradient: ot
|
607
607
|
};
|
608
|
-
function
|
608
|
+
function st({ mode: t, handleMode: n }) {
|
609
609
|
var s, r;
|
610
610
|
const o = a((c) => c.configuration);
|
611
611
|
return /* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center", children: /* @__PURE__ */ u(
|
@@ -695,7 +695,7 @@ function ot({ mode: t, handleMode: n }) {
|
|
695
695
|
}
|
696
696
|
) });
|
697
697
|
}
|
698
|
-
function
|
698
|
+
function it({ fill: t }) {
|
699
699
|
return /* @__PURE__ */ e(
|
700
700
|
"svg",
|
701
701
|
{
|
@@ -748,7 +748,7 @@ function d1({ options: t, handleOptions: n }) {
|
|
748
748
|
bw-flex bw-flex-1 bw-relative bw-h-full bw-rounded-md bw-gap-x-1 bw-justify-center bw-items-center `,
|
749
749
|
children: [
|
750
750
|
b.value === "ultra" ? /* @__PURE__ */ e(
|
751
|
-
|
751
|
+
it,
|
752
752
|
{
|
753
753
|
fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)"
|
754
754
|
}
|
@@ -850,7 +850,7 @@ function p1({ handleClose: t }) {
|
|
850
850
|
return /* @__PURE__ */ u("div", { className: "bw-w-full bw-relative bw-flex bw-items-center bw-justify-center", children: [
|
851
851
|
/* @__PURE__ */ e("h2", { className: "bw-text-2xl bw-font-bold bw-text-text-primary", children: "Config" }),
|
852
852
|
/* @__PURE__ */ e(
|
853
|
-
|
853
|
+
z1,
|
854
854
|
{
|
855
855
|
disableRipple: !0,
|
856
856
|
onClick: t,
|
@@ -907,8 +907,8 @@ function x1() {
|
|
907
907
|
/* @__PURE__ */ e("div", { className: "bw-h-[1px] bw-flex-1 bw-bg-border-primary " })
|
908
908
|
] });
|
909
909
|
}
|
910
|
-
function
|
911
|
-
const [n, o] = N(""), [s, r] = N({ name: "Low", value: "low" }), [c, b] = N(""), [d, l] = N(""), [p, y] = N(""), I = a((g) => g.broadCastMode), T = a((g) => g.customFee),
|
910
|
+
function lt({ handleClose: t }) {
|
911
|
+
const [n, o] = N(""), [s, r] = N({ name: "Low", value: "low" }), [c, b] = N(""), [d, l] = N(""), [p, y] = N(""), I = a((g) => g.broadCastMode), T = a((g) => g.customFee), P = a((g) => g.setCustomFee), f = a((g) => g.slippage), h = a((g) => g.setSlippage), C = a((g) => g.setBroadCastMode), A = a((g) => g.option), v = a((g) => g.setOption), Z = n == T && A.name == s.name && f == p && (d === I && d !== "" || !n.length && !A.name.length);
|
912
912
|
function H(g) {
|
913
913
|
b(""), o(g.target.value);
|
914
914
|
}
|
@@ -920,7 +920,7 @@ function it({ handleClose: t }) {
|
|
920
920
|
}, [A]), B(() => {
|
921
921
|
T != null && T.length ? o(T) : o("");
|
922
922
|
}, [T]);
|
923
|
-
function
|
923
|
+
function L() {
|
924
924
|
v(s);
|
925
925
|
}
|
926
926
|
B(() => {
|
@@ -937,7 +937,7 @@ function it({ handleClose: t }) {
|
|
937
937
|
C(""), b("Please select a mode");
|
938
938
|
return;
|
939
939
|
}
|
940
|
-
n.length ? (
|
940
|
+
n.length ? (P(n), v(s)) : (P(""), L()), C(d), h(p), t();
|
941
941
|
}
|
942
942
|
function J(g) {
|
943
943
|
b(""), l(g);
|
@@ -948,7 +948,7 @@ function it({ handleClose: t }) {
|
|
948
948
|
/* @__PURE__ */ e(p1, { handleClose: t }),
|
949
949
|
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(g1, { slippage: p, handleSlippage: R }) }),
|
950
950
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(x1, {}) }),
|
951
|
-
/* @__PURE__ */ e(
|
951
|
+
/* @__PURE__ */ e(st, { mode: d, handleMode: J }),
|
952
952
|
/* @__PURE__ */ e(d1, { options: s, handleOptions: re }),
|
953
953
|
/* @__PURE__ */ e(
|
954
954
|
u1,
|
@@ -971,8 +971,8 @@ function it({ handleClose: t }) {
|
|
971
971
|
] })
|
972
972
|
] });
|
973
973
|
}
|
974
|
-
function
|
975
|
-
const [n, o] = N({ name: "Low", value: "low" }), [s, r] = N(""), [c, b] = N(""), d = a((v) => v.setEvmGas), l = a((v) => v.setEvmSpeed), p = a((v) => v.evmSpeed), y = a((v) => v.evmGas), I = a((v) => v.slippage), T = a((v) => v.setSlippage),
|
974
|
+
function at({ handleClose: t }) {
|
975
|
+
const [n, o] = N({ name: "Low", value: "low" }), [s, r] = N(""), [c, b] = N(""), d = a((v) => v.setEvmGas), l = a((v) => v.setEvmSpeed), p = a((v) => v.evmSpeed), y = a((v) => v.evmGas), I = a((v) => v.slippage), T = a((v) => v.setSlippage), P = s == y && p.name == n.name && I == c;
|
976
976
|
function f(v, Z) {
|
977
977
|
o(v);
|
978
978
|
}
|
@@ -1011,15 +1011,15 @@ function lt({ handleClose: t }) {
|
|
1011
1011
|
m1,
|
1012
1012
|
{
|
1013
1013
|
handleSave: C,
|
1014
|
-
isSaveButtonDisabled:
|
1014
|
+
isSaveButtonDisabled: P
|
1015
1015
|
}
|
1016
1016
|
)
|
1017
1017
|
] });
|
1018
1018
|
}
|
1019
|
-
function
|
1019
|
+
function ct({ open: t, handleClose: n }) {
|
1020
1020
|
const o = a((r) => r.fromChain);
|
1021
1021
|
return /* @__PURE__ */ e(
|
1022
|
-
|
1022
|
+
F1,
|
1023
1023
|
{
|
1024
1024
|
open: t,
|
1025
1025
|
disablePortal: !0,
|
@@ -1034,11 +1034,11 @@ function at({ open: t, handleClose: n }) {
|
|
1034
1034
|
// left: "47%",
|
1035
1035
|
// transform: "translate(-50%, -50%)",
|
1036
1036
|
bgcolor: "var(--tw-bg-container)"
|
1037
|
-
}, children: o.networkType == "sol" ? /* @__PURE__ */ e(
|
1037
|
+
}, children: o.networkType == "sol" ? /* @__PURE__ */ e(lt, { handleClose: n }) : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(at, { handleClose: n }) }) })
|
1038
1038
|
}
|
1039
1039
|
);
|
1040
1040
|
}
|
1041
|
-
function
|
1041
|
+
function bt({ fill: t }) {
|
1042
1042
|
return /* @__PURE__ */ u(
|
1043
1043
|
"svg",
|
1044
1044
|
{
|
@@ -1077,7 +1077,7 @@ function ct({ fill: t }) {
|
|
1077
1077
|
}
|
1078
1078
|
);
|
1079
1079
|
}
|
1080
|
-
function
|
1080
|
+
function dt() {
|
1081
1081
|
const t = a((s) => s.configuration), n = t == null ? void 0 : t.headingStyles, o = (t == null ? void 0 : t.headingText) || "";
|
1082
1082
|
return o.length ? /* @__PURE__ */ e(
|
1083
1083
|
"span",
|
@@ -1095,7 +1095,7 @@ function bt() {
|
|
1095
1095
|
"Y.exchange"
|
1096
1096
|
] });
|
1097
1097
|
}
|
1098
|
-
function
|
1098
|
+
function wt() {
|
1099
1099
|
const t = a((o) => o.configuration), n = t == null ? void 0 : t.headingContainerStyles;
|
1100
1100
|
return /* @__PURE__ */ e(
|
1101
1101
|
"div",
|
@@ -1124,32 +1124,32 @@ function dt() {
|
|
1124
1124
|
paddingLeft: "10px",
|
1125
1125
|
...n
|
1126
1126
|
},
|
1127
|
-
children: /* @__PURE__ */ e(
|
1127
|
+
children: /* @__PURE__ */ e(dt, {})
|
1128
1128
|
}
|
1129
1129
|
);
|
1130
1130
|
}
|
1131
|
-
function
|
1131
|
+
function ut() {
|
1132
1132
|
const [t, n] = N(!1), o = a((r) => r.fromChain);
|
1133
1133
|
function s() {
|
1134
1134
|
n(!1);
|
1135
1135
|
}
|
1136
1136
|
return /* @__PURE__ */ u(K, { children: [
|
1137
1137
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-w-full -bw-mt-2 bw-mb-3 bw-items-center bw-justify-end", children: [
|
1138
|
-
/* @__PURE__ */ e(
|
1138
|
+
/* @__PURE__ */ e(wt, {}),
|
1139
1139
|
/* @__PURE__ */ e(
|
1140
1140
|
"div",
|
1141
1141
|
{
|
1142
1142
|
onClick: () => (o == null ? void 0 : o.networkType) !== "cosmos" && n(!0),
|
1143
1143
|
className: "bw-flex bw-relative bw-right-0 bw-items-center bw-gap-x-2",
|
1144
|
-
children: /* @__PURE__ */ e(
|
1144
|
+
children: /* @__PURE__ */ e(K1, { classnames: " ", children: /* @__PURE__ */ e(bt, { fill: "var(--tw-text-secondary)" }) })
|
1145
1145
|
}
|
1146
1146
|
)
|
1147
1147
|
] }),
|
1148
|
-
/* @__PURE__ */ e(
|
1148
|
+
/* @__PURE__ */ e(ct, { open: t, handleClose: s })
|
1149
1149
|
] });
|
1150
1150
|
}
|
1151
1151
|
let o1, Fe, he, Me = 0;
|
1152
|
-
function
|
1152
|
+
function mt({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isRoutesEnabled: r, fetchBalance: c }) {
|
1153
1153
|
const [b, d] = N(0), { getWallet: l } = ke({}), p = a((h) => h.fromChain), y = l(p), { isConnected: I } = ge();
|
1154
1154
|
B(() => {
|
1155
1155
|
t && clearInterval(he);
|
@@ -1172,7 +1172,7 @@ function ut({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1172
1172
|
function T() {
|
1173
1173
|
o1 = Date.now(), d((h) => (Fe = h, h));
|
1174
1174
|
}
|
1175
|
-
function
|
1175
|
+
function P() {
|
1176
1176
|
let h = Date.now(), C = Math.round((h - o1) / 1e3);
|
1177
1177
|
s.deadline - Fe + C > s.deadline ? n((A) => {
|
1178
1178
|
var v;
|
@@ -1180,7 +1180,7 @@ function ut({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1180
1180
|
}) : Fe && C && d(Fe - C);
|
1181
1181
|
}
|
1182
1182
|
function f() {
|
1183
|
-
document.visibilityState === "visible" ?
|
1183
|
+
document.visibilityState === "visible" ? P() : T();
|
1184
1184
|
}
|
1185
1185
|
return B(() => (pe.isEmpty(s) ? he && clearInterval(he) : he = setInterval(() => {
|
1186
1186
|
d((h) => h <= 0 ? (Me = 0, s.deadline) : (Me++, h - 1));
|
@@ -1188,7 +1188,7 @@ function ut({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1188
1188
|
he && clearInterval(he);
|
1189
1189
|
}), [s]), a((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1190
1190
|
}
|
1191
|
-
function
|
1191
|
+
function pt(t, n, o) {
|
1192
1192
|
const { primaryWallet: s } = Ne(), [r, c] = N(0), b = async (d) => {
|
1193
1193
|
if (!s) return;
|
1194
1194
|
const l = new ze(d || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed");
|
@@ -1208,17 +1208,17 @@ function mt(t, n, o) {
|
|
1208
1208
|
(t == null ? void 0 : t.networkType) === "sol" && b((t == null ? void 0 : t.chainId) === "eclipse-svm" ? "https://eclipse.lgns.net/" : null);
|
1209
1209
|
}, [t == null ? void 0 : t.networkType, s, t == null ? void 0 : t.chainId, s == null ? void 0 : s.address]), { balanceSol: r, getBalanceSol: b };
|
1210
1210
|
}
|
1211
|
-
function
|
1211
|
+
function gt(t) {
|
1212
1212
|
return t == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ? "" : t;
|
1213
1213
|
}
|
1214
|
-
const
|
1214
|
+
const xt = new be("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), ft = new be("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
1215
1215
|
new be("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
1216
1216
|
new be("So11111111111111111111111111111111111111112");
|
1217
1217
|
new be("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
|
1218
|
-
async function
|
1218
|
+
async function ht(t, n) {
|
1219
1219
|
if (!t) return;
|
1220
1220
|
const o = new ze(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), s = new be(t), r = await o.getParsedTokenAccountsByOwner(s, {
|
1221
|
-
programId: n ?
|
1221
|
+
programId: n ? ft : xt
|
1222
1222
|
});
|
1223
1223
|
let c = {};
|
1224
1224
|
for (const { account: b } of r.value) {
|
@@ -1227,13 +1227,13 @@ async function ft(t, n) {
|
|
1227
1227
|
}
|
1228
1228
|
return c;
|
1229
1229
|
}
|
1230
|
-
function
|
1231
|
-
const [o, s] = N(0), { primaryWallet: r, setPrimaryWallet: c } = Ne(), [b, d] = N(!1), l = a((m) => m.fromChain), { address: p, isConnected: y } = ge(), I = a((m) => m.cosmosChainIds), { data: T, isConnected:
|
1230
|
+
function yt(t, n) {
|
1231
|
+
const [o, s] = N(0), { primaryWallet: r, setPrimaryWallet: c } = Ne(), [b, d] = N(!1), l = a((m) => m.fromChain), { address: p, isConnected: y } = ge(), I = a((m) => m.cosmosChainIds), { data: T, isConnected: P } = Oe({
|
1232
1232
|
chainId: I,
|
1233
1233
|
multiChain: !0
|
1234
|
-
}), f = a((m) => m.fromCoin), { data: h, isLoading: C } =
|
1234
|
+
}), f = a((m) => m.fromCoin), { data: h, isLoading: C } = O1({
|
1235
1235
|
address: p,
|
1236
|
-
token:
|
1236
|
+
token: gt((f == null ? void 0 : f.address) || ""),
|
1237
1237
|
chainId: Number((l == null ? void 0 : l.chainId) || 0),
|
1238
1238
|
enabled: !!((l.networkType == "evm" || n) && p && (p != null && p.length))
|
1239
1239
|
}), {
|
@@ -1246,7 +1246,7 @@ function ht(t, n) {
|
|
1246
1246
|
chainId: [l.chainId],
|
1247
1247
|
multiChain: !0
|
1248
1248
|
});
|
1249
|
-
async function
|
1249
|
+
async function L(m) {
|
1250
1250
|
if (!r) return;
|
1251
1251
|
const k = new ze(m || "https://solana-rpc.publicnode.com");
|
1252
1252
|
if (k)
|
@@ -1262,7 +1262,7 @@ function ht(t, n) {
|
|
1262
1262
|
async function R(m) {
|
1263
1263
|
try {
|
1264
1264
|
d(!0);
|
1265
|
-
let k = await
|
1265
|
+
let k = await ht(r.address, m);
|
1266
1266
|
d(!1), s(k == null ? void 0 : k[f == null ? void 0 : f.address]);
|
1267
1267
|
} catch {
|
1268
1268
|
d(!1);
|
@@ -1276,7 +1276,7 @@ function ht(t, n) {
|
|
1276
1276
|
const k = new be(r.address);
|
1277
1277
|
k && (_ = m.onAccountChange(k, (M) => {
|
1278
1278
|
var F;
|
1279
|
-
l.networkType == "sol" && (r != null && r.address) && (((F = f == null ? void 0 : f.symbol) == null ? void 0 : F.toLowerCase()) === "sol" ?
|
1279
|
+
l.networkType == "sol" && (r != null && r.address) && (((F = f == null ? void 0 : f.symbol) == null ? void 0 : F.toLowerCase()) === "sol" ? L() : l.chainId === "eclipse-svm" ? f.symbol == "ETH" ? L("https://eclipse.lgns.net/") : R("https://eclipse.lgns.net/") : R());
|
1280
1280
|
}));
|
1281
1281
|
}
|
1282
1282
|
B(() => ((l == null ? void 0 : l.networkType) === "sol" && J(), async () => {
|
@@ -1296,33 +1296,33 @@ function ht(t, n) {
|
|
1296
1296
|
}
|
1297
1297
|
return B(() => {
|
1298
1298
|
var m;
|
1299
|
-
l.networkType == "sol" && (r != null && r.address) ? ((m = f == null ? void 0 : f.symbol) == null ? void 0 : m.toLowerCase()) === "sol" ?
|
1300
|
-
}, [l.networkType, l == null ? void 0 : l.chainId, f.symbol, f == null ? void 0 : f.address, h, p, r == null ? void 0 : r.address, p,
|
1299
|
+
l.networkType == "sol" && (r != null && r.address) ? ((m = f == null ? void 0 : f.symbol) == null ? void 0 : m.toLowerCase()) === "sol" ? L() : l.chainId == "eclipse-svm" ? f.symbol == "ETH" ? L("https://eclipse.lgns.net/") : R("https://eclipse.lgns.net/") : R() : l.networkType == "evm" && p && (p != null && p.length) ? s(Number((h == null ? void 0 : h.formatted) || 0)) : l.networkType == "cosmos" && P && !v && g(l == null ? void 0 : l.chainId);
|
1300
|
+
}, [l.networkType, l == null ? void 0 : l.chainId, f.symbol, f == null ? void 0 : f.address, h, p, r == null ? void 0 : r.address, p, P, v, t]), {
|
1301
1301
|
getbal: o,
|
1302
1302
|
isBalanceLoading: (l == null ? void 0 : l.networkType) == "sol" || (l == null ? void 0 : l.networkType) == "cosmos" ? b : (l == null ? void 0 : l.networkType) == "evm" ? C : !1
|
1303
1303
|
};
|
1304
1304
|
}
|
1305
|
-
const
|
1306
|
-
function
|
1305
|
+
const Ct = de.lazy(() => import("./SwapAsset-B0GIHqge.js")), vt = de.lazy(() => import("./InputComp-FIX0Q9qG.js")), kt = de.lazy(() => import("./QuotesProgress-CDe2mdH1.js")), Nt = de.lazy(() => import("./TxnButton-CFquc6ws.js")), Tt = de.lazy(() => import("./index-HOk_h4cO.js").then((t) => t.i)), It = de.lazy(() => import("./index-DrWi5MDR.js")), Bt = de.lazy(() => import("./LoadRoute-Di4rBHfs.js")), At = de.lazy(() => import("./AllRoutes-DW-2t6-d.js"));
|
1306
|
+
function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
1307
1307
|
var Ge, Ke, Je, qe, Xe, Qe, We;
|
1308
|
-
const [s, r] = N(), [c, b] = N(!1), [d, l] = N(!1), [p, y] = N(!1), [I, T] = N(!1), [
|
1309
|
-
|
1310
|
-
const { address: v } = ge(), { address: Z } = i1(), { getbal: H, isBalanceLoading: re } =
|
1308
|
+
const [s, r] = N(), [c, b] = N(!1), [d, l] = N(!1), [p, y] = N(!1), [I, T] = N(!1), [P, f] = N("all"), [h, C] = N(!1), { primaryWallet: A } = Ne();
|
1309
|
+
$1();
|
1310
|
+
const { address: v } = ge(), { address: Z } = i1(), { getbal: H, isBalanceLoading: re } = yt(h), { data: L, isConnected: R } = Oe({ chainId: "cosmoshub-4" });
|
1311
1311
|
a((i) => i.configuration);
|
1312
1312
|
const _ = a((i) => i.persist), J = a((i) => i.setPersist), g = a((i) => i.route), m = a((i) => i.fromChain), k = a((i) => i.toChain), M = a((i) => i.fromCoin), F = a((i) => i.toCoin), x = a((i) => i.setFromChain), O = a((i) => i.setToChain), $ = a((i) => i.setFromCoin), E = a((i) => i.setToCoin), j = a((i) => i.amount), V = a((i) => i.setAmount), ie = a((i) => i.customWallet);
|
1313
1313
|
a((i) => i.setToDisconnect);
|
1314
|
-
const Te = a((i) => i.setCosmosChainIds), Y = a((i) => i.customFee), G = a((i) => i.broadCastMode), Q = a((i) => i.evmGas), z = a((i) => i.evmSpeed), Ie = a((i) => i.slippage), ye = a((i) => i.option), Be = a((i) => i.setCustomWallet), Ae = a((i) => i.setSelectedProvider), { balanceSol: w } =
|
1314
|
+
const Te = a((i) => i.setCosmosChainIds), Y = a((i) => i.customFee), G = a((i) => i.broadCastMode), Q = a((i) => i.evmGas), z = a((i) => i.evmSpeed), Ie = a((i) => i.slippage), ye = a((i) => i.option), Be = a((i) => i.setCustomWallet), Ae = a((i) => i.setSelectedProvider), { balanceSol: w } = pt(m, h, Re), { suggestAndConnectAsync: D } = S1(), ee = !!(j.length && m.chain.length && M.coin.length && k.chain.length && F.coin.length && !p && I), ae = ["routes", v, m, k, M, F, j, A == null ? void 0 : A.address, Z, ie, L == null ? void 0 : L.bech32Address, Y, Q, z, Ie, G, ye.value];
|
1315
1315
|
let oe = (G === "Priority Fee" || G === "Both") && (Y != null && Y.length) ? Y : ye.value, se = (G === "Jito Tip" || G === "Both") && (Y != null && Y.length) ? Y : ye.value, q = Q != null && Q.length ? Q : z.value;
|
1316
|
-
const W = (m == null ? void 0 : m.networkType) === "sol" ? G === "Priority Fee" ? `&solanaPriorityFee=${oe}` : G === "Jito Tip" ? `&solanaJitoTip=${se}` : `&solanaPriorityFee=${oe}&solanaJitoTip=${se}` : (m == null ? void 0 : m.networkType) === "evm" ? `&evmPriorityFee=${q}` : "", { getWallet: U, refetch: te } = ke({}), { routes: S, routesData: X, setRoutesData: ce, errorMessage: ne, setErrorMessage: Ce } =
|
1316
|
+
const W = (m == null ? void 0 : m.networkType) === "sol" ? G === "Priority Fee" ? `&solanaPriorityFee=${oe}` : G === "Jito Tip" ? `&solanaJitoTip=${se}` : `&solanaPriorityFee=${oe}&solanaJitoTip=${se}` : (m == null ? void 0 : m.networkType) === "evm" ? `&evmPriorityFee=${q}` : "", { getWallet: U, refetch: te } = ke({}), { routes: S, routesData: X, setRoutesData: ce, errorMessage: ne, setErrorMessage: Ce } = J1({
|
1317
1317
|
enabled: ee,
|
1318
1318
|
dependency: ae,
|
1319
|
-
payload: [(m == null ? void 0 : m.networkType) === "cosmos" ? t1(
|
1319
|
+
payload: [(m == null ? void 0 : m.networkType) === "cosmos" ? t1(L == null ? void 0 : L.bech32Address, (Ge = m == null ? void 0 : m.chainInfo) == null ? void 0 : Ge.bech32Config.bech32PrefixAccAddr) : ((Ke = U(m)) == null ? void 0 : Ke.address) || "", m, k, M, F, j, Number(Ie) * 100, (ie == null ? void 0 : ie.length) > 30 ? ((Je = U({})) == null ? void 0 : Je.address) || "" : (k == null ? void 0 : k.networkType) === "cosmos" ? t1(L == null ? void 0 : L.bech32Address, (qe = k == null ? void 0 : k.chainInfo) == null ? void 0 : qe.bech32Config.bech32PrefixAccAddr) : ((Xe = U(k)) == null ? void 0 : Xe.address) || "", W]
|
1320
1320
|
}), le = U(m), we = l1({
|
1321
1321
|
queryKey: ["balance", le == null ? void 0 : le.address, m],
|
1322
1322
|
queryFn: async () => await (await Ve.fetchBalance(le.address, m.chainId)).json(),
|
1323
1323
|
enabled: !!((Qe = le == null ? void 0 : le.address) != null && Qe.length && m.chainId),
|
1324
1324
|
refetchOnWindowFocus: !1
|
1325
|
-
}), { quoteTimer: je } =
|
1325
|
+
}), { quoteTimer: je } = mt({
|
1326
1326
|
routes: S,
|
1327
1327
|
routesData: X,
|
1328
1328
|
confirmRoute: d,
|
@@ -1344,17 +1344,17 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1344
1344
|
function ve(i) {
|
1345
1345
|
y(i);
|
1346
1346
|
}
|
1347
|
-
function
|
1347
|
+
function Pe() {
|
1348
1348
|
r();
|
1349
1349
|
}
|
1350
|
-
async function
|
1350
|
+
async function Le(i) {
|
1351
1351
|
if (R)
|
1352
1352
|
try {
|
1353
1353
|
let ue = await e1();
|
1354
1354
|
if (ue.length && !ue.includes(i.chainId)) {
|
1355
1355
|
let xe = await D({
|
1356
1356
|
chainInfo: i,
|
1357
|
-
walletType:
|
1357
|
+
walletType: Z1.KEPLR
|
1358
1358
|
}), me = await te(), fe = await e1();
|
1359
1359
|
Te(fe);
|
1360
1360
|
}
|
@@ -1364,7 +1364,7 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1364
1364
|
return;
|
1365
1365
|
}
|
1366
1366
|
function f1(i) {
|
1367
|
-
(i == null ? void 0 : i.networkType) == "cosmos" &&
|
1367
|
+
(i == null ? void 0 : i.networkType) == "cosmos" && Le(i.chainInfo), V(""), Ce({ error: "" }), s == "from" ? x({ ...i }) : s == "to" && O({ ...i });
|
1368
1368
|
}
|
1369
1369
|
function h1(i) {
|
1370
1370
|
Ce({ error: "" }), V(""), s == "from" ? $({ ...i }) : s == "to" && E({ ...i });
|
@@ -1419,27 +1419,27 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1419
1419
|
} else
|
1420
1420
|
return;
|
1421
1421
|
}
|
1422
|
-
return /* @__PURE__ */ e(B1, { fallback: /* @__PURE__ */ e(
|
1423
|
-
/* @__PURE__ */ e(
|
1422
|
+
return /* @__PURE__ */ e(B1, { fallback: /* @__PURE__ */ e(P1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(Tt, { connectWalletField: P, handleShowWallet: t, handleRecentSelectedWallet: T1 }) : !d && !((We = _ == null ? void 0 : _.routeId) != null && We.length) ? c ? /* @__PURE__ */ e(At, { routes: S, handleShowAllRoutes: Ze, handleRoutesData: y1, convertVal: (F == null ? void 0 : F.lastPrice) || 0, amount: j }) : s ? /* @__PURE__ */ e(tt, { chainData: s == "from" ? m : k, coinData: s == "from" ? M : F, setChainData: f1, setCoinData: h1, handleReset: Pe, showExchangeList: s, fetchBalance: we, fetchChains: o }) : /* @__PURE__ */ u(K, { children: [
|
1423
|
+
/* @__PURE__ */ e(ut, {}),
|
1424
1424
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1425
|
-
/* @__PURE__ */ e(
|
1425
|
+
/* @__PURE__ */ e(Ct, { handleSwap: N1 }),
|
1426
1426
|
/* @__PURE__ */ e(r1, { chainData: m, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: f, coinData: M }),
|
1427
1427
|
/* @__PURE__ */ e(r1, { chainData: k, show: "to", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: f, coinData: F })
|
1428
1428
|
] }),
|
1429
|
-
/* @__PURE__ */ e(
|
1430
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1429
|
+
/* @__PURE__ */ e(vt, { amount: j, setAmount: V, fetchBalance: we, getCoinBalance: H, isBalanceLoading: re }),
|
1430
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Bt, { routes: S, handleShowAllRoutes: Ze, routesData: X, amount: j, isRoutesEnabled: I, price: ((X == null ? void 0 : X.outputAmountDisplay) || "") * ((F == null ? void 0 : F.lastPrice) || 0) }) }),
|
1431
1431
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (ne == null ? void 0 : ne.error) == "string" ? ne == null ? void 0 : ne.error : "" }),
|
1432
|
-
/* @__PURE__ */ e(
|
1433
|
-
/* @__PURE__ */ e(
|
1434
|
-
] }) : /* @__PURE__ */ e(
|
1432
|
+
/* @__PURE__ */ e(kt, { routes: S, routesData: X, confirmRoute: d, setConfirmRoute: l, isRoutesEnabled: ee, quoteTimer: je }),
|
1433
|
+
/* @__PURE__ */ e(Nt, { routesData: X, handleSuccess: Re, routes: S, fetchBalancePrev: we, amount: j, isAmountTyped: I, handleShowWallet: t, setConnectWalletField: f, handleConfirmClose: He, balanceSol: w, getCoinBalance: H })
|
1434
|
+
] }) : /* @__PURE__ */ e(It, { handleConfirmClose: He, amount: j, routesData: X, resetAmount: v1, routes: S, handleStopRoute: ve, resetBalance: C1 }) }) });
|
1435
1435
|
}
|
1436
|
-
function
|
1436
|
+
function Pt({ fetchChains: t }) {
|
1437
1437
|
const [n, o] = N(!1), { isConnected: s } = ge();
|
1438
1438
|
function r(c) {
|
1439
1439
|
o(!n);
|
1440
1440
|
}
|
1441
1441
|
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1442
|
-
|
1442
|
+
jt,
|
1443
1443
|
{
|
1444
1444
|
handleShowWallet: r,
|
1445
1445
|
fetchChains: t,
|
@@ -1447,14 +1447,14 @@ function jt({ fetchChains: t }) {
|
|
1447
1447
|
}
|
1448
1448
|
) });
|
1449
1449
|
}
|
1450
|
-
const
|
1450
|
+
const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1451
1451
|
__proto__: null,
|
1452
|
-
default:
|
1452
|
+
default: Pt
|
1453
1453
|
}, Symbol.toStringTag, { value: "Module" }));
|
1454
1454
|
export {
|
1455
|
-
|
1456
|
-
|
1455
|
+
gt as c,
|
1456
|
+
Kt as i,
|
1457
1457
|
b1 as p,
|
1458
1458
|
w1 as r,
|
1459
|
-
|
1459
|
+
U1 as u
|
1460
1460
|
};
|