@blockend/widget 1.0.61-beta.2 → 1.0.61-beta.3
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/AdvancedSettings-BDdJbtcK.js +30 -0
- package/dist/{AllRoutes-DIWsY_7s.js → AllRoutes-BrDSLkEx.js} +9 -9
- package/dist/{Box-CSkOh5pT.js → Box-BTMntOnW.js} +1 -1
- package/dist/{EstGas-D0lMj040.js → EstGas-CELSR_co.js} +7 -7
- package/dist/{Grow-DArf5BOf.js → Grow--O3Q7qBB.js} +2 -2
- package/dist/{InputComp-BpwhlO5B.js → InputComp-CIMBouQg.js} +3 -3
- package/dist/{LoadRoute-Dqk83p2o.js → LoadRoute-DP9HswK0.js} +4 -4
- package/dist/{QuotesProgress-D-bhAdY6.js → QuotesProgress-DXyVWF9h.js} +1 -1
- package/dist/{SwapAsset-CeJghqM4.js → SwapAsset-d01boR2k.js} +1 -1
- package/dist/{Tooltip-Bo6E3Ppn.js → Tooltip-BGRxmZUc.js} +3 -3
- package/dist/{TxnButton-06UcI8vZ.js → TxnButton-DUhnDCLZ.js} +3 -3
- package/dist/{add-CnnoTaOE.js → add-BEjMXwS0.js} +1 -1
- package/dist/{all-wallets-77I8A1dR.js → all-wallets-D5ejBd2J.js} +1 -1
- package/dist/{app-store-BHbNWU5O.js → app-store-DyLpIyGe.js} +1 -1
- package/dist/{apple-BUqoJ3h4.js → apple-LF95M9ZO.js} +1 -1
- package/dist/{arrow-bottom-BKIkvLUW.js → arrow-bottom-WAJ3nKw-.js} +1 -1
- package/dist/{arrow-bottom-circle-CmtY1Go0.js → arrow-bottom-circle-BZnCDzRx.js} +1 -1
- package/dist/{arrow-left-B1RmdyFf.js → arrow-left-iCLozbpY.js} +1 -1
- package/dist/{arrow-right-DAGdMwrS.js → arrow-right-BbAPnR2v.js} +1 -1
- package/dist/{arrow-top-DL8aloED.js → arrow-top-Cam7P0Cq.js} +1 -1
- package/dist/{bank-Cho2fj04.js → bank-CisGvOQw.js} +1 -1
- package/dist/{basic-Hq9EE7JN.js → basic-D4ipPfXU.js} +3 -3
- package/dist/{browser-B1tFXGo3.js → browser-DuEN7q3p.js} +1 -1
- package/dist/{card-CAIekfsW.js → card-CsdJWKWP.js} +1 -1
- package/dist/{ccip-CQW-OT50.js → ccip-BKlgnW-G.js} +1 -1
- package/dist/{checkmark-CMNFl8gr.js → checkmark-DGMpHO3y.js} +1 -1
- package/dist/{checkmark-bold-jZ_-Wln9.js → checkmark-bold-CK87kMR1.js} +1 -1
- package/dist/{chevron-bottom-BXlfv0v_.js → chevron-bottom-C2O1FTiz.js} +1 -1
- package/dist/{chevron-left-CR6Vk7-R.js → chevron-left-BxFuIrMa.js} +1 -1
- package/dist/{chevron-right-CK7kmFE0.js → chevron-right-B5hvp_03.js} +1 -1
- package/dist/{chevron-top-5bB353uT.js → chevron-top-D_8IACK2.js} +1 -1
- package/dist/{chrome-store-3zRMRPZ3.js → chrome-store-u5HETQ34.js} +1 -1
- package/dist/{clock-C9VfcQU_.js → clock-B_BvmsVw.js} +1 -1
- package/dist/{close-Dp60_0UW.js → close-D4borsFC.js} +1 -1
- package/dist/{coinPlaceholder-B9q-Q9nc.js → coinPlaceholder-BdKcXcQe.js} +1 -1
- package/dist/{compass-D1YdDLDZ.js → compass-CeU27UPb.js} +1 -1
- package/dist/{copy-wpPbMuG7.js → copy-DnmfkWJf.js} +1 -1
- package/dist/{core-f2H2Z9Sf.js → core-R_avBv6F.js} +3 -3
- package/dist/{cursor-BGD-Vp6U.js → cursor-DFsrHX7h.js} +1 -1
- package/dist/{cursor-transparent-Df_S-DGP.js → cursor-transparent-C2Jspzlk.js} +1 -1
- package/dist/{desktop-xGzb89jl.js → desktop-Cvb4Bs-W.js} +1 -1
- package/dist/{disconnect-C-l5x3f5.js → disconnect-Cc3TuHcw.js} +1 -1
- package/dist/{discord-BMihtS7L.js → discord-BulP9OPs.js} +1 -1
- package/dist/{down-IP3JFhRv.js → down-DMOxb9X6.js} +2 -2
- package/dist/{etherscan-BIDZ39Go.js → etherscan-CLV4G1N3.js} +1 -1
- package/dist/{exclamation-triangle-DtY9538O.js → exclamation-triangle-CTNxc0i0.js} +1 -1
- package/dist/{extension-nyPuSGEb.js → extension-NL920RFJ.js} +1 -1
- package/dist/{external-link-CWQ6mRkJ.js → external-link-C06xueBw.js} +1 -1
- package/dist/{facebook-C9YV_9Ud.js → facebook-CUngbGFi.js} +1 -1
- package/dist/{farcaster-Bk5tC5cR.js → farcaster-DyF7oe3m.js} +1 -1
- package/dist/{filters-Boj-Safw.js → filters-NTcvQCDK.js} +1 -1
- package/dist/{getChainIds-DVwNZAc5.js → getChainIds-BPyuIG49.js} +2 -2
- package/dist/{getCosmosAddress-DGjk1iF-.js → getCosmosAddress-BxqNvT5E.js} +1284 -1285
- package/dist/{github-CqlLNrtO.js → github-C7AEFANq.js} +1 -1
- package/dist/{google-DWRbHt_B.js → google-D2eY5g0j.js} +1 -1
- package/dist/{hamburger-CCqMn9nd.js → hamburger-BBUxDW1l.js} +5 -5
- package/dist/{help-circle-Cv5722_F.js → help-circle-BsreVT6h.js} +1 -1
- package/dist/{id-BpuE8i1h.js → id-9IHoTVmk.js} +1 -1
- package/dist/{image-BLabe1u_.js → image-CpxDCWP0.js} +1 -1
- package/dist/{index-DIsRIvWS.js → index-AVgT1tC7.js} +78 -78
- package/dist/{index-BMaOhhWB.js → index-B5HYIYdX.js} +2 -2
- package/dist/{index-X1wa5bpP.js → index-BAPYRpZ5.js} +5 -5
- package/dist/{index-DtPZUylH.js → index-BBHRfWRe.js} +11 -11
- package/dist/{index-a8BP6V0o.js → index-BK-LO8mS.js} +4 -4
- package/dist/{index-B7xlfFYR.js → index-Bsolq3x5.js} +4 -4
- package/dist/{index-lJKy2Bhi.js → index-Bx-p5owo.js} +272 -272
- package/dist/{index-Bf3Fkna6.js → index-CsFCcGQR.js} +10 -10
- package/dist/{index-3TDndzHy.js → index-CtucwqhS.js} +1 -1
- package/dist/{index-C0l8Ijyj.js → index-CufwKYsS.js} +1 -1
- package/dist/{index-BmPN76Lg.js → index-DGEhy5MB.js} +7 -9
- package/dist/{index.es-BvE3zZVY.js → index.es-BU0GM1mV.js} +2 -2
- package/dist/{index.es-DLS0SSoV.js → index.es-DW2t7BAn.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-BROBzEn3.js → info-LwvH4jJX.js} +1 -1
- package/dist/{info-circle-BhnTaYwQ.js → info-circle-CpntIlZG.js} +1 -1
- package/dist/{lightbulb-BMm8pAvQ.js → lightbulb-D2pTnP9p.js} +1 -1
- package/dist/{mail-BBH0_xPX.js → mail-DJG_2nFe.js} +1 -1
- package/dist/{mobile-BKmYB0js.js → mobile-CfN1g0ky.js} +1 -1
- package/dist/{more-BgKFZ5_N.js → more-D_MQ1sJN.js} +1 -1
- package/dist/{network-placeholder-Bx4Pd_VA.js → network-placeholder-DIblWZzB.js} +1 -1
- package/dist/{nftPlaceholder-CjhjYlRs.js → nftPlaceholder-BbumxxR8.js} +1 -1
- package/dist/{off-CNWZ7rAK.js → off-BYUrtwej.js} +1 -1
- package/dist/{play-store-CLp2fzCO.js → play-store-iblBb5XO.js} +1 -1
- package/dist/{plus-BUG6XdxV.js → plus-D85wdmHo.js} +1 -1
- package/dist/{qr-code-C-JVP33d.js → qr-code-Dcybxb7U.js} +1 -1
- package/dist/{recycle-horizontal-C0QxOqzM.js → recycle-horizontal-Bd8ilzW8.js} +1 -1
- package/dist/{refresh-CyabrC0p.js → refresh-Dj6GhAr5.js} +1 -1
- package/dist/{reown-logo-ULFpSpZD.js → reown-logo-BUsYR2sc.js} +1 -1
- package/dist/{search-CzhkDgzL.js → search-AZfspUWP.js} +1 -1
- package/dist/{send-3zcoBLqV.js → send-CpZ6YcVZ.js} +1 -1
- package/dist/{swapHorizontal-DkBtpUHQ.js → swapHorizontal-Bp6G13yq.js} +1 -1
- package/dist/{swapHorizontalBold-CwigaZ5c.js → swapHorizontalBold-h5BpqwRP.js} +1 -1
- package/dist/{swapHorizontalMedium-CzzR3-0y.js → swapHorizontalMedium-C5OGmd3s.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-C055Y8zs.js → swapHorizontalRoundedBold-C_TWWmM4.js} +1 -1
- package/dist/{swapVertical-d-A3bfm6.js → swapVertical-DDcdq1Iq.js} +1 -1
- package/dist/{telegram--pfczlkG.js → telegram-6IwaAWkg.js} +1 -1
- package/dist/{three-dots-CIEdgWJT.js → three-dots-CC-EXoV7.js} +1 -1
- package/dist/{twitch-CbcHu1ns.js → twitch-01WYlxYB.js} +1 -1
- package/dist/{twitterIcon-DB90mhmN.js → twitterIcon-CBqQ3gr4.js} +1 -1
- package/dist/{unsupportedProp-BQSrS0LI.js → unsupportedProp-CwqpQh-r.js} +1 -1
- package/dist/{useRegisterError-NuUdpWyD.js → useRegisterError-ByOKmamU.js} +1 -1
- package/dist/{verify-C8Ud6dXo.js → verify-BswPw1i0.js} +1 -1
- package/dist/{verify-filled-CAbxeIrk.js → verify-filled-DukpwPr3.js} +1 -1
- package/dist/{w3m-modal-7qD9ca_a.js → w3m-modal-B9D1Uz6O.js} +2 -2
- package/dist/{wallet-CALjCWYW.js → wallet-Bj7JS51P.js} +1 -1
- package/dist/{wallet-placeholder-2GP-1vJb.js → wallet-placeholder-ntA_yGUg.js} +1 -1
- package/dist/{walletconnect-BuMmu4SH.js → walletconnect-C2YXIR96.js} +1 -1
- package/dist/{warning-circle-CNQ1oGvz.js → warning-circle-Bug2jkco.js} +1 -1
- package/dist/{x-Bg_5LCup.js → x-BEvzIigT.js} +1 -1
- package/package.json +1 -1
- package/dist/AdvancedSettings-DMVTMB1Z.js +0 -60
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as p, jsx as e, Fragment as
|
2
|
-
import
|
3
|
-
import { B as
|
4
|
-
import { u as
|
5
|
-
import { C as n1, M as
|
6
|
-
import { useQuery as
|
7
|
-
import { useAccount as fe, useConnect as
|
8
|
-
import { useDynamicContext as
|
9
|
-
import { S as
|
10
|
-
import { u as
|
11
|
-
import { useAccount as Oe, useStargateClient as b1, useSuggestChainAndConnect as
|
12
|
-
import { S as
|
13
|
-
import { R as
|
14
|
-
import { C as Ve, P as
|
1
|
+
import { jsxs as p, jsx as e, Fragment as q } from "react/jsx-runtime";
|
2
|
+
import le, { useState as k, useEffect as j, useRef as j1, Suspense as e1 } from "react";
|
3
|
+
import { B as L1, i as Ee, u as Ne, F as t1, f as $e, C as Se, W as l1 } from "./useRegisterError-ByOKmamU.js";
|
4
|
+
import { u as l, l as ge, a as ze, c as _e, S as P1, M as F1 } from "./index-DGEhy5MB.js";
|
5
|
+
import { C as n1, M as M1, g as r1 } from "./getChainIds-BPyuIG49.js";
|
6
|
+
import { useQuery as c1 } from "@tanstack/react-query";
|
7
|
+
import { useAccount as fe, useConnect as E1, useConnections as O1, useBalance as R1 } from "wagmi";
|
8
|
+
import { useDynamicContext as Te, useIsLoggedIn as $1 } from "@dynamic-labs/sdk-react-core";
|
9
|
+
import { S as S1 } from "./shareicon-CG3v7iKI.js";
|
10
|
+
import { u as _1, B as z1 } from "./index-B5HYIYdX.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as b1, useSuggestChainAndConnect as V1, WalletType as Z1 } from "graz";
|
12
|
+
import { S as H1, D as G1 } from "./down-DMOxb9X6.js";
|
13
|
+
import { R as K1 } from "./index-CDq3vNnP.js";
|
14
|
+
import { C as Ve, P as ue, u as J1, g as o1 } from "./getCosmosAddress-BxqNvT5E.js";
|
15
15
|
function d1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ p(
|
17
17
|
"svg",
|
@@ -46,8 +46,8 @@ function d1({ fill: t }) {
|
|
46
46
|
}
|
47
47
|
);
|
48
48
|
}
|
49
|
-
function
|
50
|
-
const [r,
|
49
|
+
function q1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
50
|
+
const [r, c] = k(t), [b, d] = k(""), { tick: i, defaultCoin: g } = Ee;
|
51
51
|
return /* @__PURE__ */ p("div", { children: [
|
52
52
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
53
53
|
/* @__PURE__ */ e(
|
@@ -57,7 +57,7 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
57
57
|
n();
|
58
58
|
},
|
59
59
|
className: "bw-absolute bw-left-0 bw-top-[25%]",
|
60
|
-
children: /* @__PURE__ */ e(
|
60
|
+
children: /* @__PURE__ */ e(L1, { fill: "var(--tw-text-secondary)" })
|
61
61
|
}
|
62
62
|
),
|
63
63
|
/* @__PURE__ */ e("div", { className: "bw-text-base bw-font-normal bw-text-text-secondary", children: "Network" })
|
@@ -106,7 +106,7 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
106
106
|
/* @__PURE__ */ e("img", { src: (A = x.image) != null && A.length ? x.image : g, className: "bw-rounded-[50%] bw-border bw-border-border-primary", width: 25, height: 25, alt: "img" }),
|
107
107
|
" ",
|
108
108
|
/* @__PURE__ */ e("p", { children: x.name }),
|
109
|
-
o.chain === x.name ? /* @__PURE__ */ e("img", { src: i, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(
|
109
|
+
o.chain === x.name ? /* @__PURE__ */ e("img", { src: i, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(q, {})
|
110
110
|
] }),
|
111
111
|
/* @__PURE__ */ p("div", { className: "bw-pr-2", children: [
|
112
112
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal", children: "Tokens" }),
|
@@ -119,32 +119,32 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
119
119
|
}) })
|
120
120
|
] });
|
121
121
|
}
|
122
|
-
const
|
123
|
-
gradientbackground:
|
124
|
-
overlay:
|
122
|
+
const X1 = "_gradientbackground_7x8s8_1", Q1 = "_overlay_7x8s8_5", s1 = {
|
123
|
+
gradientbackground: X1,
|
124
|
+
overlay: Q1
|
125
125
|
};
|
126
|
-
function
|
126
|
+
function U1(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
|
131
|
-
const [n, s] = k({}), o =
|
130
|
+
function Y1(t) {
|
131
|
+
const [n, s] = k({}), o = l((i) => i.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: o,
|
133
133
|
multiChain: !0
|
134
|
-
}),
|
135
|
-
chainId: [(t == null ? void 0 : t.chainId) ||
|
134
|
+
}), c = l((i) => i.fromChain), { data: b } = b1({
|
135
|
+
chainId: [(t == null ? void 0 : t.chainId) || c.chainId],
|
136
136
|
multiChain: !0
|
137
137
|
});
|
138
138
|
async function d(i) {
|
139
139
|
var g, x;
|
140
140
|
if ((g = r == null ? void 0 : r[i]) != null && g.bech32Address && b) {
|
141
|
-
let A = await (b[i] || b).getAllBalances((x = r == null ? void 0 : r[i]) == null ? void 0 : x.bech32Address), M =
|
141
|
+
let A = await (b[i] || b).getAllBalances((x = r == null ? void 0 : r[i]) == null ? void 0 : x.bech32Address), M = ge.keyBy(A, "denom");
|
142
142
|
s(M);
|
143
143
|
}
|
144
144
|
}
|
145
145
|
return j(() => {
|
146
|
-
((t == null ? void 0 : t.networkType) == "cosmos" || (
|
147
|
-
}, [b,
|
146
|
+
((t == null ? void 0 : t.networkType) == "cosmos" || (c == null ? void 0 : c.networkType) == "cosmos") && d((t == null ? void 0 : t.chainId) || (c == null ? void 0 : c.chainId));
|
147
|
+
}, [b, c, t]), { cosmosBalance: n };
|
148
148
|
}
|
149
149
|
function w1(t) {
|
150
150
|
let n = t.split("/");
|
@@ -154,7 +154,7 @@ function w1(t) {
|
|
154
154
|
} else
|
155
155
|
return t;
|
156
156
|
}
|
157
|
-
function
|
157
|
+
function W1({ fill: t }) {
|
158
158
|
return /* @__PURE__ */ p(
|
159
159
|
"svg",
|
160
160
|
{
|
@@ -189,7 +189,7 @@ function D1({ fill: t }) {
|
|
189
189
|
}
|
190
190
|
);
|
191
191
|
}
|
192
|
-
function
|
192
|
+
function D1({ selectedChain: t }) {
|
193
193
|
return /* @__PURE__ */ p("div", { className: "bw-h-[100%] bw-flex bw-flex-col bw-justify-center bw-items-center", children: [
|
194
194
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center bw-items-center", children: /* @__PURE__ */ p("div", { className: "bw-relative", children: [
|
195
195
|
t != null && t.image ? /* @__PURE__ */ e(
|
@@ -199,8 +199,8 @@ function et({ selectedChain: t }) {
|
|
199
199
|
className: "bw-w-[80px] bw-h-[80px] bw-border-border-primary bw-border-2 bw-opacity-50 bw-rounded-[50%]",
|
200
200
|
alt: "chain"
|
201
201
|
}
|
202
|
-
) : /* @__PURE__ */ e(
|
203
|
-
/* @__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(
|
202
|
+
) : /* @__PURE__ */ e(q, {}),
|
203
|
+
/* @__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(W1, { fill: "var(--tw-text-secondary)" }) })
|
204
204
|
] }) }),
|
205
205
|
/* @__PURE__ */ p("h2", { className: "bw-text-base bw-text-center bw-mt-3 bw-font-bold bw-text-text-primary", children: [
|
206
206
|
"No Tokens found on ",
|
@@ -214,84 +214,84 @@ function et({ selectedChain: t }) {
|
|
214
214
|
] })
|
215
215
|
] });
|
216
216
|
}
|
217
|
-
const
|
218
|
-
var
|
219
|
-
|
220
|
-
const d =
|
221
|
-
|
222
|
-
const m = x(n), T =
|
217
|
+
const et = le.memo(function({ selectChainState: n, value: s, handleClosePopup: o, showExchangeList: r, setCoinData: c, setChainData: b }) {
|
218
|
+
var Ae, je;
|
219
|
+
l((u) => u.searchCustomCoin);
|
220
|
+
const d = l((u) => u.setSearchCustomCoin), { ref: i, inView: g } = _1(), { getWallet: x } = Ne({}), { connected: N, address: A } = ze(), { isConnected: M, address: F } = fe(), { primaryWallet: h } = Te();
|
221
|
+
$1();
|
222
|
+
const m = x(n), T = l((u) => u.fromChain), y = l((u) => u.fromCoin), S = l((u) => u.toChain), _ = l((u) => u.toCoin), [ee, E] = k(!1), { cosmosBalance: G } = Y1(n), { defaultCoin: O } = Ee, [z, f] = k(0), C = j1(null), { data: P } = Oe({
|
223
223
|
chainId: [n.chainId],
|
224
224
|
multiChain: !0
|
225
|
-
}), Z = (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" && A || (n == null ? void 0 : n.networkType) === "cosmos" && ((
|
226
|
-
|
227
|
-
const w =
|
225
|
+
}), Z = (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" && A || (n == null ? void 0 : n.networkType) === "cosmos" && ((Ae = P == null ? void 0 : P[n == null ? void 0 : n.chainId]) == null ? void 0 : Ae.bech32Address), $ = l((u) => u.toDisconnect);
|
226
|
+
l((u) => u.setToDisconnect);
|
227
|
+
const w = l((u) => u.customWallet), I = l((u) => u.setCustomWallet), B = l((u) => u.tokens), [L, v] = k([]), [R, re] = k([]), [Ie, W] = k([]), H = B, U = c1({
|
228
228
|
queryKey: ["balance", m == null ? void 0 : m.address, n],
|
229
229
|
queryFn: async () => await (await _e.fetchBalance(m.address, n.chainId)).json(),
|
230
|
-
enabled: !!((
|
230
|
+
enabled: !!((je = m == null ? void 0 : m.address) != null && je.length && n.chainId),
|
231
231
|
refetchOnWindowFocus: !1
|
232
232
|
});
|
233
233
|
function V(u) {
|
234
|
-
var
|
234
|
+
var te, ce, oe, ne, K, Y, se, J, ae, X, Q, be;
|
235
235
|
let D = w1(u.address);
|
236
|
-
return u.networkType == "cosmos" ? $e(((
|
236
|
+
return u.networkType == "cosmos" ? $e(((te = G == null ? void 0 : G[D]) == null ? void 0 : te.amount) / Math.pow(10, u.decimals) || 0) || "" : $e((((Y = (K = (ne = (oe = (ce = U.data) == null ? void 0 : ce.data) == null ? void 0 : oe[n == null ? void 0 : n.networkType]) == null ? void 0 : ne[n.chainId]) == null ? void 0 : K[u.address]) == null ? void 0 : Y.balance) || 0) / Math.pow(10, ((be = (Q = (X = (ae = (J = (se = U.data) == null ? void 0 : se.data) == null ? void 0 : J[n == null ? void 0 : n.networkType]) == null ? void 0 : ae[n.chainId]) == null ? void 0 : X[u.address]) == null ? void 0 : Q.asset) == null ? void 0 : be.decimals) || 0) || 0) || "";
|
237
237
|
}
|
238
238
|
j(() => {
|
239
|
-
s.length > 40 &&
|
239
|
+
s.length > 40 && U1(s) && !R.length ? (E(!0), d({
|
240
240
|
chainId: n.chainId,
|
241
241
|
address: s
|
242
242
|
})) : s.length || (E(!1), d({ chainId: "", address: "" }));
|
243
243
|
}, [s, R]), j(() => {
|
244
244
|
f(0);
|
245
245
|
}, [s]);
|
246
|
-
function
|
246
|
+
function Be() {
|
247
247
|
f(0), re([]), C.current.scrollTo(0, 0);
|
248
248
|
}
|
249
249
|
j(() => {
|
250
250
|
var u, D;
|
251
251
|
H != null && H.isSuccess && (n != null && n.chainId) && v(((D = (u = H == null ? void 0 : H.data) == null ? void 0 : u.data) == null ? void 0 : D[n == null ? void 0 : n.chainId]) || []);
|
252
252
|
}, [H, n.chainId]), j(() => {
|
253
|
-
|
253
|
+
Be();
|
254
254
|
}, [n.chainId]);
|
255
|
-
function
|
256
|
-
var
|
257
|
-
let u = (
|
258
|
-
var
|
259
|
-
return ((
|
260
|
-
})) == null ? void 0 :
|
261
|
-
if (Z) return V(
|
262
|
-
}), D = 20,
|
255
|
+
function Ce() {
|
256
|
+
var ne;
|
257
|
+
let u = (ne = L == null ? void 0 : L.filter((K) => {
|
258
|
+
var Y, se, J, ae;
|
259
|
+
return ((Y = K.name) == null ? void 0 : Y.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((se = K.symbol) == null ? void 0 : se.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((ae = (J = K.address) == null ? void 0 : J.toLowerCase()) == null ? void 0 : ae.includes(s == null ? void 0 : s.toLowerCase()));
|
260
|
+
})) == null ? void 0 : ne.sort((K, Y) => {
|
261
|
+
if (Z) return V(Y) * Y.lastPrice - V(K) * K.lastPrice;
|
262
|
+
}), D = 20, te = z * D, ce = te + D, oe = u.slice(te, ce);
|
263
263
|
z == 0 ? re([...oe]) : re([...R, ...oe]);
|
264
264
|
}
|
265
265
|
return j(() => {
|
266
|
-
L != null && L.length &&
|
266
|
+
L != null && L.length && Ce();
|
267
267
|
}, [L, s, z, Z, G, U.data]), j(() => {
|
268
268
|
g && f((u) => u + 1);
|
269
|
-
}, [g]), /* @__PURE__ */ e("div", { ref: C, className: " bw-pr-2 bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: R && (R == null ? void 0 : R.length) > 0 ? R == null ? void 0 : R.map((u, D,
|
270
|
-
var
|
269
|
+
}, [g]), /* @__PURE__ */ e("div", { ref: C, className: " bw-pr-2 bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: R && (R == null ? void 0 : R.length) > 0 ? R == null ? void 0 : R.map((u, D, te) => {
|
270
|
+
var ce, oe, ne, K, Y, se;
|
271
271
|
return /* @__PURE__ */ p(
|
272
272
|
"div",
|
273
273
|
{
|
274
|
-
ref:
|
274
|
+
ref: te.length >= 20 && te.length - 1 === D ? i : null,
|
275
275
|
className: `bw-py-2
|
276
276
|
${r == "from" && _._id !== u._id || r == "to" && y._id !== u._id, ""}
|
277
277
|
bw-flex bw-items-center bw-justify-between bw-cursor-pointer bw-border-b bw-border-border-primary
|
278
278
|
|
279
279
|
}`,
|
280
280
|
onClick: async () => {
|
281
|
-
var
|
282
|
-
let
|
281
|
+
var ae, X, Q, be, de, ve, ie, me, Le, ke, Pe;
|
282
|
+
let J = {
|
283
283
|
// ...coinData,
|
284
284
|
coin: u.symbol,
|
285
285
|
...u,
|
286
|
-
availBal: ((
|
286
|
+
availBal: ((de = (be = (Q = (X = (ae = U.data) == null ? void 0 : ae.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : Q[n.chainId]) == null ? void 0 : be[u.address.toLowerCase()]) == null ? void 0 : de.balance) / Math.pow(10, ((Pe = (ke = (Le = (me = (ie = (ve = U.data) == null ? void 0 : ve.data) == null ? void 0 : ie[n == null ? void 0 : n.networkType]) == null ? void 0 : me[n == null ? void 0 : n.chainId]) == null ? void 0 : Le[u.address.toLowerCase()]) == null ? void 0 : ke.asset) == null ? void 0 : Pe.decimals) || 0)
|
287
287
|
};
|
288
|
-
|
288
|
+
c(J), b(n), o(n, J), (n == null ? void 0 : n.networkType) === (S == null ? void 0 : S.networkType) || (n == null || n.networkType, T == null || T.networkType, I(""));
|
289
289
|
},
|
290
290
|
children: [
|
291
291
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-items-center bw-justify-center bw-w-max bw-gap-x-2", children: [
|
292
|
-
/* @__PURE__ */ p("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(
|
292
|
+
/* @__PURE__ */ p("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(ce = u.image) != null && ce.length ? "bw-bg-background-secondary" : ""}`, children: [
|
293
293
|
(oe = u.image) != null && oe.length ? /* @__PURE__ */ e("img", { src: u.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: O, className: "bw-rounded-[50%]", width: 30, height: 30, alt: "img" }),
|
294
|
-
(
|
294
|
+
(ne = n == null ? void 0 : n.image) != null && ne.length ? /* @__PURE__ */ e("img", { src: n.image, className: `bw-absolute ${(K = n == null ? void 0 : n.image) != null && K.length ? "bw-bg-background-secondary" : ""} 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: O, className: "bw-absolute bw-bg-background-secondary bw-right-0 bw-bottom-[-4px] bw-border bw-border-border-primary bw-rounded-[50%]", width: 16, height: 16, alt: "img" })
|
295
295
|
] }),
|
296
296
|
/* @__PURE__ */ p("div", { children: [
|
297
297
|
/* @__PURE__ */ p("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
@@ -308,20 +308,20 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
308
308
|
/* @__PURE__ */ e(
|
309
309
|
"a",
|
310
310
|
{
|
311
|
-
href: (
|
311
|
+
href: (se = (Y = n.explorer) == null ? void 0 : Y.token) == null ? void 0 : se.replace("{tokenAddress}", u.address),
|
312
312
|
target: "_blank",
|
313
|
-
onClick: (
|
314
|
-
|
313
|
+
onClick: (J) => {
|
314
|
+
J.stopPropagation();
|
315
315
|
},
|
316
316
|
className: "hover:bw-opacity-70",
|
317
|
-
children: /* @__PURE__ */ e(
|
317
|
+
children: /* @__PURE__ */ e(S1, { fill: "var(--tw-text-secondary)" })
|
318
318
|
}
|
319
319
|
)
|
320
320
|
] })
|
321
321
|
] })
|
322
322
|
] })
|
323
323
|
] }),
|
324
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && w && ((w == null ? void 0 : w.length) > 30 || $) ? /* @__PURE__ */ e(
|
324
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && w && ((w == null ? void 0 : w.length) > 30 || $) ? /* @__PURE__ */ e(q, {}) : U.isFetching ? /* @__PURE__ */ e(Se, { size: 12, thickness: 4, color: "inherit" }) : Z ? V(u) > 0 ? /* @__PURE__ */ p(q, { children: [
|
325
325
|
/* @__PURE__ */ e(
|
326
326
|
t1,
|
327
327
|
{
|
@@ -331,7 +331,7 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
331
331
|
}
|
332
332
|
}
|
333
333
|
),
|
334
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: V(u) * u.lastPrice > 0 ? /* @__PURE__ */ p(
|
334
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: V(u) * u.lastPrice > 0 ? /* @__PURE__ */ p(q, { children: [
|
335
335
|
"$",
|
336
336
|
/* @__PURE__ */ e(
|
337
337
|
t1,
|
@@ -343,21 +343,21 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
343
343
|
}
|
344
344
|
)
|
345
345
|
] }) : "" })
|
346
|
-
] }) : /* @__PURE__ */ e(
|
346
|
+
] }) : /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(q, {}) }) })
|
347
347
|
]
|
348
348
|
},
|
349
349
|
D
|
350
350
|
);
|
351
|
-
}) :
|
351
|
+
}) : ee && !(B.isLoading && B.isFetching) ? /* @__PURE__ */ e(D1, { selectedChain: n }) : !s.length && /* @__PURE__ */ e("div", { className: "bw-w-full bw-flex bw-justify-center bw-mt-4 bw-text-text-primary", children: /* @__PURE__ */ e(Se, { color: "inherit", size: 30 }) }) });
|
352
352
|
});
|
353
|
-
function
|
353
|
+
function tt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coinData: r, showExchangeList: c, fetchChains: b }) {
|
354
354
|
var f, C, P, Z, $;
|
355
|
-
const [d, i] = k(!1), [g, x] = k(""), N =
|
355
|
+
const [d, i] = k(!1), [g, x] = k(""), N = l((w) => w.tokens), [A, M] = k([]), [F, h] = k(0), [m, T] = k({ chain: "" }), y = l((w) => w.gradient), S = l((w) => w.configuration), _ = l((w) => w.chainObj);
|
356
356
|
j(() => {
|
357
357
|
var w, I, B, L;
|
358
358
|
if ((I = (w = b.data) == null ? void 0 : w.data) != null && I.length) {
|
359
|
-
let v = [...(L = (B = b.data) == null ? void 0 : B.data) == null ? void 0 : L.slice(0, 9)], R = v.findIndex((V) => V.chainId === "137"), re = v.findIndex((V) => V.chainId === "324"),
|
360
|
-
v.splice(R, 1, _[80094] || {}), v.splice(re, 1, _[2741] || {}), v.splice(
|
359
|
+
let v = [...(L = (B = b.data) == null ? void 0 : B.data) == null ? void 0 : L.slice(0, 9)], R = v.findIndex((V) => V.chainId === "137"), re = v.findIndex((V) => V.chainId === "324"), Ie = v.findIndex((V) => V.chainId === "10"), W = v.findIndex((V) => V.chainId === "43114");
|
360
|
+
v.splice(R, 1, _[80094] || {}), v.splice(re, 1, _[2741] || {}), v.splice(Ie, 1, _["eclipse-svm"] || {}), v.splice(W, 1, _[999] || {}), !!ge.keyBy(v, "chainId")[m.chainId] || (v.pop(), v.push(m)), M(v);
|
361
361
|
}
|
362
362
|
}, [_, (f = b.data) == null ? void 0 : f.data, o, m]), j(() => {
|
363
363
|
T(o);
|
@@ -368,7 +368,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
368
368
|
h(L.length);
|
369
369
|
}
|
370
370
|
}, [(C = b.data) == null ? void 0 : C.data]);
|
371
|
-
function
|
371
|
+
function ee(w, I) {
|
372
372
|
var B, L;
|
373
373
|
(B = w.chain) != null && B.length && ((L = I == null ? void 0 : I.coin) != null && L.length) && s();
|
374
374
|
}
|
@@ -379,7 +379,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
379
379
|
T(w), x("");
|
380
380
|
}
|
381
381
|
const { tick: O, defaultCoin: z } = Ee;
|
382
|
-
return d ? /* @__PURE__ */ e(
|
382
|
+
return d ? /* @__PURE__ */ e(q1, { handleSetChainData: G, data: (P = b.data) == null ? void 0 : P.data, handleBack: E, network: m }) : /* @__PURE__ */ p(q, { children: [
|
383
383
|
/* @__PURE__ */ p("div", { children: [
|
384
384
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
385
385
|
/* @__PURE__ */ e(
|
@@ -393,11 +393,11 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
393
393
|
}
|
394
394
|
),
|
395
395
|
/* @__PURE__ */ p("div", { className: "bw-text-base bw-font-normal bw-text-text-secondary", children: [
|
396
|
-
|
396
|
+
c.charAt(0).toUpperCase() + c.slice(1),
|
397
397
|
" Network"
|
398
398
|
] })
|
399
399
|
] }),
|
400
|
-
b.isLoading ? /* @__PURE__ */ e(
|
400
|
+
b.isLoading ? /* @__PURE__ */ e(P1, { 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__ */ p("div", { className: "bw-grid bw-grid-cols-5 bw-gap-1 bw-overflow-y-auto bw-w-full", children: [
|
401
401
|
b.isSuccess && A.map((w, I) => {
|
402
402
|
var B, L;
|
403
403
|
return /* @__PURE__ */ e(
|
@@ -424,7 +424,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
424
424
|
/* @__PURE__ */ e("img", { src: (B = w.image) != null && B.length ? w.image : z, width: 25, className: "bw-rounded-[50%] bw-border bw-border-border-primary", height: 25, alt: "img" }),
|
425
425
|
" ",
|
426
426
|
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${m.name == w.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((L = w.name) == null ? void 0 : L.length) > 7 ? w.name.substring(0, 7) + ".." : w.name }),
|
427
|
-
(m == null ? void 0 : m.chain) == w ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: O }) : /* @__PURE__ */ e(
|
427
|
+
(m == null ? void 0 : m.chain) == w ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: O }) : /* @__PURE__ */ e(q, {})
|
428
428
|
]
|
429
429
|
},
|
430
430
|
I
|
@@ -446,7 +446,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
446
446
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-primary", children: "Networks" })
|
447
447
|
]
|
448
448
|
}
|
449
|
-
) }) : /* @__PURE__ */ e(
|
449
|
+
) }) : /* @__PURE__ */ e(q, {})
|
450
450
|
] })
|
451
451
|
] }),
|
452
452
|
/* @__PURE__ */ p("div", { children: [
|
@@ -472,7 +472,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
472
472
|
placeholder: "Search Token Name or Contract Address"
|
473
473
|
}
|
474
474
|
),
|
475
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (N.isLoading || N.isFetching) && g.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(
|
475
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (N.isLoading || N.isFetching) && g.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, {}) }) : g.length ? /* @__PURE__ */ e(
|
476
476
|
"button",
|
477
477
|
{
|
478
478
|
onClick: () => {
|
@@ -485,30 +485,30 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
485
485
|
]
|
486
486
|
}
|
487
487
|
),
|
488
|
-
/* @__PURE__ */ e(
|
488
|
+
/* @__PURE__ */ e(et, { value: g, handleClosePopup: ee, showExchangeList: c, setChainData: t, setCoinData: n, selectChainState: m })
|
489
489
|
] })
|
490
490
|
] });
|
491
491
|
}
|
492
|
-
function
|
492
|
+
function nt({
|
493
493
|
walletDetails: t,
|
494
494
|
handleToDisconnect: n,
|
495
495
|
show: s,
|
496
496
|
networkType: o,
|
497
497
|
handleShowWallet: r,
|
498
|
-
setConnectWalletField:
|
498
|
+
setConnectWalletField: c
|
499
499
|
}) {
|
500
|
-
const [b, d] = k(null), { address: i, chain: g, data: x, disconnect: N, ...A } = t, [M, F] = k(), { connector: h } = fe(), { connectors: m } =
|
501
|
-
|
500
|
+
const [b, d] = k(null), { address: i, chain: g, data: x, disconnect: N, ...A } = t, [M, F] = k(), { connector: h } = fe(), { connectors: m } = E1(), T = () => {
|
501
|
+
c(s), s == "to" ? (y(), n(!0)) : y();
|
502
502
|
};
|
503
|
-
|
503
|
+
O1(), j(() => {
|
504
504
|
m.length && F(
|
505
|
-
|
505
|
+
ge.keyBy(m, (S) => S.uid)
|
506
506
|
);
|
507
507
|
}, [m]);
|
508
508
|
async function y() {
|
509
509
|
o === "evm" && (g == null ? void 0 : g.network) !== "custom" && (M != null && M[h == null ? void 0 : h.uid]), r();
|
510
510
|
}
|
511
|
-
return /* @__PURE__ */ e(
|
511
|
+
return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
512
512
|
"button",
|
513
513
|
{
|
514
514
|
"aria-haspopup": "true",
|
@@ -516,32 +516,32 @@ function rt({
|
|
516
516
|
id: "basic-button",
|
517
517
|
style: { fontSize: "12px" },
|
518
518
|
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",
|
519
|
-
children: i ? /* @__PURE__ */ p(
|
519
|
+
children: i ? /* @__PURE__ */ p(q, { children: [
|
520
520
|
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((i == null ? void 0 : i.substring(0, 4)) || "") + "..." + ((i == null ? void 0 : i.substring(i.length - 4, i.length)) || "") }),
|
521
521
|
/* @__PURE__ */ e(
|
522
522
|
"div",
|
523
523
|
{
|
524
|
-
children: /* @__PURE__ */ e(
|
524
|
+
children: /* @__PURE__ */ e(l1, { fill: "var(--tw-text-secondary)" })
|
525
525
|
}
|
526
526
|
)
|
527
527
|
] }) : /* @__PURE__ */ e("div", { className: "bw-w-[10px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[10px]", children: /* @__PURE__ */ e(Se, { size: 10, thickness: 5, color: "inherit" }) })
|
528
528
|
}
|
529
529
|
) });
|
530
530
|
}
|
531
|
-
function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show:
|
532
|
-
var T, y, S, _,
|
533
|
-
const b =
|
534
|
-
|
535
|
-
const { defaultCoin: N } = Ee, { isAnyWalletConnected: A, getWallet: M } =
|
531
|
+
function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show: c }) {
|
532
|
+
var T, y, S, _, ee, E, G, O, z;
|
533
|
+
const b = l((f) => f.configuration), d = l((f) => f.customWallet), { isConnected: i, isConnecting: g, isReconnecting: x } = fe();
|
534
|
+
Te();
|
535
|
+
const { defaultCoin: N } = Ee, { isAnyWalletConnected: A, getWallet: M } = Ne({
|
536
536
|
chainData: t,
|
537
|
-
show:
|
537
|
+
show: c
|
538
538
|
});
|
539
|
-
|
540
|
-
const F =
|
539
|
+
l((f) => f.toDisconnect), l((f) => f.setToDisconnect);
|
540
|
+
const F = l((f) => f.fromChain), h = l((f) => f.toChain);
|
541
541
|
function m(f) {
|
542
542
|
}
|
543
543
|
return /* @__PURE__ */ p("div", { className: "bw-w-[50%] ", children: [
|
544
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children:
|
544
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children: c == "from" ? "Give" : "Get" }),
|
545
545
|
/* @__PURE__ */ p(
|
546
546
|
"div",
|
547
547
|
{
|
@@ -558,38 +558,38 @@ function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConn
|
|
558
558
|
"div",
|
559
559
|
{
|
560
560
|
onClick: () => {
|
561
|
-
n(
|
561
|
+
n(c);
|
562
562
|
},
|
563
563
|
className: "bw-cursor-pointer",
|
564
564
|
children: [
|
565
565
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-min-w-[78px] bw-min-h-[28px] bw-items-center bw-gap-x-2", children: [
|
566
566
|
(S = r == null ? void 0 : r.coin) != null && S.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" }),
|
567
|
-
/* @__PURE__ */ e(
|
567
|
+
/* @__PURE__ */ e(G1, { fill: (_ = r == null ? void 0 : r.coin) != null && _.length ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" })
|
568
568
|
] }),
|
569
|
-
(
|
569
|
+
(ee = t == null ? void 0 : t.chain) != null && ee.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" })
|
570
570
|
]
|
571
571
|
}
|
572
572
|
)
|
573
573
|
]
|
574
574
|
}
|
575
575
|
),
|
576
|
-
/* @__PURE__ */ e(
|
576
|
+
/* @__PURE__ */ e(rt, { isConnected: c == "to" ? (F == null ? void 0 : F.networkType) === (h == null ? void 0 : h.networkType) ? !!((G = (E = M(F)) == null ? void 0 : E.address) != null && G.length || (d == null ? void 0 : d.length) > 30) : !!((z = (O = M(h)) == null ? void 0 : O.address) != null && z.length || (d == null ? void 0 : d.length) > 30) : A, setConnectWalletField: o, handleShowWallet: s, show: c, chainData: t, handleToDisconnect: m })
|
577
577
|
] });
|
578
578
|
}
|
579
|
-
function
|
579
|
+
function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, show: o, chainData: r, handleToDisconnect: c }) {
|
580
580
|
var x;
|
581
|
-
const b =
|
581
|
+
const b = l((N) => N.customWallet), d = l((N) => N.fromChain), i = l((N) => N.toChain), { getWallet: g } = Ne({
|
582
582
|
chainData: r,
|
583
583
|
show: o
|
584
584
|
});
|
585
585
|
return /* @__PURE__ */ e("div", { className: "bw-mt-2 bw-flex bw-justify-end", children: t ? /* @__PURE__ */ e(
|
586
|
-
|
586
|
+
nt,
|
587
587
|
{
|
588
588
|
walletDetails: (b == null ? void 0 : b.length) > 30 && o == "to" ? g({}) : (d == null ? void 0 : d.networkType) == (i == null ? void 0 : i.networkType) && o == "to" ? {
|
589
|
-
disconnect:
|
589
|
+
disconnect: c,
|
590
590
|
address: (x = g(d)) == null ? void 0 : x.address
|
591
591
|
} : g(r),
|
592
|
-
handleToDisconnect:
|
592
|
+
handleToDisconnect: c,
|
593
593
|
show: o,
|
594
594
|
networkType: r == null ? void 0 : r.networkType,
|
595
595
|
setConnectWalletField: n,
|
@@ -604,17 +604,17 @@ function ot({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, sho
|
|
604
604
|
className: "bw-mb-1 bw-relative bw-min-w-[100px] bw-flex bw-justify-center bw-items-center bw-gap-x-1 bw-w-[84px] bw-h-[25px] bw-text-xs bw-font-medium bw-px-2 bw-rounded-xl bw-border bw-border-border-primary bw-bg-background-container bw-text-text-primary",
|
605
605
|
children: [
|
606
606
|
/* @__PURE__ */ e("p", { className: "bw-mr-3", children: "Connect" }),
|
607
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2", children: /* @__PURE__ */ e(
|
607
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2", children: /* @__PURE__ */ e(l1, { fill: "var(--tw-text-secondary)" }) })
|
608
608
|
]
|
609
609
|
}
|
610
610
|
) });
|
611
611
|
}
|
612
|
-
const
|
613
|
-
gradient:
|
612
|
+
const ot = "_gradient_15zwe_1", Ze = {
|
613
|
+
gradient: ot
|
614
614
|
};
|
615
|
-
function
|
615
|
+
function st({ mode: t, handleMode: n }) {
|
616
616
|
var o, r;
|
617
|
-
const s =
|
617
|
+
const s = l((c) => c.configuration);
|
618
618
|
return /* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center", children: /* @__PURE__ */ p(
|
619
619
|
"div",
|
620
620
|
{
|
@@ -681,7 +681,7 @@ function at({ mode: t, handleMode: n }) {
|
|
681
681
|
}
|
682
682
|
) });
|
683
683
|
}
|
684
|
-
function
|
684
|
+
function at({ fill: t }) {
|
685
685
|
return /* @__PURE__ */ e(
|
686
686
|
"svg",
|
687
687
|
{
|
@@ -703,19 +703,19 @@ function it({ fill: t }) {
|
|
703
703
|
);
|
704
704
|
}
|
705
705
|
function u1({ options: t, handleOptions: n }) {
|
706
|
-
var r,
|
706
|
+
var r, c;
|
707
707
|
const s = [
|
708
708
|
{ name: "Medium", value: "medium" },
|
709
709
|
{ name: "High", value: "high" },
|
710
710
|
{ name: "Degen", value: "ultra" }
|
711
|
-
], o =
|
711
|
+
], o = l((b) => b.configuration);
|
712
712
|
return /* @__PURE__ */ p("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between", children: [
|
713
713
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: "Speed" }),
|
714
714
|
/* @__PURE__ */ e(
|
715
715
|
"div",
|
716
716
|
{
|
717
717
|
style: {
|
718
|
-
boxShadow: o && o.customTheme && ((
|
718
|
+
boxShadow: o && o.customTheme && ((c = (r = o.customTheme) == null ? void 0 : r.shadow) == null ? void 0 : c.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
719
719
|
},
|
720
720
|
className: "bw-flex bw-border bw-bg-background-container bw-w-[70%] md:bw-w-[60%] bw-h-[40px] bw-rounded-md bw-border-border-primary bw-items-center bw-justify-between",
|
721
721
|
children: s.map((b, d, i) => /* @__PURE__ */ p(
|
@@ -733,7 +733,7 @@ function u1({ options: t, handleOptions: n }) {
|
|
733
733
|
className: `
|
734
734
|
bw-flex bw-flex-1 bw-relative bw-h-full bw-rounded-md bw-gap-x-1 bw-justify-center bw-items-center `,
|
735
735
|
children: [
|
736
|
-
b.value === "ultra" ? /* @__PURE__ */ e(
|
736
|
+
b.value === "ultra" ? /* @__PURE__ */ e(at, { fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" }) : /* @__PURE__ */ e(q, {}),
|
737
737
|
/* @__PURE__ */ e(
|
738
738
|
"p",
|
739
739
|
{
|
@@ -776,15 +776,15 @@ function m1(t) {
|
|
776
776
|
/^\d$/.test(t.key) || n.includes(t.key) || t.preventDefault();
|
777
777
|
}
|
778
778
|
function p1({ inputVal: t, handleCustomVal: n, title: s, inputSideText: o }) {
|
779
|
-
var
|
780
|
-
const r =
|
779
|
+
var c, b;
|
780
|
+
const r = l((d) => d.configuration);
|
781
781
|
return /* @__PURE__ */ p("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between bw-gap-x-3 bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
782
782
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal", children: s }),
|
783
783
|
/* @__PURE__ */ p(
|
784
784
|
"div",
|
785
785
|
{
|
786
786
|
style: {
|
787
|
-
boxShadow: r && r.customTheme && ((b = (
|
787
|
+
boxShadow: r && r.customTheme && ((b = (c = r.customTheme) == null ? void 0 : c.shadow) == null ? void 0 : b.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
788
788
|
},
|
789
789
|
className: "bw-h-[40px] bw-w-[70%] md:bw-w-[60%] bw-flex bw-rounded-md bw-border bw-border-border-primary bw-bg-background-container bw-p-1 bw-text-text-primary",
|
790
790
|
children: [
|
@@ -810,8 +810,8 @@ function p1({ inputVal: t, handleCustomVal: n, title: s, inputSideText: o }) {
|
|
810
810
|
] });
|
811
811
|
}
|
812
812
|
function g1({ handleSave: t, isSaveButtonDisabled: n }) {
|
813
|
-
const s =
|
814
|
-
return
|
813
|
+
const s = l((o) => o.configuration);
|
814
|
+
return l((o) => o.slippage), /* @__PURE__ */ e(
|
815
815
|
"div",
|
816
816
|
{
|
817
817
|
style: { ...s == null ? void 0 : s.gradientStyle },
|
@@ -831,7 +831,7 @@ function f1({ handleClose: t }) {
|
|
831
831
|
return /* @__PURE__ */ p("div", { className: "bw-w-full bw-relative bw-flex bw-items-center bw-justify-center", children: [
|
832
832
|
/* @__PURE__ */ e("h2", { className: "bw-text-2xl bw-font-bold bw-text-text-primary", children: "Config" }),
|
833
833
|
/* @__PURE__ */ e(
|
834
|
-
|
834
|
+
z1,
|
835
835
|
{
|
836
836
|
disableRipple: !0,
|
837
837
|
onClick: t,
|
@@ -843,7 +843,7 @@ function f1({ handleClose: t }) {
|
|
843
843
|
}
|
844
844
|
function x1({ slippage: t, handleSlippage: n }) {
|
845
845
|
var o, r;
|
846
|
-
const s =
|
846
|
+
const s = l((c) => c.configuration);
|
847
847
|
return /* @__PURE__ */ p("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
848
848
|
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-font-normal bw-text-text-primary", children: "Max Slippage" }),
|
849
849
|
/* @__PURE__ */ p(
|
@@ -858,20 +858,20 @@ function x1({ slippage: t, handleSlippage: n }) {
|
|
858
858
|
/* @__PURE__ */ e(
|
859
859
|
"input",
|
860
860
|
{
|
861
|
-
onKeyUp: (
|
862
|
-
|
861
|
+
onKeyUp: (c) => {
|
862
|
+
c.key === "Enter" && c.target.blur();
|
863
863
|
},
|
864
|
-
onFocus: (
|
865
|
-
|
864
|
+
onFocus: (c) => {
|
865
|
+
c.target.parentElement.style.border = "1px solid var(--tw-text-primary)", c.target.parentElement.style.fontWeight = 600;
|
866
866
|
},
|
867
|
-
onBlur: (
|
868
|
-
|
867
|
+
onBlur: (c) => {
|
868
|
+
c.target.parentElement.style.border = "1px solid var(--tw-border-primary)", c.target.parentElement.style.fontWeight = 400;
|
869
869
|
},
|
870
870
|
value: t,
|
871
871
|
onChange: n,
|
872
872
|
type: "number",
|
873
|
-
onKeyDown: (
|
874
|
-
m1(
|
873
|
+
onKeyDown: (c) => {
|
874
|
+
m1(c);
|
875
875
|
},
|
876
876
|
className: "bw-bg-transparent bw-border-none bw-text-text-primary bw-pl-2 bw-text-right bw-w-[80%]"
|
877
877
|
}
|
@@ -888,12 +888,12 @@ function h1() {
|
|
888
888
|
/* @__PURE__ */ e("div", { className: "bw-h-[1px] bw-flex-1 bw-bg-border-primary " })
|
889
889
|
] });
|
890
890
|
}
|
891
|
-
function
|
892
|
-
const [n, s] = k(""), [o, r] = k({ name: "Low", value: "low" }), [
|
891
|
+
function it({ handleClose: t }) {
|
892
|
+
const [n, s] = k(""), [o, r] = k({ name: "Low", value: "low" }), [c, b] = k(""), [d, i] = k(""), [g, x] = k(""), N = l((f) => f.broadCastMode), A = l((f) => f.customFee), M = l((f) => f.setCustomFee), F = l((f) => f.slippage), h = l((f) => f.setSlippage), m = l((f) => f.setBroadCastMode), T = l((f) => f.option), y = l((f) => f.setOption), S = n == A && T.name == o.name && F == g && (d === N && d !== "" || !n.length && !T.name.length);
|
893
893
|
function _(f) {
|
894
894
|
b(""), s(f.target.value);
|
895
895
|
}
|
896
|
-
function
|
896
|
+
function ee(f, C) {
|
897
897
|
b(""), r(f);
|
898
898
|
}
|
899
899
|
j(() => {
|
@@ -929,8 +929,8 @@ function ct({ handleClose: t }) {
|
|
929
929
|
/* @__PURE__ */ e(f1, { handleClose: t }),
|
930
930
|
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage: g, handleSlippage: G }) }),
|
931
931
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(h1, {}) }),
|
932
|
-
/* @__PURE__ */ e(
|
933
|
-
/* @__PURE__ */ e(u1, { options: o, handleOptions:
|
932
|
+
/* @__PURE__ */ e(st, { mode: d, handleMode: z }),
|
933
|
+
/* @__PURE__ */ e(u1, { options: o, handleOptions: ee }),
|
934
934
|
/* @__PURE__ */ e(
|
935
935
|
p1,
|
936
936
|
{
|
@@ -941,7 +941,7 @@ function ct({ handleClose: t }) {
|
|
941
941
|
}
|
942
942
|
),
|
943
943
|
/* @__PURE__ */ p("div", { className: "bw-relative", children: [
|
944
|
-
/* @__PURE__ */ e("p", { className: "bw-w-full bw-absolute bw-text-center -bw-top-5 bw-text-xs bw-text-text-redtext", children:
|
944
|
+
/* @__PURE__ */ e("p", { className: "bw-w-full bw-absolute bw-text-center -bw-top-5 bw-text-xs bw-text-text-redtext", children: c }),
|
945
945
|
/* @__PURE__ */ e(
|
946
946
|
g1,
|
947
947
|
{
|
@@ -953,7 +953,7 @@ function ct({ handleClose: t }) {
|
|
953
953
|
] });
|
954
954
|
}
|
955
955
|
function lt({ handleClose: t }) {
|
956
|
-
const [n, s] = k({ name: "Low", value: "low" }), [o, r] = k(""), [
|
956
|
+
const [n, s] = k({ name: "Low", value: "low" }), [o, r] = k(""), [c, b] = k(""), d = l((y) => y.setEvmGas), i = l((y) => y.setEvmSpeed), g = l((y) => y.evmSpeed), x = l((y) => y.evmGas), N = l((y) => y.slippage), A = l((y) => y.setSlippage), M = o == x && g.name == n.name && N == c;
|
957
957
|
function F(y, S) {
|
958
958
|
s(y);
|
959
959
|
}
|
@@ -966,7 +966,7 @@ function lt({ handleClose: t }) {
|
|
966
966
|
x != null && x.length ? r(x) : r("");
|
967
967
|
}, [x]);
|
968
968
|
function m() {
|
969
|
-
o.length ? (d(o), i(n)) : (d(""), i(n)), A(
|
969
|
+
o.length ? (d(o), i(n)) : (d(""), i(n)), A(c), t();
|
970
970
|
}
|
971
971
|
j(() => {
|
972
972
|
b(N);
|
@@ -976,7 +976,7 @@ function lt({ handleClose: t }) {
|
|
976
976
|
}
|
977
977
|
return /* @__PURE__ */ p("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[396px] bw-rounded-md bw-border bw-p-3 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
978
978
|
/* @__PURE__ */ e(f1, { handleClose: t }),
|
979
|
-
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage:
|
979
|
+
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage: c, handleSlippage: T }) }),
|
980
980
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(h1, {}) }),
|
981
981
|
/* @__PURE__ */ e(u1, { options: n, handleOptions: F }),
|
982
982
|
/* @__PURE__ */ e(
|
@@ -997,10 +997,10 @@ function lt({ handleClose: t }) {
|
|
997
997
|
)
|
998
998
|
] });
|
999
999
|
}
|
1000
|
-
function
|
1001
|
-
const s =
|
1000
|
+
function ct({ open: t, handleClose: n }) {
|
1001
|
+
const s = l((r) => r.fromChain);
|
1002
1002
|
return /* @__PURE__ */ e(
|
1003
|
-
|
1003
|
+
M1,
|
1004
1004
|
{
|
1005
1005
|
open: t,
|
1006
1006
|
disablePortal: !0,
|
@@ -1015,11 +1015,11 @@ function bt({ open: t, handleClose: n }) {
|
|
1015
1015
|
// left: "47%",
|
1016
1016
|
// transform: "translate(-50%, -50%)",
|
1017
1017
|
bgcolor: "var(--tw-bg-container)"
|
1018
|
-
}, children: s.networkType == "sol" ? /* @__PURE__ */ e(
|
1018
|
+
}, children: s.networkType == "sol" ? /* @__PURE__ */ e(it, { handleClose: n }) : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(lt, { handleClose: n }) }) })
|
1019
1019
|
}
|
1020
1020
|
);
|
1021
1021
|
}
|
1022
|
-
function
|
1022
|
+
function bt({ fill: t }) {
|
1023
1023
|
return /* @__PURE__ */ p(
|
1024
1024
|
"svg",
|
1025
1025
|
{
|
@@ -1058,8 +1058,8 @@ function dt({ fill: t }) {
|
|
1058
1058
|
}
|
1059
1059
|
);
|
1060
1060
|
}
|
1061
|
-
function
|
1062
|
-
const t =
|
1061
|
+
function dt() {
|
1062
|
+
const t = l((o) => o.configuration), n = t == null ? void 0 : t.headingStyles, s = (t == null ? void 0 : t.headingText) || "";
|
1063
1063
|
return s.length ? /* @__PURE__ */ e(
|
1064
1064
|
"span",
|
1065
1065
|
{
|
@@ -1076,8 +1076,8 @@ function wt() {
|
|
1076
1076
|
"Y.exchange"
|
1077
1077
|
] });
|
1078
1078
|
}
|
1079
|
-
function
|
1080
|
-
const t =
|
1079
|
+
function wt() {
|
1080
|
+
const t = l((s) => s.configuration), n = t == null ? void 0 : t.headingContainerStyles;
|
1081
1081
|
return /* @__PURE__ */ e(
|
1082
1082
|
"div",
|
1083
1083
|
{
|
@@ -1105,49 +1105,49 @@ function ut() {
|
|
1105
1105
|
paddingLeft: "10px",
|
1106
1106
|
...n
|
1107
1107
|
},
|
1108
|
-
children: /* @__PURE__ */ e(
|
1108
|
+
children: /* @__PURE__ */ e(dt, {})
|
1109
1109
|
}
|
1110
1110
|
);
|
1111
1111
|
}
|
1112
|
-
function
|
1113
|
-
const [t, n] = k(!1), s =
|
1112
|
+
function ut() {
|
1113
|
+
const [t, n] = k(!1), s = l((r) => r.fromChain);
|
1114
1114
|
function o() {
|
1115
1115
|
n(!1);
|
1116
1116
|
}
|
1117
|
-
return /* @__PURE__ */ p(
|
1117
|
+
return /* @__PURE__ */ p(q, { children: [
|
1118
1118
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-w-full -bw-mt-2 bw-mb-3 bw-items-center bw-justify-end", children: [
|
1119
|
-
/* @__PURE__ */ e(
|
1119
|
+
/* @__PURE__ */ e(wt, {}),
|
1120
1120
|
/* @__PURE__ */ e(
|
1121
1121
|
"div",
|
1122
1122
|
{
|
1123
1123
|
onClick: () => (s == null ? void 0 : s.networkType) !== "cosmos" && n(!0),
|
1124
1124
|
className: "bw-flex bw-relative bw-right-0 bw-items-center bw-gap-x-2",
|
1125
|
-
children: /* @__PURE__ */ e(
|
1125
|
+
children: /* @__PURE__ */ e(K1, { classnames: " ", children: /* @__PURE__ */ e(bt, { fill: "var(--tw-text-secondary)" }) })
|
1126
1126
|
}
|
1127
1127
|
)
|
1128
1128
|
] }),
|
1129
|
-
/* @__PURE__ */ e(
|
1129
|
+
/* @__PURE__ */ e(ct, { open: t, handleClose: o })
|
1130
1130
|
] });
|
1131
1131
|
}
|
1132
|
-
let i1, Fe,
|
1133
|
-
function
|
1134
|
-
const [b, d] = k(0), { getWallet: i } =
|
1132
|
+
let i1, Fe, ye, Me = 0;
|
1133
|
+
function mt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isRoutesEnabled: r, fetchBalance: c }) {
|
1134
|
+
const [b, d] = k(0), { getWallet: i } = Ne({}), g = l((h) => h.fromChain), x = i(g), { isConnected: N } = fe();
|
1135
1135
|
j(() => {
|
1136
|
-
t && clearInterval(
|
1136
|
+
t && clearInterval(ye);
|
1137
1137
|
}, [t]), j(() => {
|
1138
1138
|
var h;
|
1139
|
-
b === 0 && document.visibilityState === "visible" && !t && r && ((h = x.address) != null && h.length &&
|
1139
|
+
b === 0 && document.visibilityState === "visible" && !t && r && ((h = x.address) != null && h.length && c.refetch(), s.refetch());
|
1140
1140
|
}, [b, t, r]), j(() => {
|
1141
1141
|
s.isFetching && (Me = 0);
|
1142
1142
|
}, [s.isFetching]), j(() => {
|
1143
|
-
if (!
|
1143
|
+
if (!ge.isEmpty(o)) {
|
1144
1144
|
const h = Math.max(0, o.deadline - Me);
|
1145
1145
|
d(h);
|
1146
1146
|
}
|
1147
1147
|
return () => {
|
1148
1148
|
d(0);
|
1149
1149
|
};
|
1150
|
-
}, [o]), j(() => (
|
1150
|
+
}, [o]), j(() => (ge.isEmpty(o) || document.addEventListener("visibilitychange", F), () => {
|
1151
1151
|
document.removeEventListener("visibilitychange", F);
|
1152
1152
|
}), [o]);
|
1153
1153
|
function A() {
|
@@ -1157,30 +1157,30 @@ function pt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isR
|
|
1157
1157
|
let h = Date.now(), m = Math.round((h - i1) / 1e3);
|
1158
1158
|
o.deadline - Fe + m > o.deadline ? n((T) => {
|
1159
1159
|
var y;
|
1160
|
-
return console.log(t, "called confirm"), T || ((y = x.address) != null && y.length &&
|
1160
|
+
return console.log(t, "called confirm"), T || ((y = x.address) != null && y.length && c.refetch(), s.refetch(), d(o.deadline)), T;
|
1161
1161
|
}) : Fe && m && d(Fe - m);
|
1162
1162
|
}
|
1163
1163
|
function F() {
|
1164
1164
|
document.visibilityState === "visible" ? M() : A();
|
1165
1165
|
}
|
1166
|
-
return j(() => (
|
1166
|
+
return j(() => (ge.isEmpty(o) ? ye && clearInterval(ye) : ye = setInterval(() => {
|
1167
1167
|
d((h) => h <= 0 ? (Me = 0, o.deadline) : (Me++, h - 1));
|
1168
1168
|
}, 1e3), () => {
|
1169
|
-
|
1170
|
-
}), [o]),
|
1169
|
+
ye && clearInterval(ye);
|
1170
|
+
}), [o]), l((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1171
1171
|
}
|
1172
|
-
function
|
1173
|
-
const { primaryWallet: o } =
|
1172
|
+
function pt(t, n, s) {
|
1173
|
+
const { primaryWallet: o } = Te(), [r, c] = k(0), b = async (d) => {
|
1174
1174
|
if (!o) return;
|
1175
1175
|
const i = new Ve(d || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed");
|
1176
1176
|
if (i)
|
1177
1177
|
try {
|
1178
|
-
const g = new
|
1178
|
+
const g = new ue(o.address);
|
1179
1179
|
i.onAccountChange(g, (A) => {
|
1180
|
-
|
1180
|
+
c(A.lamports / 1e9);
|
1181
1181
|
});
|
1182
1182
|
const N = await i.getBalance(g) / 1e9;
|
1183
|
-
|
1183
|
+
c(N), s(!1);
|
1184
1184
|
} catch (g) {
|
1185
1185
|
console.log(g), s(!1);
|
1186
1186
|
}
|
@@ -1189,26 +1189,26 @@ function gt(t, n, s) {
|
|
1189
1189
|
(t == null ? void 0 : t.networkType) === "sol" && b((t == null ? void 0 : t.chainId) === "eclipse-svm" ? "https://eclipse.lgns.net/" : null);
|
1190
1190
|
}, [t == null ? void 0 : t.networkType, o, t == null ? void 0 : t.chainId, o == null ? void 0 : o.address]), { balanceSol: r, getBalanceSol: b };
|
1191
1191
|
}
|
1192
|
-
function
|
1192
|
+
function gt(t) {
|
1193
1193
|
return t == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ? "" : t;
|
1194
1194
|
}
|
1195
|
-
const
|
1196
|
-
new
|
1197
|
-
new
|
1198
|
-
new
|
1199
|
-
async function
|
1195
|
+
const ft = new ue("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), xt = new ue("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
1196
|
+
new ue("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
1197
|
+
new ue("So11111111111111111111111111111111111111112");
|
1198
|
+
new ue("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
|
1199
|
+
async function ht(t, n) {
|
1200
1200
|
if (!t) return;
|
1201
|
-
const s = new Ve(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new
|
1202
|
-
programId: n ?
|
1201
|
+
const s = new Ve(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new ue(t), r = await s.getParsedTokenAccountsByOwner(o, {
|
1202
|
+
programId: n ? xt : ft
|
1203
1203
|
});
|
1204
|
-
let
|
1204
|
+
let c = {};
|
1205
1205
|
for (const { account: b } of r.value) {
|
1206
1206
|
const d = b.data.parsed.info.mint, i = b.data.parsed.info.tokenAmount.uiAmount;
|
1207
|
-
|
1207
|
+
c[d] = i;
|
1208
1208
|
}
|
1209
|
-
return
|
1209
|
+
return c;
|
1210
1210
|
}
|
1211
|
-
const
|
1211
|
+
const yt = "0000000000000000000000000000000000", Ct = async (t) => {
|
1212
1212
|
try {
|
1213
1213
|
const n = await tronWeb.trx.getBalance(t);
|
1214
1214
|
return { balance: tronWeb.fromSun(n) };
|
@@ -1216,10 +1216,10 @@ const Ct = "0000000000000000000000000000000000", vt = async (t) => {
|
|
1216
1216
|
throw console.error("Error fetching TRX balance:", n), n;
|
1217
1217
|
}
|
1218
1218
|
};
|
1219
|
-
async function
|
1219
|
+
async function vt(t, n) {
|
1220
1220
|
try {
|
1221
|
-
if (n ===
|
1222
|
-
return
|
1221
|
+
if (n === yt)
|
1222
|
+
return Ct(t);
|
1223
1223
|
const s = await tronWeb.contract().at(n), o = await s.balanceOf(t).call(), r = await s.decimals().call();
|
1224
1224
|
return console.log(o, Number(o), Number(r), "balance"), {
|
1225
1225
|
balance: Number(o) / Math.pow(10, Number(r)),
|
@@ -1230,19 +1230,19 @@ async function kt(t, n) {
|
|
1230
1230
|
throw console.error("Error fetching token balance:", s), s;
|
1231
1231
|
}
|
1232
1232
|
}
|
1233
|
-
function
|
1234
|
-
const [s, o] = k(0), { primaryWallet: r, setPrimaryWallet:
|
1233
|
+
function kt(t, n) {
|
1234
|
+
const [s, o] = k(0), { primaryWallet: r, setPrimaryWallet: c } = Te(), [b, d] = k(!1), i = l((w) => w.fromChain), { address: g, isConnected: x } = fe(), { address: N, isConnected: A } = ze(), M = l((w) => w.cosmosChainIds), { data: F, isConnected: h } = Oe({
|
1235
1235
|
chainId: M,
|
1236
1236
|
multiChain: !0
|
1237
|
-
}), m =
|
1237
|
+
}), m = l((w) => w.fromCoin), { data: T, isLoading: y } = R1({
|
1238
1238
|
address: g,
|
1239
|
-
token:
|
1239
|
+
token: gt((m == null ? void 0 : m.address) || ""),
|
1240
1240
|
chainId: Number((i == null ? void 0 : i.chainId) || 0),
|
1241
1241
|
enabled: !!((i.networkType == "evm" || n) && g && (g != null && g.length))
|
1242
1242
|
}), {
|
1243
1243
|
data: S,
|
1244
1244
|
isLoading: _,
|
1245
|
-
isFetching:
|
1245
|
+
isFetching: ee,
|
1246
1246
|
isInitialLoading: E,
|
1247
1247
|
isRefetching: G
|
1248
1248
|
} = b1({
|
@@ -1254,7 +1254,7 @@ function Nt(t, n) {
|
|
1254
1254
|
const I = new Ve(w || "https://solana-rpc.publicnode.com");
|
1255
1255
|
if (I)
|
1256
1256
|
try {
|
1257
|
-
const B = new
|
1257
|
+
const B = new ue(r.address);
|
1258
1258
|
d(!0);
|
1259
1259
|
const v = await I.getBalance(B) / 1e9;
|
1260
1260
|
o(v), d(!1);
|
@@ -1265,7 +1265,7 @@ function Nt(t, n) {
|
|
1265
1265
|
async function z(w) {
|
1266
1266
|
try {
|
1267
1267
|
d(!0);
|
1268
|
-
let I = await
|
1268
|
+
let I = await ht(r.address, w);
|
1269
1269
|
console.log(I, "ecres"), d(!1), o(I == null ? void 0 : I[m == null ? void 0 : m.address]);
|
1270
1270
|
} catch (I) {
|
1271
1271
|
console.log(I), d(!1);
|
@@ -1276,7 +1276,7 @@ function Nt(t, n) {
|
|
1276
1276
|
if (!r) return;
|
1277
1277
|
const w = await r.connector.getPublicClient();
|
1278
1278
|
if (!w) return;
|
1279
|
-
const I = new
|
1279
|
+
const I = new ue(r.address);
|
1280
1280
|
I && (f = w.onAccountChange(I, (B) => {
|
1281
1281
|
var L;
|
1282
1282
|
if (i.networkType == "sol" && (r != null && r.address))
|
@@ -1306,7 +1306,7 @@ function Nt(t, n) {
|
|
1306
1306
|
let I = S[w] || S;
|
1307
1307
|
try {
|
1308
1308
|
d(!0);
|
1309
|
-
let v = await I.getAllBalances((B = F == null ? void 0 : F[w]) == null ? void 0 : B.bech32Address), R =
|
1309
|
+
let v = await I.getAllBalances((B = F == null ? void 0 : F[w]) == null ? void 0 : B.bech32Address), R = ge.keyBy(v, "denom");
|
1310
1310
|
o(((L = R[w1(m.address)]) == null ? void 0 : L.amount) / Math.pow(10, m.decimals) || 0), d(!1);
|
1311
1311
|
} catch (v) {
|
1312
1312
|
console.log(v, "balerrorcos"), d(!1);
|
@@ -1316,7 +1316,7 @@ function Nt(t, n) {
|
|
1316
1316
|
o(0);
|
1317
1317
|
try {
|
1318
1318
|
d(!0);
|
1319
|
-
let B = await
|
1319
|
+
let B = await vt(w, I);
|
1320
1320
|
console.log(B, "balancetron"), o((B == null ? void 0 : B.balance) || 0), d(!1);
|
1321
1321
|
} catch (B) {
|
1322
1322
|
console.log(B, "balerrortron"), d(!1);
|
@@ -1330,30 +1330,30 @@ function Nt(t, n) {
|
|
1330
1330
|
isBalanceLoading: (i == null ? void 0 : i.networkType) == "evm" ? y : b
|
1331
1331
|
};
|
1332
1332
|
}
|
1333
|
-
const
|
1334
|
-
function
|
1333
|
+
const Nt = le.lazy(() => import("./SwapAsset-d01boR2k.js")), Tt = le.lazy(() => import("./InputComp-CIMBouQg.js")), It = le.lazy(() => import("./QuotesProgress-DXyVWF9h.js")), Bt = le.lazy(() => import("./TxnButton-DUhnDCLZ.js")), At = le.lazy(() => import("./index-BK-LO8mS.js").then((t) => t.i)), jt = le.lazy(() => import("./index-Bsolq3x5.js")), Lt = le.lazy(() => import("./LoadRoute-DP9HswK0.js")), Pt = le.lazy(() => import("./AllRoutes-BrDSLkEx.js")), Ft = le.lazy(() => import("./AdvancedSettings-BDdJbtcK.js"));
|
1334
|
+
function Mt({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
1335
1335
|
var Ke, Je, qe, Xe, Qe, Ue, Ye;
|
1336
|
-
const [o, r] = k(), [
|
1337
|
-
let
|
1338
|
-
const
|
1339
|
-
enabled:
|
1340
|
-
dependency:
|
1341
|
-
payload: [(C == null ? void 0 : C.networkType) === "cosmos" ? o1(E == null ? void 0 : E.bech32Address, (Ke = C == null ? void 0 : C.chainInfo) == null ? void 0 : Ke.bech32Config.bech32PrefixAccAddr) : ((Je =
|
1342
|
-
}), ie =
|
1336
|
+
const [o, r] = k(), [c, b] = k(!1), [d, i] = k(!1), [g, x] = k(!1), [N, A] = k(!1), [M, F] = k("all"), [h, m] = k(!1), { primaryWallet: T } = Te(), { address: y } = fe(), { address: S } = ze(), { getbal: _, isBalanceLoading: ee } = kt(h), { data: E, isConnected: G } = Oe({ chainId: "cosmoshub-4" }), O = l((a) => a.persist), z = l((a) => a.setPersist), f = l((a) => a.route), C = l((a) => a.fromChain), P = l((a) => a.toChain), Z = l((a) => a.fromCoin), $ = l((a) => a.toCoin), w = l((a) => a.setFromChain), I = l((a) => a.setToChain), B = l((a) => a.setFromCoin), L = l((a) => a.setToCoin), v = l((a) => a.amount), R = l((a) => a.setAmount), re = l((a) => a.customWallet), Ie = l((a) => a.setCosmosChainIds), W = l((a) => a.customFee), H = l((a) => a.broadCastMode), U = l((a) => a.evmGas), V = l((a) => a.evmSpeed), Be = l((a) => a.slippage), Ce = l((a) => a.option), Ae = l((a) => a.setCustomWallet), je = l((a) => a.setSelectedProvider), { balanceSol: u } = pt(C, h, Re), { suggestAndConnectAsync: D } = V1(), te = !!(v.length && C.chain.length && Z.coin.length && P.chain.length && $.coin.length && !g && N), ce = l((a) => a.lite), oe = ["routes", y, C, P, Z, $, v, T == null ? void 0 : T.address, S, re, E == null ? void 0 : E.bech32Address, W, U, V, Be, H, Ce.value, ce];
|
1337
|
+
let ne = (H === "Priority Fee" || H === "Both") && (W != null && W.length) ? W : Ce.value, K = (H === "Jito Tip" || H === "Both") && (W != null && W.length) ? W : Ce.value, Y = U != null && U.length ? U : V.value;
|
1338
|
+
const se = (C == null ? void 0 : C.networkType) === "sol" ? H === "Priority Fee" ? `&solanaPriorityFee=${ne}` : H === "Jito Tip" ? { solanaJitoTip: K } : { solanaPriorityFee: ne, solanaJitoTip: K } : (C == null ? void 0 : C.networkType) === "evm" ? { evmPriorityFee: Y } : "", { getWallet: J, refetch: ae } = Ne({}), { routes: X, routesData: Q, setRoutesData: be, errorMessage: de, setErrorMessage: ve } = J1({
|
1339
|
+
enabled: te,
|
1340
|
+
dependency: oe,
|
1341
|
+
payload: [(C == null ? void 0 : C.networkType) === "cosmos" ? o1(E == null ? void 0 : E.bech32Address, (Ke = C == null ? void 0 : C.chainInfo) == null ? void 0 : Ke.bech32Config.bech32PrefixAccAddr) : ((Je = J(C)) == null ? void 0 : Je.address) || "", C, P, Z, $, v, Number(Be) * 100, (re == null ? void 0 : re.length) > 30 ? ((qe = J({})) == null ? void 0 : qe.address) || "" : (P == null ? void 0 : P.networkType) === "cosmos" ? o1(E == null ? void 0 : E.bech32Address, (Xe = P == null ? void 0 : P.chainInfo) == null ? void 0 : Xe.bech32Config.bech32PrefixAccAddr) : ((Qe = J(P)) == null ? void 0 : Qe.address) || "", se]
|
1342
|
+
}), ie = J(C), me = c1({
|
1343
1343
|
queryKey: ["balance", ie == null ? void 0 : ie.address, C],
|
1344
1344
|
queryFn: async () => await (await _e.fetchBalance(ie.address, C.chainId)).json(),
|
1345
1345
|
enabled: !!((Ue = ie == null ? void 0 : ie.address) != null && Ue.length && C.chainId),
|
1346
1346
|
refetchOnWindowFocus: !1
|
1347
|
-
}), { quoteTimer:
|
1347
|
+
}), { quoteTimer: Le } = mt({
|
1348
1348
|
routes: X,
|
1349
1349
|
routesData: Q,
|
1350
1350
|
confirmRoute: d,
|
1351
1351
|
setConfirmRoute: i,
|
1352
|
-
isRoutesEnabled:
|
1353
|
-
fetchBalance:
|
1352
|
+
isRoutesEnabled: te,
|
1353
|
+
fetchBalance: me
|
1354
1354
|
});
|
1355
1355
|
j(() => {
|
1356
|
-
v ||
|
1356
|
+
v || be({});
|
1357
1357
|
let a;
|
1358
1358
|
return Number(v) > 0 && (a = setTimeout(() => {
|
1359
1359
|
A(!0);
|
@@ -1361,39 +1361,39 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1361
1361
|
clearTimeout(a), A(!1);
|
1362
1362
|
};
|
1363
1363
|
}, [v]), j(() => {
|
1364
|
-
X.isFetching &&
|
1364
|
+
X.isFetching && be({});
|
1365
1365
|
}, [X.isFetching]);
|
1366
|
-
function
|
1366
|
+
function ke(a) {
|
1367
1367
|
x(a);
|
1368
1368
|
}
|
1369
|
-
function
|
1369
|
+
function Pe() {
|
1370
1370
|
r();
|
1371
1371
|
}
|
1372
|
-
async function
|
1372
|
+
async function y1(a) {
|
1373
1373
|
if (G)
|
1374
1374
|
try {
|
1375
|
-
let
|
1376
|
-
if (
|
1377
|
-
let
|
1375
|
+
let we = await r1();
|
1376
|
+
if (we.length && !we.includes(a.chainId)) {
|
1377
|
+
let xe = await D({
|
1378
1378
|
chainInfo: a,
|
1379
|
-
walletType:
|
1380
|
-
}),
|
1381
|
-
|
1379
|
+
walletType: Z1.KEPLR
|
1380
|
+
}), pe = await ae(), he = await r1();
|
1381
|
+
Ie(he);
|
1382
1382
|
}
|
1383
|
-
} catch (
|
1384
|
-
console.log(
|
1383
|
+
} catch (we) {
|
1384
|
+
console.log(we);
|
1385
1385
|
}
|
1386
1386
|
else
|
1387
1387
|
return;
|
1388
1388
|
}
|
1389
|
-
function
|
1390
|
-
(a == null ? void 0 : a.networkType) == "cosmos" &&
|
1389
|
+
function C1(a) {
|
1390
|
+
(a == null ? void 0 : a.networkType) == "cosmos" && y1(a.chainInfo), R(""), ve({ error: "" }), o == "from" ? w({ ...a }) : o == "to" && I({ ...a });
|
1391
1391
|
}
|
1392
|
-
function
|
1393
|
-
|
1392
|
+
function v1(a) {
|
1393
|
+
ve({ error: "" }), R(""), o == "from" ? B({ ...a }) : o == "to" && L({ ...a });
|
1394
1394
|
}
|
1395
1395
|
function He() {
|
1396
|
-
b(!
|
1396
|
+
b(!c);
|
1397
1397
|
}
|
1398
1398
|
function Ge(a) {
|
1399
1399
|
i(typeof a < "u" ? a : !d);
|
@@ -1401,22 +1401,22 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1401
1401
|
function Re(a) {
|
1402
1402
|
m(a);
|
1403
1403
|
}
|
1404
|
-
function
|
1405
|
-
|
1404
|
+
function k1(a) {
|
1405
|
+
je(a == null ? void 0 : a.provider), be(a);
|
1406
1406
|
}
|
1407
|
-
function
|
1407
|
+
function N1() {
|
1408
1408
|
setTimeout(() => {
|
1409
|
-
Re(!0),
|
1409
|
+
Re(!0), me.refetch();
|
1410
1410
|
}, 1e3);
|
1411
1411
|
}
|
1412
|
-
function
|
1412
|
+
function T1() {
|
1413
1413
|
R("");
|
1414
1414
|
}
|
1415
|
-
function
|
1416
|
-
_e.fetchTokens(a.chainId,
|
1417
|
-
var
|
1418
|
-
(We = (
|
1419
|
-
|
1415
|
+
function I1(a, we, xe) {
|
1416
|
+
_e.fetchTokens(a.chainId, xe).then((pe) => pe.json()).then((pe) => {
|
1417
|
+
var he, We;
|
1418
|
+
(We = (he = pe.data) == null ? void 0 : he[a.chainId]) == null || We.forEach((De) => {
|
1419
|
+
we({
|
1420
1420
|
...Z,
|
1421
1421
|
coin: De.symbol,
|
1422
1422
|
...De,
|
@@ -1425,45 +1425,45 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1425
1425
|
});
|
1426
1426
|
});
|
1427
1427
|
}
|
1428
|
-
function
|
1429
|
-
R(""), w(P), B($), I(C), L(Z), C.networkType !== P.networkType &&
|
1428
|
+
function B1() {
|
1429
|
+
R(""), w(P), B($), I(C), L(Z), C.networkType !== P.networkType && Ae("");
|
1430
1430
|
}
|
1431
1431
|
j(() => {
|
1432
|
-
O.isHistory && f === "" && (z({ allSteps: { steps: null, currentStep: 0 }, stepData: {} }),
|
1432
|
+
O.isHistory && f === "" && (z({ allSteps: { steps: null, currentStep: 0 }, stepData: {} }), ke(!1));
|
1433
1433
|
}, [O]);
|
1434
|
-
function
|
1435
|
-
var
|
1434
|
+
function A1(a) {
|
1435
|
+
var we;
|
1436
1436
|
if (a && s.isSuccess && a !== (P == null ? void 0 : P.networkType) && a !== (C == null ? void 0 : C.networkType)) {
|
1437
|
-
let
|
1437
|
+
let xe = ge.keyBy(s.data.data, "chainId"), pe = a == "evm" ? "8453" : a == "sol" ? "sol" : a == "sui" ? "1" : a == "btc" ? "btc" : a == "tron" ? "tron" : "cosmoshub-4", he = a == "evm" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "sol" ? "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" : a == "sui" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "btc" ? "bitcoin" : a == "tron" ? "0000000000000000000000000000000000" : "uatom";
|
1438
1438
|
w({
|
1439
|
-
...
|
1440
|
-
chain: ((
|
1441
|
-
}),
|
1439
|
+
...xe[pe],
|
1440
|
+
chain: ((we = xe[pe]) == null ? void 0 : we.name) || ""
|
1441
|
+
}), I1(xe[pe], B, he);
|
1442
1442
|
} else
|
1443
1443
|
return;
|
1444
1444
|
}
|
1445
|
-
return console.log(T, "confirm route"), /* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e(
|
1446
|
-
/* @__PURE__ */ e(
|
1445
|
+
return console.log(T, "confirm route"), /* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e(F1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(At, { connectWalletField: M, handleShowWallet: t, handleRecentSelectedWallet: A1 }) : !d && !((Ye = O == null ? void 0 : O.routeId) != null && Ye.length) ? c ? /* @__PURE__ */ e(Pt, { routes: X, handleShowAllRoutes: He, handleRoutesData: k1, convertVal: ($ == null ? void 0 : $.lastPrice) || 0, amount: v }) : o ? /* @__PURE__ */ e(tt, { chainData: o == "from" ? C : P, coinData: o == "from" ? Z : $, setChainData: C1, setCoinData: v1, handleReset: Pe, showExchangeList: o, fetchBalance: me, fetchChains: s }) : /* @__PURE__ */ p(q, { children: [
|
1446
|
+
/* @__PURE__ */ e(ut, {}),
|
1447
1447
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1448
|
-
/* @__PURE__ */ e(
|
1448
|
+
/* @__PURE__ */ e(Nt, { handleSwap: B1 }),
|
1449
1449
|
/* @__PURE__ */ e(a1, { chainData: C, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: Z }),
|
1450
1450
|
/* @__PURE__ */ e(a1, { chainData: P, show: "to", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: $ })
|
1451
1451
|
] }),
|
1452
|
-
/* @__PURE__ */ e(
|
1453
|
-
/* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e("div", { children: "Loading..." }), children: /* @__PURE__ */ e(
|
1454
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1455
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (
|
1456
|
-
/* @__PURE__ */ e(
|
1457
|
-
/* @__PURE__ */ e(
|
1458
|
-
] }) : /* @__PURE__ */ e(
|
1452
|
+
/* @__PURE__ */ e(Tt, { amount: v, setAmount: R, fetchBalance: me, getCoinBalance: _, isBalanceLoading: ee }),
|
1453
|
+
/* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e("div", { children: "Loading..." }), children: /* @__PURE__ */ e(Ft, {}) }),
|
1454
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Lt, { routes: X, handleShowAllRoutes: He, routesData: Q, amount: v, isRoutesEnabled: N, price: ((Q == null ? void 0 : Q.outputAmountDisplay) || "") * (($ == null ? void 0 : $.lastPrice) || 0) }) }),
|
1455
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (de == null ? void 0 : de.error) == "string" ? de == null ? void 0 : de.error : "" }),
|
1456
|
+
/* @__PURE__ */ e(It, { amount: N, routes: X, routesData: Q, quoteTimer: Le }),
|
1457
|
+
/* @__PURE__ */ e(Bt, { routesData: Q, handleSuccess: Re, routes: X, fetchBalancePrev: me, amount: v, isAmountTyped: N, handleShowWallet: t, setConnectWalletField: F, handleConfirmClose: Ge, balanceSol: u, getCoinBalance: _ })
|
1458
|
+
] }) : /* @__PURE__ */ e(jt, { handleConfirmClose: Ge, amount: v, routesData: Q, resetAmount: T1, routes: X, handleStopRoute: ke, resetBalance: N1 }) }) });
|
1459
1459
|
}
|
1460
|
-
function
|
1460
|
+
function Et({ fetchChains: t }) {
|
1461
1461
|
const [n, s] = k(!1), { isConnected: o } = fe();
|
1462
|
-
function r(
|
1462
|
+
function r(c) {
|
1463
1463
|
s(!n);
|
1464
1464
|
}
|
1465
1465
|
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1466
|
-
|
1466
|
+
Mt,
|
1467
1467
|
{
|
1468
1468
|
handleShowWallet: r,
|
1469
1469
|
fetchChains: t,
|
@@ -1471,15 +1471,15 @@ function Ot({ fetchChains: t }) {
|
|
1471
1471
|
}
|
1472
1472
|
) });
|
1473
1473
|
}
|
1474
|
-
const
|
1474
|
+
const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1475
1475
|
__proto__: null,
|
1476
|
-
default:
|
1476
|
+
default: Et
|
1477
1477
|
}, Symbol.toStringTag, { value: "Module" }));
|
1478
1478
|
export {
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1479
|
+
gt as c,
|
1480
|
+
Ct as g,
|
1481
|
+
Qt as i,
|
1482
1482
|
w1 as p,
|
1483
1483
|
m1 as r,
|
1484
|
-
|
1484
|
+
Y1 as u
|
1485
1485
|
};
|