@blockend/widget 1.0.32 → 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-CPwuTwqd.js → AllRoutes-B04uZfaa.js} +9 -9
- package/dist/{Box-CIChapvH.js → Box-BWDJCGbI.js} +6 -6
- package/dist/{EstGas-CEFILtyf.js → EstGas-QSPrdq3Y.js} +26 -30
- package/dist/{Grow-DJZj9zjv.js → Grow-37t11tle.js} +2 -2
- package/dist/{InputComp-DqF1JGIu.js → InputComp-bKVjlcbT.js} +4 -4
- package/dist/{LoadRoute-r3sHTYXM.js → LoadRoute-C3vokLk0.js} +5 -5
- package/dist/{QuotesProgress-BXVLxZ8U.js → QuotesProgress-DlgLQ2zo.js} +1 -1
- package/dist/{SwapAsset-07WvVwl-.js → SwapAsset-tD6wSJDD.js} +1 -1
- package/dist/{Tooltip-CNAsCF8n.js → Tooltip-BqYgFn1F.js} +3 -3
- package/dist/{TxnButton-D2TTkFYA.js → TxnButton-DefErcCE.js} +9 -9
- package/dist/{add-t2GqC9VA.js → add-D32G_xKI.js} +1 -1
- package/dist/{all-wallets-DFyf0q31.js → all-wallets-LjjqiTnJ.js} +1 -1
- package/dist/{app-store-aAahwmBP.js → app-store-S7C23kTz.js} +1 -1
- package/dist/{apple-DeRgpwlc.js → apple-DMd4RArz.js} +1 -1
- package/dist/{arrow-bottom-DdEOkaAj.js → arrow-bottom-C0cVMl2n.js} +1 -1
- package/dist/{arrow-bottom-circle-BWwREWcv.js → arrow-bottom-circle-veMvHYVR.js} +1 -1
- package/dist/{arrow-left-CulyLmoH.js → arrow-left-B6VdOxSY.js} +1 -1
- package/dist/{arrow-right-Dwr7TISn.js → arrow-right-CyrokJyU.js} +1 -1
- package/dist/{arrow-top-pL4rM_y8.js → arrow-top-S8qh5z92.js} +1 -1
- package/dist/{bank-CPuyK_08.js → bank-B9ySjxm-.js} +1 -1
- package/dist/{basic-CVc9xEvb.js → basic-BXha5sM_.js} +3 -3
- package/dist/{browser-Cbq2Zbp4.js → browser-CWmyZDF1.js} +1 -1
- package/dist/{card-B_hUtPWK.js → card-TzoSVbiE.js} +1 -1
- package/dist/{ccip-BLVGcR4A.js → ccip-B97isPV8.js} +1 -1
- package/dist/{checkmark-WEqTsFAc.js → checkmark-Be4tNZY8.js} +1 -1
- package/dist/{checkmark-bold-Du_ZvhqM.js → checkmark-bold-sAoooMoy.js} +1 -1
- package/dist/{chevron-bottom-C-s-lv4L.js → chevron-bottom-Cdd52Yir.js} +1 -1
- package/dist/{chevron-left-C7NcRElx.js → chevron-left-Dp8rM2qD.js} +1 -1
- package/dist/{chevron-right-CSzmAmdn.js → chevron-right-kH3Pgt8h.js} +1 -1
- package/dist/{chevron-top-Dd99Wfel.js → chevron-top-lx-9iWm1.js} +1 -1
- package/dist/{chrome-store-C4p77Of0.js → chrome-store-BGxPgdkC.js} +1 -1
- package/dist/{clock-Cib24qjH.js → clock-B3r9UiFY.js} +1 -1
- package/dist/{close-BXjEkTvS.js → close-Cc6SJ0A9.js} +1 -1
- package/dist/{coinPlaceholder-BFNC7cQN.js → coinPlaceholder-DqH2n2v1.js} +1 -1
- package/dist/{compass-CXPX5Ycp.js → compass-CiKYczAi.js} +1 -1
- package/dist/{copy-BEawMbmF.js → copy-DR0dlbF5.js} +1 -1
- package/dist/{core-Bez9Ow7F.js → core-D9oRINim.js} +3 -3
- package/dist/{cursor-transparent-ZjJ0P2vr.js → cursor-transparent-BABlb938.js} +1 -1
- package/dist/{cursor-Cxq4Q9jk.js → cursor-vv-pXAzC.js} +1 -1
- package/dist/{desktop-BhZVovAp.js → desktop-aFWdAU4O.js} +1 -1
- package/dist/{disconnect-AC-bffZO.js → disconnect-Cz0MwjuJ.js} +1 -1
- package/dist/{discord-dT97h-CC.js → discord-BkNiORDh.js} +1 -1
- package/dist/{down-DP56YSKp.js → down-BAe_uoMx.js} +2 -2
- package/dist/{etherscan-rYFRhRTM.js → etherscan-4wT3rhj5.js} +1 -1
- package/dist/{exclamation-triangle-C-pCuC08.js → exclamation-triangle-CSv7sjYs.js} +1 -1
- package/dist/{extension-BnqauLSn.js → extension-B4acJb16.js} +1 -1
- package/dist/{external-link-M9D6e_F3.js → external-link-zFdRyGh8.js} +1 -1
- package/dist/{facebook-DHezcoD-.js → facebook-D2h4REjy.js} +1 -1
- package/dist/{farcaster-D0Ky-Imv.js → farcaster-acRwWMSn.js} +1 -1
- package/dist/{filters-B02NYLWq.js → filters-DE1yHCJy.js} +1 -1
- package/dist/{getChainIds-CJd2TZYT.js → getChainIds-B4BLdhKd.js} +2 -2
- package/dist/{getCosmosAddress-DTZfw04G.js → getCosmosAddress-BfMdDDaH.js} +2 -2
- package/dist/{github-BzQkIMuE.js → github-BrCBPjDS.js} +1 -1
- package/dist/{google-BpwCJ4Fs.js → google-DYC6Um96.js} +1 -1
- package/dist/{hamburger-BzqwkUjE.js → hamburger-sg42nvNd.js} +5 -5
- package/dist/{help-circle-C0nOySHC.js → help-circle-CKvIeM4J.js} +1 -1
- package/dist/{id-DFP_kFd4.js → id-FXzF1V3L.js} +1 -1
- package/dist/{image-QiYOAGjM.js → image-rOZMtN9o.js} +1 -1
- package/dist/{index-DDk00SOL.js → index-B0E-rGOh.js} +5 -5
- package/dist/{index-DxPp2gBS.js → index-B5gV3APh.js} +78 -78
- package/dist/{index-D5hLIe-N.js → index-CIjTGwYH.js} +1 -1
- package/dist/{index-DW3W7zaF.js → index-Cmj3dp3U.js} +3 -3
- package/dist/{index-Dy_n2MPD.js → index-DEovHqJS.js} +4 -4
- package/dist/{index-oc8HPfOF.js → index-DOcwHfd3.js} +12 -12
- package/dist/{index-CLzkn733.js → index-DSlXIHtr.js} +11869 -11391
- package/dist/{index-DaJ1272l.js → index-PIAjHNgG.js} +10 -10
- package/dist/{index-CrC4B7xn.js → index-SiMIoFT9.js} +2 -2
- package/dist/{index-DXdD3L9f.js → index-Y94UWILI.js} +179 -179
- package/dist/{index-CjtwASJt.js → index-baetUfmH.js} +4 -4
- package/dist/{index.es-Bsr7zP98.js → index.es-D6RvS0tB.js} +1 -1
- package/dist/{index.es-C-j-Ghef.js → index.es-TLoHC_Sf.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/{info-circle-Dla9169_.js → info-circle-BYfEprqC.js} +1 -1
- package/dist/{info-BTLQJ-wd.js → info-dh7qmm_R.js} +1 -1
- package/dist/{lightbulb-PN8DA_Wh.js → lightbulb-3S8w5B31.js} +1 -1
- package/dist/{mail-BGYZut_4.js → mail-DgcPoOPs.js} +1 -1
- package/dist/{mobile-BM760ZzX.js → mobile-C8egRR0V.js} +1 -1
- package/dist/{more-rHGnl2ck.js → more-CU_oPwwY.js} +1 -1
- package/dist/{network-placeholder-CyQl-3_2.js → network-placeholder-CqjaxlS7.js} +1 -1
- package/dist/{nftPlaceholder-nuUJ8nKY.js → nftPlaceholder-D6mZlZmz.js} +1 -1
- package/dist/{off-GYlwYDrT.js → off-DHeUICx6.js} +1 -1
- package/dist/{play-store-Ck01Ez1F.js → play-store-DyGxjYv5.js} +1 -1
- package/dist/{plus-CQfXWgLw.js → plus-k4hEdLAH.js} +1 -1
- package/dist/{qr-code-CyLVwLY7.js → qr-code-CkavLc0Z.js} +1 -1
- package/dist/{recycle-horizontal-DvnWPcEQ.js → recycle-horizontal-YzkyX2fY.js} +1 -1
- package/dist/{refresh-BOxj8b2n.js → refresh-E1vpdqCO.js} +1 -1
- package/dist/{reown-logo-D1iprOTg.js → reown-logo-BZbc_-R6.js} +1 -1
- package/dist/{search-DrPaZPnc.js → search-B9vQkIsQ.js} +1 -1
- package/dist/{send-ybBREe4b.js → send-C9ROxhya.js} +1 -1
- package/dist/{shareicon-D3Qj5j1T.js → shareicon-CLveBf8l.js} +2 -2
- package/dist/{swapHorizontal-BddjZdXK.js → swapHorizontal-BhLDDuiL.js} +1 -1
- package/dist/{swapHorizontalBold-B6AWjPZ9.js → swapHorizontalBold-B1IxJLem.js} +1 -1
- package/dist/{swapHorizontalMedium-CNacWoBn.js → swapHorizontalMedium--fvn_6KH.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-B8VcPnqt.js → swapHorizontalRoundedBold-fZowAp5m.js} +1 -1
- package/dist/{swapVertical-zY2BbSyQ.js → swapVertical-CDwndQ4s.js} +1 -1
- package/dist/{telegram-DS4l-8Oc.js → telegram-BLbguJ3E.js} +1 -1
- package/dist/{three-dots-RctNqamK.js → three-dots-DyIG0Aiq.js} +1 -1
- package/dist/{twitch-CJ0llIIH.js → twitch-054mPrps.js} +1 -1
- package/dist/{twitterIcon-pgvN9-bP.js → twitterIcon-DrlgKmas.js} +1 -1
- package/dist/{unsupportedProp-BJVuEW_b.js → unsupportedProp-Dr6Tadlk.js} +1 -1
- package/dist/{useRegisterError-C_YLA1dw.js → useRegisterError-C52MuupC.js} +1 -1
- package/dist/{verify-filled-meyb7E16.js → verify-filled-Dw1_4VEj.js} +1 -1
- package/dist/{verify-BeZLo1Fq.js → verify-uz7q7EMX.js} +1 -1
- package/dist/{w3m-modal-C-Jp9NVv.js → w3m-modal-CJM8um8G.js} +2 -2
- package/dist/{wallet-CFcOgSsz.js → wallet-a9cCMI05.js} +1 -1
- package/dist/{wallet-placeholder-CeUMILZq.js → wallet-placeholder-Cqiz2_rA.js} +1 -1
- package/dist/{walletconnect-D6LB1PyC.js → walletconnect-96twp7MP.js} +1 -1
- package/dist/{warning-circle-BRtzofvT.js → warning-circle-C4mV6fIZ.js} +1 -1
- package/dist/{x-DKQAOOh3.js → x-vRe7FHUS.js} +1 -1
- package/package.json +7 -19
- package/dist/secp256k1-DgmH1qVg.js +0 -1251
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as u, jsx as e, Fragment as
|
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
|
4
|
-
import { u as a, l as pe, a as i1, c as Ve } from "./index-
|
5
|
-
import { C as j1, M as L1, g as e1 } from "./getChainIds-
|
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-C52MuupC.js";
|
4
|
+
import { u as a, l as pe, a as i1, c as Ve } from "./index-DSlXIHtr.js";
|
5
|
+
import { C as j1, M as L1, g as e1 } from "./getChainIds-B4BLdhKd.js";
|
6
6
|
import { useQuery as l1 } from "@tanstack/react-query";
|
7
7
|
import { useAccount as ge, useConnect as P1, useConnections as F1, useBalance as M1 } from "wagmi";
|
8
|
-
import { useDynamicContext as Ne, useIsLoggedIn as E1, useUserWallets as
|
9
|
-
import { S as
|
10
|
-
import { u as _1, B as V1 } from "./index-
|
11
|
-
import { useAccount as
|
12
|
-
import { S as Z1, D as H1 } from "./down-
|
8
|
+
import { useDynamicContext as Ne, useIsLoggedIn as E1, useUserWallets as O1 } from "@dynamic-labs/sdk-react-core";
|
9
|
+
import { S as R1, a as $1 } from "./shareicon-CLveBf8l.js";
|
10
|
+
import { u as _1, B as V1 } from "./index-Cmj3dp3U.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as a1, useSuggestChainAndConnect as z1, WalletType as S1 } from "graz";
|
12
|
+
import { S as Z1, D as H1 } from "./down-BAe_uoMx.js";
|
13
13
|
import { R as G1 } from "./index-CDq3vNnP.js";
|
14
|
-
import { C as ze, P as be, u as K1, g as t1 } from "./getCosmosAddress-
|
14
|
+
import { C as ze, P as be, u as K1, g as t1 } from "./getCosmosAddress-BfMdDDaH.js";
|
15
15
|
function c1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ u(
|
17
17
|
"svg",
|
@@ -47,7 +47,7 @@ function c1({ fill: t }) {
|
|
47
47
|
);
|
48
48
|
}
|
49
49
|
function J1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
50
|
-
const [r, c] = N(t), [b, d] = N(""), { tick: l, defaultCoin: p } =
|
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: [
|
53
53
|
/* @__PURE__ */ e(
|
@@ -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 L = { chain: y.name, ...y };
|
98
|
+
n(y), o(L);
|
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
|
|
@@ -106,7 +106,7 @@ function J1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
106
106
|
/* @__PURE__ */ e("img", { src: (T = y.image) != null && T.length ? y.image : p, className: "bw-rounded-[50%] bw-border bw-border-border-primary", width: 25, height: 25, alt: "img" }),
|
107
107
|
" ",
|
108
108
|
/* @__PURE__ */ e("p", { children: y.name }),
|
109
|
-
s.chain === y.name ? /* @__PURE__ */ e("img", { src: l, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(
|
109
|
+
s.chain === y.name ? /* @__PURE__ */ e("img", { src: l, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(K, {})
|
110
110
|
] }),
|
111
111
|
/* @__PURE__ */ u("div", { className: "bw-pr-2", children: [
|
112
112
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal", children: "Tokens" }),
|
@@ -128,7 +128,7 @@ function Q1(t) {
|
|
128
128
|
return t.slice(0, 2) === "0x" ? !0 : n ? t == n : !1;
|
129
129
|
}
|
130
130
|
function W1(t) {
|
131
|
-
const [n, o] = N({}), s = a((l) => l.cosmosChainIds), { data: r } =
|
131
|
+
const [n, o] = N({}), s = a((l) => l.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: s,
|
133
133
|
multiChain: !0
|
134
134
|
}), c = a((l) => l.fromChain), { data: b } = a1({
|
@@ -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
|
+
), L = pe.keyBy(T, "denom");
|
144
|
+
o(L);
|
145
145
|
}
|
146
146
|
}
|
147
147
|
return B(() => {
|
@@ -201,7 +201,7 @@ function Y1({ selectedChain: t }) {
|
|
201
201
|
className: "bw-w-[80px] bw-h-[80px] bw-border-border-primary bw-border-2 bw-opacity-50 bw-rounded-[50%]",
|
202
202
|
alt: "chain"
|
203
203
|
}
|
204
|
-
) : /* @__PURE__ */ e(
|
204
|
+
) : /* @__PURE__ */ e(K, {}),
|
205
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(U1, { 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: [
|
@@ -217,83 +217,83 @@ function Y1({ selectedChain: t }) {
|
|
217
217
|
] });
|
218
218
|
}
|
219
219
|
const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s, showExchangeList: r, setCoinData: c, setChainData: b }) {
|
220
|
-
var
|
220
|
+
var Be, Ae;
|
221
221
|
a((w) => w.searchCustomCoin);
|
222
|
-
const d = a((w) => w.setSearchCustomCoin), { ref: l, inView: p } = _1(), { getWallet: y } = ke({}), { connected: I, address: T } = i1(), { isConnected:
|
222
|
+
const d = a((w) => w.setSearchCustomCoin), { ref: l, inView: p } = _1(), { getWallet: y } = ke({}), { connected: I, address: T } = i1(), { isConnected: L, address: f } = ge(), { primaryWallet: h } = Ne();
|
223
223
|
E1();
|
224
|
-
const C = y(n), A = a((w) => w.fromChain), v = a((w) => w.fromCoin), Z = a((w) => w.toChain),
|
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, P] = N(!1), { cosmosBalance: R } = W1(n), { defaultCoin: _ } = Ee, [J, g] = N(0), m = I1(null), { data: k } = Oe({
|
225
225
|
chainId: [n.chainId],
|
226
226
|
multiChain: !0
|
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" && ((
|
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);
|
228
228
|
a((w) => w.setToDisconnect);
|
229
|
-
const x = a((w) => w.customWallet),
|
229
|
+
const x = a((w) => w.customWallet), O = a((w) => w.setCustomWallet), $ = a((w) => w.tokens), [E, j] = N([]), [V, ie] = N([]), [Te, Y] = N([]), G = $, Q = l1({
|
230
230
|
queryKey: ["balance", C == null ? void 0 : C.address, n],
|
231
231
|
queryFn: async () => await (await Ve.fetchBalance(C.address, n.chainId)).json(),
|
232
|
-
enabled: !!((
|
232
|
+
enabled: !!((Ae = C == null ? void 0 : C.address) != null && Ae.length && n.chainId),
|
233
233
|
refetchOnWindowFocus: !1
|
234
234
|
});
|
235
|
-
function
|
236
|
-
var
|
237
|
-
let
|
238
|
-
return w.networkType == "cosmos" ? $e(((
|
235
|
+
function z(w) {
|
236
|
+
var ee, ae, oe, se, q, W, U, te, S, X, ce, ne;
|
237
|
+
let D = b1(w.address);
|
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 && Q1(o) && !
|
241
|
+
o.length > 40 && Q1(o) && !V.length ? (P(!0), d({
|
242
242
|
chainId: n.chainId,
|
243
243
|
address: o
|
244
244
|
})) : o.length || (P(!1), d({ chainId: "", address: "" }));
|
245
|
-
}, [o,
|
245
|
+
}, [o, V]), B(() => {
|
246
246
|
g(0);
|
247
247
|
}, [o]);
|
248
|
-
function
|
249
|
-
g(0),
|
248
|
+
function Ie() {
|
249
|
+
g(0), ie([]), m.current.scrollTo(0, 0);
|
250
250
|
}
|
251
251
|
B(() => {
|
252
|
-
var w,
|
253
|
-
|
254
|
-
}, [
|
255
|
-
|
252
|
+
var w, D;
|
253
|
+
G != null && G.isSuccess && (n != null && n.chainId) && j(((D = (w = G == null ? void 0 : G.data) == null ? void 0 : w.data) == null ? void 0 : D[n == null ? void 0 : n.chainId]) || []);
|
254
|
+
}, [G, n.chainId]), B(() => {
|
255
|
+
Ie();
|
256
256
|
}, [n.chainId]);
|
257
257
|
function ye() {
|
258
|
-
var
|
259
|
-
let w = (
|
260
|
-
var
|
261
|
-
return ((
|
262
|
-
})) == null ? void 0 :
|
263
|
-
if (M) return
|
264
|
-
}),
|
265
|
-
|
258
|
+
var se;
|
259
|
+
let w = (se = E == null ? void 0 : E.filter((q) => {
|
260
|
+
var W, U, te, S;
|
261
|
+
return ((W = q.name) == null ? void 0 : W.toLowerCase().includes(o == null ? void 0 : o.toLowerCase())) || ((U = q.symbol) == null ? void 0 : U.toLowerCase().includes(o == null ? void 0 : o.toLowerCase())) || ((S = (te = q.address) == null ? void 0 : te.toLowerCase()) == null ? void 0 : S.includes(o == null ? void 0 : o.toLowerCase()));
|
262
|
+
})) == null ? void 0 : se.sort((q, W) => {
|
263
|
+
if (M) return z(W) * W.lastPrice - z(q) * q.lastPrice;
|
264
|
+
}), D = 20, ee = J * D, ae = ee + D, oe = w.slice(ee, ae);
|
265
|
+
J == 0 ? ie([...oe]) : ie([...V, ...oe]);
|
266
266
|
}
|
267
267
|
return B(() => {
|
268
268
|
E != null && E.length && ye();
|
269
|
-
}, [E, o,
|
269
|
+
}, [E, o, J, M, R, Q.data]), B(() => {
|
270
270
|
p && g((w) => w + 1);
|
271
|
-
}, [p]), /* @__PURE__ */ e("div", { ref: m, className: " bw-h-[200px] bw-pr-2 md:bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children:
|
272
|
-
var ae,
|
271
|
+
}, [p]), /* @__PURE__ */ e("div", { ref: m, className: " bw-h-[200px] bw-pr-2 md:bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: V && (V == null ? void 0 : V.length) > 0 ? V == null ? void 0 : V.map((w, D, ee) => {
|
272
|
+
var ae, oe, se, q, W, U;
|
273
273
|
return /* @__PURE__ */ u(
|
274
274
|
"div",
|
275
275
|
{
|
276
|
-
ref:
|
276
|
+
ref: ee.length >= 20 && ee.length - 1 === D ? l : null,
|
277
277
|
className: `bw-py-2
|
278
|
-
${r == "from" &&
|
278
|
+
${r == "from" && H._id !== w._id || r == "to" && v._id !== w._id, ""}
|
279
279
|
bw-flex bw-items-center bw-justify-between bw-cursor-pointer bw-border-b bw-border-border-primary
|
280
280
|
|
281
281
|
}`,
|
282
282
|
onClick: async () => {
|
283
|
-
var S,
|
284
|
-
let
|
283
|
+
var S, X, ce, ne, Ce, le, we, je, ve, Le, Pe;
|
284
|
+
let te = {
|
285
285
|
// ...coinData,
|
286
286
|
coin: w.symbol,
|
287
287
|
...w,
|
288
|
-
availBal: ((Ce = (
|
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, ((Pe = (Le = (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 : Le.asset) == null ? void 0 : Pe.decimals) || 0)
|
289
289
|
};
|
290
|
-
c(
|
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
|
},
|
292
292
|
children: [
|
293
293
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-justify-center bw-w-max bw-gap-x-2", children: [
|
294
294
|
/* @__PURE__ */ u("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(ae = w.image) != null && ae.length ? "bw-bg-background-coin" : ""}`, children: [
|
295
|
-
(
|
296
|
-
(
|
295
|
+
(oe = w.image) != null && oe.length ? /* @__PURE__ */ e("img", { src: w.image, className: "bw-rounded-[50%] bw-max-w-[30px] bw-max-h-[30px] bw-object-contain", width: 30, height: 30, alt: "img" }) : /* @__PURE__ */ e("img", { src: _, className: "bw-rounded-[50%]", width: 30, height: 30, alt: "img" }),
|
296
|
+
(se = n == null ? void 0 : n.image) != null && se.length ? /* @__PURE__ */ e("img", { src: n.image, className: `bw-absolute ${(q = n == null ? void 0 : n.image) != null && q.length ? "bw-bg-background-coin" : ""} bw-right-0 bw-max-w-[16px] bw-max-h-[16px] bw-object-contain bw-bottom-[-4px] bw-border bw-border-border-primary bw-rounded-[50%]`, width: 16, height: 16, alt: "img" }) : /* @__PURE__ */ e("img", { src: _, className: "bw-absolute bw-bg-background-coin bw-right-0 bw-bottom-[-4px] bw-border bw-border-border-primary bw-rounded-[50%]", width: 16, height: 16, alt: "img" })
|
297
297
|
] }),
|
298
298
|
/* @__PURE__ */ u("div", { children: [
|
299
299
|
/* @__PURE__ */ u("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
@@ -310,78 +310,78 @@ const D1 = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
310
310
|
/* @__PURE__ */ e(
|
311
311
|
"a",
|
312
312
|
{
|
313
|
-
href: (
|
313
|
+
href: (U = (W = n.explorer) == null ? void 0 : W.token) == null ? void 0 : U.replace("{tokenAddress}", w.address),
|
314
314
|
target: "_blank",
|
315
|
-
onClick: (
|
316
|
-
|
315
|
+
onClick: (te) => {
|
316
|
+
te.stopPropagation();
|
317
317
|
},
|
318
318
|
className: "hover:bw-opacity-70",
|
319
|
-
children: /* @__PURE__ */ e(
|
319
|
+
children: /* @__PURE__ */ e(R1, { fill: "var(--tw-text-secondary)" })
|
320
320
|
}
|
321
321
|
)
|
322
322
|
] })
|
323
323
|
] })
|
324
324
|
] })
|
325
325
|
] }),
|
326
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && x && ((x == null ? void 0 : x.length) > 30 || F) ? /* @__PURE__ */ e(
|
326
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && x && ((x == null ? void 0 : x.length) > 30 || F) ? /* @__PURE__ */ e(K, {}) : Q.isFetching ? /* @__PURE__ */ e(_e, { size: 12, thickness: 4, color: "inherit" }) : M ? z(w) > 0 ? /* @__PURE__ */ u(K, { children: [
|
327
327
|
/* @__PURE__ */ e(
|
328
328
|
De,
|
329
329
|
{
|
330
|
-
value:
|
330
|
+
value: z(w) || "",
|
331
331
|
options: {
|
332
332
|
maxDecimals: 10
|
333
333
|
}
|
334
334
|
}
|
335
335
|
),
|
336
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children:
|
336
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: z(w) * w.lastPrice > 0 ? /* @__PURE__ */ u(K, { children: [
|
337
337
|
"$",
|
338
338
|
/* @__PURE__ */ e(
|
339
339
|
De,
|
340
340
|
{
|
341
|
-
value: $e(
|
341
|
+
value: $e(z(w) * w.lastPrice),
|
342
342
|
options: {
|
343
343
|
maxDecimals: 10
|
344
344
|
}
|
345
345
|
}
|
346
346
|
)
|
347
347
|
] }) : "" })
|
348
|
-
] }) : /* @__PURE__ */ e(
|
348
|
+
] }) : /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ e(K, {}) }) })
|
349
349
|
]
|
350
350
|
},
|
351
|
-
|
351
|
+
D
|
352
352
|
);
|
353
|
-
}) :
|
353
|
+
}) : re && !($.isLoading && $.isFetching) ? /* @__PURE__ */ e(Y1, { 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
355
|
function et({ 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, L] = 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
|
-
var x,
|
360
|
-
if ((
|
361
|
-
let
|
362
|
-
|
359
|
+
var x, O, $, E;
|
360
|
+
if ((O = (x = b.data) == null ? void 0 : x.data) != null && O.length) {
|
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)), L(j);
|
363
363
|
}
|
364
|
-
}, [
|
364
|
+
}, [H, (g = b.data) == null ? void 0 : g.data, s, C]), B(() => {
|
365
365
|
A(s);
|
366
366
|
}, [s]), B(() => {
|
367
|
-
var x,
|
368
|
-
if ((
|
369
|
-
let E = ($ = b.data) == null ? void 0 : $.data.filter((
|
367
|
+
var x, O, $;
|
368
|
+
if ((O = (x = b.data) == null ? void 0 : x.data) != null && O.length) {
|
369
|
+
let E = ($ = b.data) == null ? void 0 : $.data.filter((j) => !0);
|
370
370
|
h(E.length);
|
371
371
|
}
|
372
372
|
}, [(m = b.data) == null ? void 0 : m.data]);
|
373
|
-
function
|
373
|
+
function re(x, O) {
|
374
374
|
var $, E;
|
375
|
-
($ = x.chain) != null && $.length && ((E =
|
375
|
+
($ = x.chain) != null && $.length && ((E = O == null ? void 0 : O.coin) != null && E.length) && o();
|
376
376
|
}
|
377
377
|
function P() {
|
378
378
|
l(!1);
|
379
379
|
}
|
380
|
-
function
|
380
|
+
function R(x) {
|
381
381
|
A(x);
|
382
382
|
}
|
383
|
-
const { tick:
|
384
|
-
return d ? /* @__PURE__ */ e(J1, { handleSetChainData:
|
383
|
+
const { tick: _, defaultCoin: J } = Ee;
|
384
|
+
return d ? /* @__PURE__ */ e(J1, { handleSetChainData: R, data: (k = b.data) == null ? void 0 : k.data, handleBack: P, 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(
|
@@ -400,7 +400,7 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
400
400
|
] })
|
401
401
|
] }),
|
402
402
|
b.isLoading ? /* @__PURE__ */ e($1, { 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
|
-
b.isSuccess && T.map((x,
|
403
|
+
b.isSuccess && T.map((x, O) => {
|
404
404
|
var $, E;
|
405
405
|
return /* @__PURE__ */ e(
|
406
406
|
"div",
|
@@ -413,26 +413,26 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
413
413
|
"div",
|
414
414
|
{
|
415
415
|
onClick: () => {
|
416
|
-
let
|
416
|
+
let j = {
|
417
417
|
chain: x.name,
|
418
418
|
...x
|
419
419
|
// networkType: "cosmos",
|
420
420
|
};
|
421
|
-
|
421
|
+
R(j);
|
422
422
|
},
|
423
423
|
className: "bw-p-2 bw-w-full bw-aspect-video bw-relative bw-z-10 bw-bg-background-networkcard bw-rounded-md bw-flex bw-flex-col bw-justify-center bw-items-center",
|
424
424
|
style: { cursor: "pointer" },
|
425
425
|
children: [
|
426
|
-
/* @__PURE__ */ e("img", { src: ($ = x.image) != null && $.length ? x.image :
|
426
|
+
/* @__PURE__ */ e("img", { src: ($ = x.image) != null && $.length ? x.image : J, width: 25, className: "bw-rounded-[50%] bw-border bw-border-border-primary", height: 25, alt: "img" }),
|
427
427
|
" ",
|
428
428
|
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${C.name == x.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((E = x.name) == null ? void 0 : E.length) > 7 ? x.name.substring(0, 7) + ".." : x.name }),
|
429
|
-
(C == null ? void 0 : C.chain) == x ? /* @__PURE__ */ e("img", { width: 10, height: 10, src:
|
429
|
+
(C == null ? void 0 : C.chain) == x ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: _ }) : /* @__PURE__ */ e(K, {})
|
430
430
|
]
|
431
431
|
},
|
432
|
-
|
432
|
+
O
|
433
433
|
)
|
434
434
|
},
|
435
|
-
|
435
|
+
O
|
436
436
|
);
|
437
437
|
}),
|
438
438
|
b.isSuccess && T.length ? /* @__PURE__ */ e("div", { className: "bw-p-[2px] bw-w-full", children: /* @__PURE__ */ u(
|
@@ -448,7 +448,7 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
448
448
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-primary", children: "Networks" })
|
449
449
|
]
|
450
450
|
}
|
451
|
-
) }) : /* @__PURE__ */ e(
|
451
|
+
) }) : /* @__PURE__ */ e(K, {})
|
452
452
|
] })
|
453
453
|
] }),
|
454
454
|
/* @__PURE__ */ u("div", { children: [
|
@@ -478,7 +478,7 @@ function et({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
478
478
|
]
|
479
479
|
}
|
480
480
|
),
|
481
|
-
/* @__PURE__ */ e(D1, { value: p, handleClosePopup:
|
481
|
+
/* @__PURE__ */ e(D1, { value: p, handleClosePopup: re, showExchangeList: c, setChainData: t, setCoinData: n, selectChainState: C })
|
482
482
|
] })
|
483
483
|
] });
|
484
484
|
}
|
@@ -490,7 +490,7 @@ 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, [L, f] = N(), { connector: h } = ge(), { connectors: C } = P1(), A = () => {
|
494
494
|
c(o), o == "to" ? (v(), n(!0)) : v();
|
495
495
|
};
|
496
496
|
F1(), B(() => {
|
@@ -499,9 +499,9 @@ function tt({
|
|
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" && (L != null && L[h == null ? void 0 : h.uid]), r();
|
503
503
|
}
|
504
|
-
return /* @__PURE__ */ e(
|
504
|
+
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
|
505
505
|
"button",
|
506
506
|
{
|
507
507
|
"aria-haspopup": "true",
|
@@ -509,7 +509,7 @@ function tt({
|
|
509
509
|
id: "basic-button",
|
510
510
|
style: { fontSize: "12px" },
|
511
511
|
className: "bw-bg-background-container bw-flex bw-items-center bw-justify-center bw-gap-x-2 bw-mb-[4px] bw-w-[100px] bw-h-[25px] bw-rounded-xl bw-border bw-border-border-primary",
|
512
|
-
children: l ? /* @__PURE__ */ u(
|
512
|
+
children: l ? /* @__PURE__ */ u(K, { children: [
|
513
513
|
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((l == null ? void 0 : l.substring(0, 4)) || "") + "..." + ((l == null ? void 0 : l.substring(l.length - 4, l.length)) || "") }),
|
514
514
|
/* @__PURE__ */ e(
|
515
515
|
"div",
|
@@ -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,
|
525
|
+
var A, v, Z, H, re, P, 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 } =
|
528
|
+
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet: L } = ke({
|
529
529
|
chainData: t,
|
530
530
|
show: c
|
531
531
|
});
|
@@ -557,16 +557,16 @@ 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(H1, { fill: (
|
560
|
+
/* @__PURE__ */ e(H1, { 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
|
]
|
564
564
|
}
|
565
565
|
)
|
566
566
|
]
|
567
567
|
}
|
568
568
|
),
|
569
|
-
/* @__PURE__ */ e(nt, { isConnected: c == "to" ? (f == null ? void 0 : f.networkType) === (h == null ? void 0 : h.networkType) ? !!((
|
569
|
+
/* @__PURE__ */ e(nt, { isConnected: c == "to" ? (f == null ? void 0 : f.networkType) === (h == null ? void 0 : h.networkType) ? !!((R = (P = L(f)) == null ? void 0 : P.address) != null && R.length || (d == null ? void 0 : d.length) > 30) : !!((J = (_ = L(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
572
|
function nt({ isConnected: t, setConnectWalletField: n, handleShowWallet: o, show: s, chainData: r, handleToDisconnect: c }) {
|
@@ -752,7 +752,7 @@ function d1({ options: t, handleOptions: n }) {
|
|
752
752
|
{
|
753
753
|
fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)"
|
754
754
|
}
|
755
|
-
) : /* @__PURE__ */ e(
|
755
|
+
) : /* @__PURE__ */ e(K, {}),
|
756
756
|
/* @__PURE__ */ e(
|
757
757
|
"p",
|
758
758
|
{
|
@@ -908,11 +908,11 @@ function x1() {
|
|
908
908
|
] });
|
909
909
|
}
|
910
910
|
function it({ 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),
|
912
|
-
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), L = 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
|
+
function H(g) {
|
913
913
|
b(""), o(g.target.value);
|
914
914
|
}
|
915
|
-
function
|
915
|
+
function re(g, m) {
|
916
916
|
b(""), r(g);
|
917
917
|
}
|
918
918
|
B(() => {
|
@@ -926,37 +926,37 @@ function it({ handleClose: t }) {
|
|
926
926
|
B(() => {
|
927
927
|
y(f);
|
928
928
|
}, [h]);
|
929
|
-
function
|
929
|
+
function R(g) {
|
930
930
|
y(g.target.value);
|
931
931
|
}
|
932
932
|
B(() => {
|
933
933
|
l(I);
|
934
934
|
}, [I]);
|
935
|
-
function
|
935
|
+
function _() {
|
936
936
|
if (d == "" && (n.length || s.name.length)) {
|
937
937
|
C(""), b("Please select a mode");
|
938
938
|
return;
|
939
939
|
}
|
940
|
-
n.length ? (
|
940
|
+
n.length ? (L(n), v(s)) : (L(""), P()), C(d), h(p), t();
|
941
941
|
}
|
942
|
-
function
|
942
|
+
function J(g) {
|
943
943
|
b(""), l(g);
|
944
944
|
}
|
945
945
|
return B(() => {
|
946
946
|
!T && !A.name.length && (C(""), l(""));
|
947
947
|
}, [T, A.name]), /* @__PURE__ */ u("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[447px] bw-rounded-lg bw-border bw-p-3 px-4 md:bw-px-6 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
948
948
|
/* @__PURE__ */ e(p1, { handleClose: t }),
|
949
|
-
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(g1, { slippage: p, handleSlippage:
|
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(ot, { mode: d, handleMode:
|
952
|
-
/* @__PURE__ */ e(d1, { options: s, handleOptions:
|
951
|
+
/* @__PURE__ */ e(ot, { mode: d, handleMode: J }),
|
952
|
+
/* @__PURE__ */ e(d1, { options: s, handleOptions: re }),
|
953
953
|
/* @__PURE__ */ e(
|
954
954
|
u1,
|
955
955
|
{
|
956
956
|
title: "Max Cap",
|
957
957
|
inputSideText: "SOL",
|
958
958
|
inputVal: n,
|
959
|
-
handleCustomVal:
|
959
|
+
handleCustomVal: H
|
960
960
|
}
|
961
961
|
),
|
962
962
|
/* @__PURE__ */ u("div", { className: "bw-relative", children: [
|
@@ -964,7 +964,7 @@ function it({ handleClose: t }) {
|
|
964
964
|
/* @__PURE__ */ e(
|
965
965
|
m1,
|
966
966
|
{
|
967
|
-
handleSave:
|
967
|
+
handleSave: _,
|
968
968
|
isSaveButtonDisabled: Z
|
969
969
|
}
|
970
970
|
)
|
@@ -972,7 +972,7 @@ function it({ handleClose: t }) {
|
|
972
972
|
] });
|
973
973
|
}
|
974
974
|
function lt({ 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),
|
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), L = s == y && p.name == n.name && I == c;
|
976
976
|
function f(v, Z) {
|
977
977
|
o(v);
|
978
978
|
}
|
@@ -1011,7 +1011,7 @@ function lt({ handleClose: t }) {
|
|
1011
1011
|
m1,
|
1012
1012
|
{
|
1013
1013
|
handleSave: C,
|
1014
|
-
isSaveButtonDisabled:
|
1014
|
+
isSaveButtonDisabled: L
|
1015
1015
|
}
|
1016
1016
|
)
|
1017
1017
|
] });
|
@@ -1133,7 +1133,7 @@ function wt() {
|
|
1133
1133
|
function s() {
|
1134
1134
|
n(!1);
|
1135
1135
|
}
|
1136
|
-
return /* @__PURE__ */ u(
|
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
1138
|
/* @__PURE__ */ e(dt, {}),
|
1139
1139
|
/* @__PURE__ */ e(
|
@@ -1148,7 +1148,7 @@ function wt() {
|
|
1148
1148
|
/* @__PURE__ */ e(at, { open: t, handleClose: s })
|
1149
1149
|
] });
|
1150
1150
|
}
|
1151
|
-
let o1,
|
1151
|
+
let o1, Fe, he, Me = 0;
|
1152
1152
|
function ut({ 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(() => {
|
@@ -1157,10 +1157,10 @@ function ut({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1157
1157
|
var h;
|
1158
1158
|
b === 0 && document.visibilityState === "visible" && !t && r && ((h = y.address) != null && h.length && c.refetch(), o.refetch());
|
1159
1159
|
}, [b, t, r]), B(() => {
|
1160
|
-
o.isFetching && (
|
1160
|
+
o.isFetching && (Me = 0);
|
1161
1161
|
}, [o.isFetching]), B(() => {
|
1162
1162
|
if (!pe.isEmpty(s)) {
|
1163
|
-
const h = Math.max(0, s.deadline -
|
1163
|
+
const h = Math.max(0, s.deadline - Me);
|
1164
1164
|
d(h);
|
1165
1165
|
}
|
1166
1166
|
return () => {
|
@@ -1170,20 +1170,20 @@ function ut({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1170
1170
|
document.removeEventListener("visibilitychange", f);
|
1171
1171
|
}), [s]);
|
1172
1172
|
function T() {
|
1173
|
-
o1 = Date.now(), d((h) => (
|
1173
|
+
o1 = Date.now(), d((h) => (Fe = h, h));
|
1174
1174
|
}
|
1175
|
-
function
|
1175
|
+
function L() {
|
1176
1176
|
let h = Date.now(), C = Math.round((h - o1) / 1e3);
|
1177
|
-
s.deadline -
|
1177
|
+
s.deadline - Fe + C > s.deadline ? n((A) => {
|
1178
1178
|
var v;
|
1179
1179
|
return A || ((v = y.address) != null && v.length && c.refetch(), o.refetch(), d(s.deadline)), A;
|
1180
|
-
}) :
|
1180
|
+
}) : Fe && C && d(Fe - C);
|
1181
1181
|
}
|
1182
1182
|
function f() {
|
1183
|
-
document.visibilityState === "visible" ?
|
1183
|
+
document.visibilityState === "visible" ? L() : T();
|
1184
1184
|
}
|
1185
1185
|
return B(() => (pe.isEmpty(s) ? he && clearInterval(he) : he = setInterval(() => {
|
1186
|
-
d((h) => h <= 0 ? (
|
1186
|
+
d((h) => h <= 0 ? (Me = 0, s.deadline) : (Me++, h - 1));
|
1187
1187
|
}, 1e3), () => {
|
1188
1188
|
he && clearInterval(he);
|
1189
1189
|
}), [s]), a((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
@@ -1228,7 +1228,7 @@ async function ft(t, n) {
|
|
1228
1228
|
return c;
|
1229
1229
|
}
|
1230
1230
|
function ht(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:
|
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: L } = Oe({
|
1232
1232
|
chainId: I,
|
1233
1233
|
multiChain: !0
|
1234
1234
|
}), f = a((m) => m.fromCoin), { data: h, isLoading: C } = M1({
|
@@ -1240,8 +1240,8 @@ function ht(t, n) {
|
|
1240
1240
|
data: A,
|
1241
1241
|
isLoading: v,
|
1242
1242
|
isFetching: Z,
|
1243
|
-
isInitialLoading:
|
1244
|
-
isRefetching:
|
1243
|
+
isInitialLoading: H,
|
1244
|
+
isRefetching: re
|
1245
1245
|
} = a1({
|
1246
1246
|
chainId: [l.chainId],
|
1247
1247
|
multiChain: !0
|
@@ -1259,7 +1259,7 @@ function ht(t, n) {
|
|
1259
1259
|
d(!1);
|
1260
1260
|
}
|
1261
1261
|
}
|
1262
|
-
async function
|
1262
|
+
async function R(m) {
|
1263
1263
|
try {
|
1264
1264
|
d(!0);
|
1265
1265
|
let k = await ft(r.address, m);
|
@@ -1268,95 +1268,95 @@ function ht(t, n) {
|
|
1268
1268
|
d(!1);
|
1269
1269
|
}
|
1270
1270
|
}
|
1271
|
-
let
|
1272
|
-
async function
|
1271
|
+
let _;
|
1272
|
+
async function J() {
|
1273
1273
|
if (!r) return;
|
1274
1274
|
const m = await r.connector.getPublicClient();
|
1275
1275
|
if (!m) return;
|
1276
1276
|
const k = new be(r.address);
|
1277
|
-
k && (
|
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" ? P() : l.chainId === "eclipse-svm" ? f.symbol == "ETH" ? P("https://eclipse.lgns.net/") :
|
1279
|
+
l.networkType == "sol" && (r != null && r.address) && (((F = f == null ? void 0 : f.symbol) == null ? void 0 : F.toLowerCase()) === "sol" ? P() : l.chainId === "eclipse-svm" ? f.symbol == "ETH" ? P("https://eclipse.lgns.net/") : R("https://eclipse.lgns.net/") : R());
|
1280
1280
|
}));
|
1281
1281
|
}
|
1282
|
-
B(() => ((l == null ? void 0 : l.networkType) === "sol" &&
|
1282
|
+
B(() => ((l == null ? void 0 : l.networkType) === "sol" && J(), async () => {
|
1283
1283
|
if (!r) return;
|
1284
|
-
(await r.connector.getPublicClient()).removeAccountChangeListener(
|
1284
|
+
(await r.connector.getPublicClient()).removeAccountChangeListener(_);
|
1285
1285
|
}), [r == null ? void 0 : r.address, l == null ? void 0 : l.networkType, f]);
|
1286
1286
|
async function g(m) {
|
1287
1287
|
var M, F;
|
1288
1288
|
let k = A[m] || A;
|
1289
1289
|
try {
|
1290
1290
|
d(!0);
|
1291
|
-
let x = await k.getAllBalances((M = T == null ? void 0 : T[m]) == null ? void 0 : M.bech32Address),
|
1292
|
-
s(((F =
|
1291
|
+
let x = await k.getAllBalances((M = T == null ? void 0 : T[m]) == null ? void 0 : M.bech32Address), O = pe.keyBy(x, "denom");
|
1292
|
+
s(((F = O[b1(f.address)]) == null ? void 0 : F.amount) / Math.pow(10, f.decimals) || 0), d(!1);
|
1293
1293
|
} catch {
|
1294
1294
|
d(!1);
|
1295
1295
|
}
|
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" ? P() : l.chainId == "eclipse-svm" ? f.symbol == "ETH" ? P("https://eclipse.lgns.net/") :
|
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" ? P() : l.chainId == "eclipse-svm" ? f.symbol == "ETH" ? P("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" && L && !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, L, 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 yt = de.lazy(() => import("./SwapAsset-
|
1305
|
+
const yt = de.lazy(() => import("./SwapAsset-tD6wSJDD.js")), Ct = de.lazy(() => import("./InputComp-bKVjlcbT.js")), vt = de.lazy(() => import("./QuotesProgress-DlgLQ2zo.js")), kt = de.lazy(() => import("./TxnButton-DefErcCE.js")), Nt = de.lazy(() => import("./index-DEovHqJS.js").then((t) => t.i)), Tt = de.lazy(() => import("./index-baetUfmH.js")), It = de.lazy(() => import("./LoadRoute-C3vokLk0.js")), Bt = de.lazy(() => import("./AllRoutes-B04uZfaa.js"));
|
1306
1306
|
function At({ 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:
|
1308
|
+
const [s, r] = N(), [c, b] = N(!1), [d, l] = N(!1), [p, y] = N(!1), [I, T] = N(!1), [L, f] = N("all"), [h, C] = N(!1), { primaryWallet: A } = Ne();
|
1309
|
+
O1();
|
1310
|
+
const { address: v } = ge(), { address: Z } = i1(), { getbal: H, isBalanceLoading: re } = ht(h), { data: P, isConnected: R } = Oe({ chainId: "cosmoshub-4" });
|
1311
1311
|
a((i) => i.configuration);
|
1312
|
-
const
|
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
|
1315
|
-
let
|
1316
|
-
const
|
1317
|
-
enabled:
|
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 } = mt(m, h, Re), { suggestAndConnectAsync: D } = z1(), 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, P == null ? void 0 : P.bech32Address, Y, Q, z, Ie, G, ye.value];
|
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 } = K1({
|
1317
|
+
enabled: ee,
|
1318
1318
|
dependency: ae,
|
1319
|
-
payload: [(m == null ? void 0 : m.networkType) === "cosmos" ? t1(P == null ? void 0 : P.bech32Address, (Ge = m == null ? void 0 : m.chainInfo) == null ? void 0 : Ge.bech32Config.bech32PrefixAccAddr) : ((Ke =
|
1320
|
-
}),
|
1321
|
-
queryKey: ["balance",
|
1322
|
-
queryFn: async () => await (await Ve.fetchBalance(
|
1323
|
-
enabled: !!((Qe =
|
1319
|
+
payload: [(m == null ? void 0 : m.networkType) === "cosmos" ? t1(P == null ? void 0 : P.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(P == null ? void 0 : P.bech32Address, (qe = k == null ? void 0 : k.chainInfo) == null ? void 0 : qe.bech32Config.bech32PrefixAccAddr) : ((Xe = U(k)) == null ? void 0 : Xe.address) || "", W]
|
1320
|
+
}), le = U(m), we = l1({
|
1321
|
+
queryKey: ["balance", le == null ? void 0 : le.address, m],
|
1322
|
+
queryFn: async () => await (await Ve.fetchBalance(le.address, m.chainId)).json(),
|
1323
|
+
enabled: !!((Qe = le == null ? void 0 : le.address) != null && Qe.length && m.chainId),
|
1324
1324
|
refetchOnWindowFocus: !1
|
1325
|
-
}), { quoteTimer:
|
1325
|
+
}), { quoteTimer: je } = ut({
|
1326
1326
|
routes: S,
|
1327
|
-
routesData:
|
1327
|
+
routesData: X,
|
1328
1328
|
confirmRoute: d,
|
1329
1329
|
setConfirmRoute: l,
|
1330
|
-
isRoutesEnabled:
|
1330
|
+
isRoutesEnabled: ee,
|
1331
1331
|
fetchBalance: we
|
1332
1332
|
});
|
1333
1333
|
B(() => {
|
1334
|
-
|
1334
|
+
j || ce({});
|
1335
1335
|
let i;
|
1336
|
-
return Number(
|
1336
|
+
return Number(j) > 0 && (i = setTimeout(() => {
|
1337
1337
|
T(!0);
|
1338
1338
|
}, 500)), () => {
|
1339
1339
|
clearTimeout(i), T(!1);
|
1340
1340
|
};
|
1341
|
-
}, [
|
1341
|
+
}, [j]), B(() => {
|
1342
1342
|
S.isFetching && ce({});
|
1343
1343
|
}, [S.isFetching]);
|
1344
1344
|
function ve(i) {
|
1345
1345
|
y(i);
|
1346
1346
|
}
|
1347
|
-
function
|
1347
|
+
function Le() {
|
1348
1348
|
r();
|
1349
1349
|
}
|
1350
|
-
async function
|
1351
|
-
if (
|
1350
|
+
async function Pe(i) {
|
1351
|
+
if (R)
|
1352
1352
|
try {
|
1353
1353
|
let ue = await e1();
|
1354
1354
|
if (ue.length && !ue.includes(i.chainId)) {
|
1355
|
-
let xe = await
|
1355
|
+
let xe = await D({
|
1356
1356
|
chainInfo: i,
|
1357
1357
|
walletType: S1.KEPLR
|
1358
|
-
}), me = await
|
1359
|
-
|
1358
|
+
}), me = await te(), fe = await e1();
|
1359
|
+
Te(fe);
|
1360
1360
|
}
|
1361
1361
|
} catch {
|
1362
1362
|
}
|
@@ -1364,10 +1364,10 @@ 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" && Pe(i.chainInfo), V(""), Ce({ error: "" }), s == "from" ? x({ ...i }) : s == "to" && O({ ...i });
|
1368
1368
|
}
|
1369
1369
|
function h1(i) {
|
1370
|
-
Ce({ error: "" }),
|
1370
|
+
Ce({ error: "" }), V(""), s == "from" ? $({ ...i }) : s == "to" && E({ ...i });
|
1371
1371
|
}
|
1372
1372
|
function Ze() {
|
1373
1373
|
b(!c);
|
@@ -1375,19 +1375,19 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1375
1375
|
function He(i) {
|
1376
1376
|
l(typeof i < "u" ? i : !d);
|
1377
1377
|
}
|
1378
|
-
function
|
1378
|
+
function Re(i) {
|
1379
1379
|
C(i);
|
1380
1380
|
}
|
1381
1381
|
function y1(i) {
|
1382
|
-
|
1382
|
+
Ae(i == null ? void 0 : i.provider), ce(i);
|
1383
1383
|
}
|
1384
1384
|
function C1() {
|
1385
1385
|
setTimeout(() => {
|
1386
|
-
|
1386
|
+
Re(!0), we.refetch();
|
1387
1387
|
}, 1e3);
|
1388
1388
|
}
|
1389
1389
|
function v1() {
|
1390
|
-
|
1390
|
+
V("");
|
1391
1391
|
}
|
1392
1392
|
function k1(i, ue, xe) {
|
1393
1393
|
Ve.fetchTokens(i.chainId, xe).then((me) => me.json()).then((me) => {
|
@@ -1403,11 +1403,11 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1403
1403
|
});
|
1404
1404
|
}
|
1405
1405
|
function N1() {
|
1406
|
-
|
1406
|
+
V(""), x(k), $(F), O(m), E(M), m.networkType !== k.networkType && Be("");
|
1407
1407
|
}
|
1408
1408
|
B(() => {
|
1409
|
-
|
1410
|
-
}, [
|
1409
|
+
_.isHistory && g === "" && (J({}), ve(!1));
|
1410
|
+
}, [_]);
|
1411
1411
|
function T1(i) {
|
1412
1412
|
var ue;
|
1413
1413
|
if (i && o.isSuccess && i !== (k == null ? void 0 : k.networkType) && i !== (m == null ? void 0 : m.networkType)) {
|
@@ -1419,19 +1419,19 @@ function At({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1419
1419
|
} else
|
1420
1420
|
return;
|
1421
1421
|
}
|
1422
|
-
return /* @__PURE__ */ e(B1, { fallback: /* @__PURE__ */ e(
|
1422
|
+
return /* @__PURE__ */ e(B1, { fallback: /* @__PURE__ */ e(K, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(Nt, { connectWalletField: L, handleShowWallet: t, handleRecentSelectedWallet: T1 }) : !d && !((We = _ == null ? void 0 : _.routeId) != null && We.length) ? c ? /* @__PURE__ */ e(Bt, { routes: S, handleShowAllRoutes: Ze, handleRoutesData: y1, convertVal: (F == null ? void 0 : F.lastPrice) || 0, amount: j }) : s ? /* @__PURE__ */ e(et, { chainData: s == "from" ? m : k, coinData: s == "from" ? M : F, setChainData: f1, setCoinData: h1, handleReset: Le, showExchangeList: s, fetchBalance: we, fetchChains: o }) : /* @__PURE__ */ u(K, { children: [
|
1423
1423
|
/* @__PURE__ */ e(wt, {}),
|
1424
1424
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1425
1425
|
/* @__PURE__ */ e(yt, { 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(Ct, { amount:
|
1430
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(It, { routes: S, handleShowAllRoutes: Ze, routesData:
|
1431
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (
|
1432
|
-
/* @__PURE__ */ e(vt, { routes: S, routesData:
|
1433
|
-
/* @__PURE__ */ e(kt, { routesData:
|
1434
|
-
] }) : /* @__PURE__ */ e(Tt, { handleConfirmClose: He, amount:
|
1429
|
+
/* @__PURE__ */ e(Ct, { amount: j, setAmount: V, fetchBalance: we, getCoinBalance: H, isBalanceLoading: re }),
|
1430
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(It, { 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
|
+
/* @__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(vt, { routes: S, routesData: X, confirmRoute: d, setConfirmRoute: l, isRoutesEnabled: ee, quoteTimer: je }),
|
1433
|
+
/* @__PURE__ */ e(kt, { 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(Tt, { handleConfirmClose: He, amount: j, routesData: X, resetAmount: v1, routes: S, handleStopRoute: ve, resetBalance: C1 }) }) });
|
1435
1435
|
}
|
1436
1436
|
function jt({ fetchChains: t }) {
|
1437
1437
|
const [n, o] = N(!1), { isConnected: s } = ge();
|