@blockend/widget 1.0.61-beta.1 → 1.0.61-beta.2
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-BSHVKOx8.js → AdvancedSettings-DMVTMB1Z.js} +17 -17
- package/dist/{AllRoutes-3rJ_6MZA.js → AllRoutes-DIWsY_7s.js} +201 -198
- package/dist/{Box-k1E75YNB.js → Box-CSkOh5pT.js} +1 -1
- package/dist/{EstGas-NmdlnuTV.js → EstGas-D0lMj040.js} +377 -370
- package/dist/{Grow-DHSmig3g.js → Grow-DArf5BOf.js} +196 -192
- package/dist/{InputComp-Q8pjLoPE.js → InputComp-BpwhlO5B.js} +3 -3
- package/dist/{LoadRoute-C2z-mW9G.js → LoadRoute-Dqk83p2o.js} +4 -4
- package/dist/{QuotesProgress-BD5CQpZ-.js → QuotesProgress-D-bhAdY6.js} +1 -1
- package/dist/{SwapAsset-Kx0ombNP.js → SwapAsset-CeJghqM4.js} +1 -1
- package/dist/{Tooltip-Dx9YIENU.js → Tooltip-Bo6E3Ppn.js} +9 -6
- package/dist/{TxnButton-CWOz7URH.js → TxnButton-06UcI8vZ.js} +65 -62
- package/dist/{add-D_aca-vE.js → add-CnnoTaOE.js} +1 -1
- package/dist/{all-wallets-D4BSWfpK.js → all-wallets-77I8A1dR.js} +1 -1
- package/dist/{app-store-ST0Ravfg.js → app-store-BHbNWU5O.js} +1 -1
- package/dist/{apple-DaFtNkdI.js → apple-BUqoJ3h4.js} +1 -1
- package/dist/{arrow-bottom-CuRXWFcr.js → arrow-bottom-BKIkvLUW.js} +1 -1
- package/dist/{arrow-bottom-circle-xfTEwf8w.js → arrow-bottom-circle-CmtY1Go0.js} +1 -1
- package/dist/{arrow-left-Z346mTvE.js → arrow-left-B1RmdyFf.js} +1 -1
- package/dist/{arrow-right-CUIO0t26.js → arrow-right-DAGdMwrS.js} +1 -1
- package/dist/{arrow-top-DmqPBsC5.js → arrow-top-DL8aloED.js} +1 -1
- package/dist/{bank-BO1ZejV3.js → bank-Cho2fj04.js} +1 -1
- package/dist/{basic-P5IuMVWt.js → basic-Hq9EE7JN.js} +4 -4
- package/dist/{browser-R_yTVBVl.js → browser-B1tFXGo3.js} +1 -1
- package/dist/{card-CmQJzq49.js → card-CAIekfsW.js} +1 -1
- package/dist/{ccip-Vdbs2YPx.js → ccip-CQW-OT50.js} +1 -1
- package/dist/{checkmark-BUj82mTz.js → checkmark-CMNFl8gr.js} +1 -1
- package/dist/{checkmark-bold-4sXAvyEi.js → checkmark-bold-jZ_-Wln9.js} +1 -1
- package/dist/{chevron-bottom-BHRgOLsC.js → chevron-bottom-BXlfv0v_.js} +1 -1
- package/dist/{chevron-left-eVq5zb9x.js → chevron-left-CR6Vk7-R.js} +1 -1
- package/dist/{chevron-right-BqbdhgX8.js → chevron-right-CK7kmFE0.js} +1 -1
- package/dist/{chevron-top-lFcz1Dk9.js → chevron-top-5bB353uT.js} +1 -1
- package/dist/{chrome-store-CJjs0q6Z.js → chrome-store-3zRMRPZ3.js} +1 -1
- package/dist/{clock-LxWBSJ_V.js → clock-C9VfcQU_.js} +1 -1
- package/dist/{close-CJEyeA8d.js → close-Dp60_0UW.js} +1 -1
- package/dist/{coinPlaceholder-A0px2L1V.js → coinPlaceholder-B9q-Q9nc.js} +1 -1
- package/dist/{compass-CKpEE3QF.js → compass-D1YdDLDZ.js} +1 -1
- package/dist/{copy-BGAVbyLK.js → copy-wpPbMuG7.js} +1 -1
- package/dist/{core-UMj0YuPY.js → core-f2H2Z9Sf.js} +390 -324
- package/dist/{cursor-CdRK37lV.js → cursor-BGD-Vp6U.js} +1 -1
- package/dist/{cursor-transparent-DCtZPn6M.js → cursor-transparent-Df_S-DGP.js} +1 -1
- package/dist/{desktop-BpmiexI7.js → desktop-xGzb89jl.js} +1 -1
- package/dist/{disconnect-CmRL6rxR.js → disconnect-C-l5x3f5.js} +1 -1
- package/dist/{discord-CgA8etyT.js → discord-BMihtS7L.js} +1 -1
- package/dist/{down-veMPztmj.js → down-IP3JFhRv.js} +4 -3
- package/dist/{etherscan-B0Iz4J9k.js → etherscan-BIDZ39Go.js} +1 -1
- package/dist/{exclamation-triangle-Box_8laE.js → exclamation-triangle-DtY9538O.js} +1 -1
- package/dist/{extension-CT5kynXr.js → extension-nyPuSGEb.js} +1 -1
- package/dist/{external-link-BmAqCUs9.js → external-link-CWQ6mRkJ.js} +1 -1
- package/dist/{facebook-CzlMPtlk.js → facebook-C9YV_9Ud.js} +1 -1
- package/dist/{farcaster-Z3KYAnFk.js → farcaster-Bk5tC5cR.js} +1 -1
- package/dist/{filters-CVtviD0v.js → filters-Boj-Safw.js} +1 -1
- package/dist/{getChainIds-DDKgS0TA.js → getChainIds-DVwNZAc5.js} +6 -4
- package/dist/{getCosmosAddress-D-BxI1sZ.js → getCosmosAddress-DGjk1iF-.js} +160 -158
- package/dist/{github-KjnPjzGN.js → github-CqlLNrtO.js} +1 -1
- package/dist/{google-CnyCazMS.js → google-DWRbHt_B.js} +1 -1
- package/dist/{hamburger-DkyOLKDt.js → hamburger-CCqMn9nd.js} +436 -427
- package/dist/{help-circle-BoN3xTWx.js → help-circle-Cv5722_F.js} +1 -1
- package/dist/{id-tq8aEw5U.js → id-BpuE8i1h.js} +1 -1
- package/dist/{image-DBC1q2_n.js → image-BLabe1u_.js} +1 -1
- package/dist/{index-BMJemt0T.js → index-3TDndzHy.js} +1 -1
- package/dist/{index-nbo2VFYc.js → index-B7xlfFYR.js} +4 -4
- package/dist/{index-37soHOzC.js → index-BMaOhhWB.js} +2 -2
- package/dist/{index-u8Ded5qw.js → index-Bf3Fkna6.js} +32 -18
- package/dist/{index-DTish3yr.js → index-Bl2UpALc.js} +3 -1
- package/dist/{index-B6Hd7MNh.js → index-BmPN76Lg.js} +5105 -5033
- package/dist/{index-DwgdKTri.js → index-C0l8Ijyj.js} +1 -1
- package/dist/{index-C57ebjbd.js → index-DIsRIvWS.js} +78 -78
- package/dist/{index-BnfXeC9U.js → index-DtPZUylH.js} +32 -21
- package/dist/{index-CrdvyxIs.js → index-X1wa5bpP.js} +19 -14
- package/dist/{index-BrUFU9w4.js → index-a8BP6V0o.js} +1151 -1134
- package/dist/{index-Dq-7CifU.js → index-lJKy2Bhi.js} +162 -161
- package/dist/{index.es-CXA8FwxC.js → index.es-BvE3zZVY.js} +978 -958
- package/dist/{index.es-CwOZPtUM.js → index.es-DLS0SSoV.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-B-ADkq2O.js → info-BROBzEn3.js} +1 -1
- package/dist/{info-circle-CzjFim13.js → info-circle-BhnTaYwQ.js} +1 -1
- package/dist/{lightbulb-BzGUazBJ.js → lightbulb-BMm8pAvQ.js} +1 -1
- package/dist/{mail-CEB7w3xW.js → mail-BBH0_xPX.js} +1 -1
- package/dist/{mobile-D2As9Lxy.js → mobile-BKmYB0js.js} +1 -1
- package/dist/{more-B3qgSPHK.js → more-BgKFZ5_N.js} +1 -1
- package/dist/{network-placeholder-D3v1VNVd.js → network-placeholder-Bx4Pd_VA.js} +1 -1
- package/dist/{nftPlaceholder-7uzR-QgE.js → nftPlaceholder-CjhjYlRs.js} +1 -1
- package/dist/{off-B5fhwDTB.js → off-CNWZ7rAK.js} +1 -1
- package/dist/{play-store-fmnI2qeP.js → play-store-CLp2fzCO.js} +1 -1
- package/dist/{plus-BPrwB2BV.js → plus-BUG6XdxV.js} +1 -1
- package/dist/{qr-code-DRh63vJj.js → qr-code-C-JVP33d.js} +1 -1
- package/dist/{recycle-horizontal-DGw86E5g.js → recycle-horizontal-C0QxOqzM.js} +1 -1
- package/dist/{refresh-Dg7iaYhB.js → refresh-CyabrC0p.js} +1 -1
- package/dist/{reown-logo-tiOXXURu.js → reown-logo-ULFpSpZD.js} +1 -1
- package/dist/{search-eG23Hr6c.js → search-CzhkDgzL.js} +1 -1
- package/dist/{send-BOwE6eLM.js → send-3zcoBLqV.js} +1 -1
- package/dist/{swapHorizontal-ywv205Wi.js → swapHorizontal-DkBtpUHQ.js} +1 -1
- package/dist/{swapHorizontalBold-CzmBehA5.js → swapHorizontalBold-CwigaZ5c.js} +1 -1
- package/dist/{swapHorizontalMedium-BLbLZusS.js → swapHorizontalMedium-CzzR3-0y.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-N_SHWa3r.js → swapHorizontalRoundedBold-C055Y8zs.js} +1 -1
- package/dist/{swapVertical-EAZRQhGp.js → swapVertical-d-A3bfm6.js} +1 -1
- package/dist/{telegram-n36fCk1z.js → telegram--pfczlkG.js} +1 -1
- package/dist/{three-dots-0tBgmH4A.js → three-dots-CIEdgWJT.js} +1 -1
- package/dist/{twitch-BhZ8ahtd.js → twitch-CbcHu1ns.js} +1 -1
- package/dist/{twitterIcon-DfNmxt1B.js → twitterIcon-DB90mhmN.js} +1 -1
- package/dist/{unsupportedProp-D3sAzZYG.js → unsupportedProp-BQSrS0LI.js} +1 -1
- package/dist/{useRegisterError-Bo2lp0sa.js → useRegisterError-NuUdpWyD.js} +41 -37
- package/dist/{verify-CWXFpftr.js → verify-C8Ud6dXo.js} +1 -1
- package/dist/{verify-filled-DP3y-Kx3.js → verify-filled-CAbxeIrk.js} +1 -1
- package/dist/{w3m-modal-CwwnoSKf.js → w3m-modal-7qD9ca_a.js} +2 -2
- package/dist/{wallet-pQYrlhSS.js → wallet-CALjCWYW.js} +1 -1
- package/dist/{wallet-placeholder-CFNKM5lP.js → wallet-placeholder-2GP-1vJb.js} +1 -1
- package/dist/{walletconnect-CAtjZJiV.js → walletconnect-BuMmu4SH.js} +1 -1
- package/dist/{warning-circle-BOE2EoE9.js → warning-circle-CNQ1oGvz.js} +1 -1
- package/dist/{x-BqcRzM19.js → x-Bg_5LCup.js} +1 -1
- package/package.json +1 -1
@@ -1,17 +1,17 @@
|
|
1
1
|
import { jsxs as p, jsx as e, Fragment as J } from "react/jsx-runtime";
|
2
|
-
import ce, { useState as
|
3
|
-
import { B as P1, i as Ee, u as Te, F as t1, f as $e, C as Se, W as c1 } from "./useRegisterError-
|
4
|
-
import { u as c, l as pe, a as ze, c as _e, S as F1, M as M1 } from "./index-
|
5
|
-
import { C as n1, M as E1, g as r1 } from "./getChainIds-
|
2
|
+
import ce, { useState as k, useEffect as j, useRef as L1, Suspense as e1 } from "react";
|
3
|
+
import { B as P1, i as Ee, u as Te, F as t1, f as $e, C as Se, W as c1 } from "./useRegisterError-NuUdpWyD.js";
|
4
|
+
import { u as c, l as pe, a as ze, c as _e, S as F1, M as M1 } from "./index-BmPN76Lg.js";
|
5
|
+
import { C as n1, M as E1, g as r1 } from "./getChainIds-DVwNZAc5.js";
|
6
6
|
import { useQuery as l1 } from "@tanstack/react-query";
|
7
7
|
import { useAccount as fe, useConnect as O1, useConnections as R1, useBalance as $1 } from "wagmi";
|
8
8
|
import { useDynamicContext as Ie, useIsLoggedIn as S1 } from "@dynamic-labs/sdk-react-core";
|
9
9
|
import { S as _1 } from "./shareicon-CG3v7iKI.js";
|
10
|
-
import { u as z1, B as V1 } from "./index-
|
10
|
+
import { u as z1, B as V1 } from "./index-BMaOhhWB.js";
|
11
11
|
import { useAccount as Oe, useStargateClient as b1, useSuggestChainAndConnect as Z1, WalletType as H1 } from "graz";
|
12
|
-
import { S as G1, D as K1 } from "./down-
|
12
|
+
import { S as G1, D as K1 } from "./down-IP3JFhRv.js";
|
13
13
|
import { R as J1 } from "./index-CDq3vNnP.js";
|
14
|
-
import { C as Ve, P as
|
14
|
+
import { C as Ve, P as we, u as q1, g as o1 } from "./getCosmosAddress-DGjk1iF-.js";
|
15
15
|
function d1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ p(
|
17
17
|
"svg",
|
@@ -47,7 +47,7 @@ function d1({ fill: t }) {
|
|
47
47
|
);
|
48
48
|
}
|
49
49
|
function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
50
|
-
const [r, l] =
|
50
|
+
const [r, l] = 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(
|
@@ -88,8 +88,8 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
88
88
|
]
|
89
89
|
}
|
90
90
|
),
|
91
|
-
/* @__PURE__ */ e("div", { className: "bw-h-[500px] bw-pr-2 bw-mt-3 bw-overflow-y-auto", children: (r == null ? void 0 : r.length) && r.filter((x) => x.name.toLowerCase().includes(b.toLowerCase())).map((x,
|
92
|
-
var
|
91
|
+
/* @__PURE__ */ e("div", { className: "bw-h-[500px] bw-pr-2 bw-mt-3 bw-overflow-y-auto", children: (r == null ? void 0 : r.length) && r.filter((x) => x.name.toLowerCase().includes(b.toLowerCase())).map((x, N) => {
|
92
|
+
var A;
|
93
93
|
return /* @__PURE__ */ p(
|
94
94
|
"div",
|
95
95
|
{
|
@@ -103,7 +103,7 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
103
103
|
children: [
|
104
104
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-items-center bw-gap-x-3", children: [
|
105
105
|
" ",
|
106
|
-
/* @__PURE__ */ e("img", { src: (
|
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
109
|
o.chain === x.name ? /* @__PURE__ */ e("img", { src: i, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(J, {})
|
@@ -114,12 +114,12 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
114
114
|
] })
|
115
115
|
]
|
116
116
|
},
|
117
|
-
|
117
|
+
N
|
118
118
|
);
|
119
119
|
}) })
|
120
120
|
] });
|
121
121
|
}
|
122
|
-
const Q1 = "_gradientbackground_7x8s8_1", U1 = "_overlay_7x8s8_5",
|
122
|
+
const Q1 = "_gradientbackground_7x8s8_1", U1 = "_overlay_7x8s8_5", s1 = {
|
123
123
|
gradientbackground: Q1,
|
124
124
|
overlay: U1
|
125
125
|
};
|
@@ -128,7 +128,7 @@ function Y1(t) {
|
|
128
128
|
return t.slice(0, 2) === "0x" ? !0 : n ? t == n : !1;
|
129
129
|
}
|
130
130
|
function W1(t) {
|
131
|
-
const [n, s] =
|
131
|
+
const [n, s] = k({}), o = c((i) => i.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: o,
|
133
133
|
multiChain: !0
|
134
134
|
}), l = c((i) => i.fromChain), { data: b } = b1({
|
@@ -138,7 +138,7 @@ function W1(t) {
|
|
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
|
141
|
+
let A = await (b[i] || b).getAllBalances((x = r == null ? void 0 : r[i]) == null ? void 0 : x.bech32Address), M = pe.keyBy(A, "denom");
|
142
142
|
s(M);
|
143
143
|
}
|
144
144
|
}
|
@@ -217,23 +217,23 @@ function et({ selectedChain: t }) {
|
|
217
217
|
const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o, showExchangeList: r, setCoinData: l, setChainData: b }) {
|
218
218
|
var je, Le;
|
219
219
|
c((u) => u.searchCustomCoin);
|
220
|
-
const d = c((u) => u.setSearchCustomCoin), { ref: i, inView: g } = z1(), { getWallet: x } = Te({}), { connected:
|
220
|
+
const d = c((u) => u.setSearchCustomCoin), { ref: i, inView: g } = z1(), { getWallet: x } = Te({}), { connected: N, address: A } = ze(), { isConnected: M, address: F } = fe(), { primaryWallet: h } = Ie();
|
221
221
|
S1();
|
222
|
-
const m = x(n),
|
222
|
+
const m = x(n), T = c((u) => u.fromChain), y = c((u) => u.fromCoin), S = c((u) => u.toChain), _ = c((u) => u.toCoin), [te, E] = k(!1), { cosmosBalance: G } = W1(n), { defaultCoin: O } = Ee, [z, f] = k(0), C = L1(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" &&
|
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" && ((je = P == null ? void 0 : P[n == null ? void 0 : n.chainId]) == null ? void 0 : je.bech32Address), $ = c((u) => u.toDisconnect);
|
226
226
|
c((u) => u.setToDisconnect);
|
227
|
-
const w = c((u) => u.customWallet),
|
227
|
+
const w = c((u) => u.customWallet), I = c((u) => u.setCustomWallet), B = c((u) => u.tokens), [L, v] = k([]), [R, re] = k([]), [Be, W] = k([]), H = B, U = l1({
|
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
230
|
enabled: !!((Le = m == null ? void 0 : m.address) != null && Le.length && n.chainId),
|
231
231
|
refetchOnWindowFocus: !1
|
232
232
|
});
|
233
233
|
function V(u) {
|
234
|
-
var ne, le,
|
234
|
+
var ne, le, oe, se, K, q, ae, ee, Y, ge, X, Q;
|
235
235
|
let D = w1(u.address);
|
236
|
-
return u.networkType == "cosmos" ? $e(((ne = G == null ? void 0 : G[D]) == null ? void 0 : ne.amount) / Math.pow(10, u.decimals) || 0) || "" : $e((((q = (K = (
|
236
|
+
return u.networkType == "cosmos" ? $e(((ne = G == null ? void 0 : G[D]) == null ? void 0 : ne.amount) / Math.pow(10, u.decimals) || 0) || "" : $e((((q = (K = (se = (oe = (le = U.data) == null ? void 0 : le.data) == null ? void 0 : oe[n == null ? void 0 : n.networkType]) == null ? void 0 : se[n.chainId]) == null ? void 0 : K[u.address]) == null ? void 0 : q.balance) || 0) / Math.pow(10, ((Q = (X = (ge = (Y = (ee = (ae = U.data) == null ? void 0 : ae.data) == null ? void 0 : ee[n == null ? void 0 : n.networkType]) == null ? void 0 : Y[n.chainId]) == null ? void 0 : ge[u.address]) == null ? void 0 : X.asset) == null ? void 0 : Q.decimals) || 0) || 0) || "";
|
237
237
|
}
|
238
238
|
j(() => {
|
239
239
|
s.length > 40 && Y1(s) && !R.length ? (E(!0), d({
|
@@ -248,26 +248,26 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
248
248
|
}
|
249
249
|
j(() => {
|
250
250
|
var u, D;
|
251
|
-
H != null && H.isSuccess && (n != null && n.chainId) &&
|
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
|
Ae();
|
254
254
|
}, [n.chainId]);
|
255
255
|
function ve() {
|
256
|
-
var
|
257
|
-
let u = (
|
256
|
+
var se;
|
257
|
+
let u = (se = L == null ? void 0 : L.filter((K) => {
|
258
258
|
var q, ae, ee, Y;
|
259
259
|
return ((q = K.name) == null ? void 0 : q.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((ae = K.symbol) == null ? void 0 : ae.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((Y = (ee = K.address) == null ? void 0 : ee.toLowerCase()) == null ? void 0 : Y.includes(s == null ? void 0 : s.toLowerCase()));
|
260
|
-
})) == null ? void 0 :
|
260
|
+
})) == null ? void 0 : se.sort((K, q) => {
|
261
261
|
if (Z) return V(q) * q.lastPrice - V(K) * K.lastPrice;
|
262
|
-
}), D = 20, ne = z * D, le = ne + D,
|
263
|
-
z == 0 ? re([...
|
262
|
+
}), D = 20, ne = z * D, le = ne + D, oe = u.slice(ne, le);
|
263
|
+
z == 0 ? re([...oe]) : re([...R, ...oe]);
|
264
264
|
}
|
265
265
|
return j(() => {
|
266
266
|
L != null && L.length && ve();
|
267
267
|
}, [L, s, z, Z, G, U.data]), j(() => {
|
268
268
|
g && f((u) => u + 1);
|
269
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, ne) => {
|
270
|
-
var le,
|
270
|
+
var le, oe, se, K, q, ae;
|
271
271
|
return /* @__PURE__ */ p(
|
272
272
|
"div",
|
273
273
|
{
|
@@ -278,20 +278,20 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
278
278
|
|
279
279
|
}`,
|
280
280
|
onClick: async () => {
|
281
|
-
var Y, ge, X, Q, xe, be, ke, ie,
|
281
|
+
var Y, ge, X, Q, xe, be, ke, ie, ue, Pe, Ne;
|
282
282
|
let ee = {
|
283
283
|
// ...coinData,
|
284
284
|
coin: u.symbol,
|
285
285
|
...u,
|
286
|
-
availBal: ((xe = (Q = (X = (ge = (Y = U.data) == null ? void 0 : Y.data) == null ? void 0 : ge[n == null ? void 0 : n.networkType]) == null ? void 0 : X[n.chainId]) == null ? void 0 : Q[u.address.toLowerCase()]) == null ? void 0 : xe.balance) / Math.pow(10, ((Ne = (Pe = (
|
286
|
+
availBal: ((xe = (Q = (X = (ge = (Y = U.data) == null ? void 0 : Y.data) == null ? void 0 : ge[n == null ? void 0 : n.networkType]) == null ? void 0 : X[n.chainId]) == null ? void 0 : Q[u.address.toLowerCase()]) == null ? void 0 : xe.balance) / Math.pow(10, ((Ne = (Pe = (ue = (ie = (ke = (be = U.data) == null ? void 0 : be.data) == null ? void 0 : ke[n == null ? void 0 : n.networkType]) == null ? void 0 : ie[n == null ? void 0 : n.chainId]) == null ? void 0 : ue[u.address.toLowerCase()]) == null ? void 0 : Pe.asset) == null ? void 0 : Ne.decimals) || 0)
|
287
287
|
};
|
288
|
-
l(ee), b(n), o(n, ee), (n == null ? void 0 : n.networkType) === (S == null ? void 0 : S.networkType) || (n == null || n.networkType,
|
288
|
+
l(ee), b(n), o(n, ee), (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
292
|
/* @__PURE__ */ p("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(le = u.image) != null && le.length ? "bw-bg-background-secondary" : ""}`, children: [
|
293
|
-
(
|
294
|
-
(
|
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
|
+
(se = n == null ? void 0 : n.image) != null && se.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: [
|
@@ -348,35 +348,35 @@ const tt = ce.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
348
348
|
},
|
349
349
|
D
|
350
350
|
);
|
351
|
-
}) : te && !(
|
351
|
+
}) : te && !(B.isLoading && B.isFetching) ? /* @__PURE__ */ e(et, { 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
353
|
function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coinData: r, showExchangeList: l, fetchChains: b }) {
|
354
354
|
var f, C, P, Z, $;
|
355
|
-
const [d, i] =
|
355
|
+
const [d, i] = k(!1), [g, x] = k(""), N = c((w) => w.tokens), [A, M] = k([]), [F, h] = k(0), [m, T] = k({ chain: "" }), y = c((w) => w.gradient), S = c((w) => w.configuration), _ = c((w) => w.chainObj);
|
356
356
|
j(() => {
|
357
|
-
var w,
|
358
|
-
if ((
|
359
|
-
let
|
360
|
-
|
357
|
+
var w, I, B, L;
|
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"), Be = 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(Be, 1, _["eclipse-svm"] || {}), v.splice(W, 1, _[999] || {}), !!pe.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);
|
364
364
|
}, [o]), j(() => {
|
365
|
-
var w,
|
366
|
-
if ((
|
367
|
-
let L = (
|
365
|
+
var w, I, B;
|
366
|
+
if ((I = (w = b.data) == null ? void 0 : w.data) != null && I.length) {
|
367
|
+
let L = (B = b.data) == null ? void 0 : B.data.filter((v) => !0);
|
368
368
|
h(L.length);
|
369
369
|
}
|
370
370
|
}, [(C = b.data) == null ? void 0 : C.data]);
|
371
|
-
function te(w,
|
372
|
-
var
|
373
|
-
(
|
371
|
+
function te(w, I) {
|
372
|
+
var B, L;
|
373
|
+
(B = w.chain) != null && B.length && ((L = I == null ? void 0 : I.coin) != null && L.length) && s();
|
374
374
|
}
|
375
375
|
function E() {
|
376
376
|
i(!1);
|
377
377
|
}
|
378
378
|
function G(w) {
|
379
|
-
|
379
|
+
T(w), x("");
|
380
380
|
}
|
381
381
|
const { tick: O, defaultCoin: z } = Ee;
|
382
382
|
return d ? /* @__PURE__ */ e(X1, { handleSetChainData: G, data: (P = b.data) == null ? void 0 : P.data, handleBack: E, network: m }) : /* @__PURE__ */ p(J, { children: [
|
@@ -398,42 +398,42 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
398
398
|
] })
|
399
399
|
] }),
|
400
400
|
b.isLoading ? /* @__PURE__ */ e(F1, { 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
|
-
b.isSuccess &&
|
402
|
-
var
|
401
|
+
b.isSuccess && A.map((w, I) => {
|
402
|
+
var B, L;
|
403
403
|
return /* @__PURE__ */ e(
|
404
404
|
"div",
|
405
405
|
{
|
406
406
|
style: m.name == w.name ? {
|
407
407
|
...S.gradientStyle
|
408
408
|
} : {},
|
409
|
-
className: ` bw-relative ${m.name == w.name ? (y ||
|
409
|
+
className: ` bw-relative ${m.name == w.name ? (y || s1.gradientbackground) + " " + s1.overlay : "bw-bg-transparent"} bw-p-[2px] bw-h-max bw-rounded-[7px]`,
|
410
410
|
children: /* @__PURE__ */ p(
|
411
411
|
"div",
|
412
412
|
{
|
413
413
|
onClick: () => {
|
414
|
-
let
|
414
|
+
let v = {
|
415
415
|
chain: w.name,
|
416
416
|
...w
|
417
417
|
// networkType: "cosmos",
|
418
418
|
};
|
419
|
-
G(
|
419
|
+
G(v);
|
420
420
|
},
|
421
421
|
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",
|
422
422
|
style: { cursor: "pointer" },
|
423
423
|
children: [
|
424
|
-
/* @__PURE__ */ e("img", { src: (
|
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
427
|
(m == null ? void 0 : m.chain) == w ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: O }) : /* @__PURE__ */ e(J, {})
|
428
428
|
]
|
429
429
|
},
|
430
|
-
|
430
|
+
I
|
431
431
|
)
|
432
432
|
},
|
433
|
-
|
433
|
+
I
|
434
434
|
);
|
435
435
|
}),
|
436
|
-
b.isSuccess &&
|
436
|
+
b.isSuccess && A.length ? /* @__PURE__ */ e("div", { className: "bw-p-[2px] bw-w-full", children: /* @__PURE__ */ p(
|
437
437
|
"div",
|
438
438
|
{
|
439
439
|
onClick: () => {
|
@@ -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: (
|
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(G1, {}) }) : g.length ? /* @__PURE__ */ e(
|
476
476
|
"button",
|
477
477
|
{
|
478
478
|
onClick: () => {
|
@@ -497,7 +497,7 @@ function rt({
|
|
497
497
|
handleShowWallet: r,
|
498
498
|
setConnectWalletField: l
|
499
499
|
}) {
|
500
|
-
const [b, d] =
|
500
|
+
const [b, d] = k(null), { address: i, chain: g, data: x, disconnect: N, ...A } = t, [M, F] = k(), { connector: h } = fe(), { connectors: m } = O1(), T = () => {
|
501
501
|
l(s), s == "to" ? (y(), n(!0)) : y();
|
502
502
|
};
|
503
503
|
R1(), j(() => {
|
@@ -512,7 +512,7 @@ function rt({
|
|
512
512
|
"button",
|
513
513
|
{
|
514
514
|
"aria-haspopup": "true",
|
515
|
-
onClick:
|
515
|
+
onClick: T,
|
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",
|
@@ -529,10 +529,10 @@ function rt({
|
|
529
529
|
) });
|
530
530
|
}
|
531
531
|
function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show: l }) {
|
532
|
-
var
|
532
|
+
var T, y, S, _, te, E, G, O, z;
|
533
533
|
const b = c((f) => f.configuration), d = c((f) => f.customWallet), { isConnected: i, isConnecting: g, isReconnecting: x } = fe();
|
534
534
|
Ie();
|
535
|
-
const { defaultCoin:
|
535
|
+
const { defaultCoin: N } = Ee, { isAnyWalletConnected: A, getWallet: M } = Te({
|
536
536
|
chainData: t,
|
537
537
|
show: l
|
538
538
|
});
|
@@ -546,13 +546,13 @@ function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConn
|
|
546
546
|
"div",
|
547
547
|
{
|
548
548
|
style: {
|
549
|
-
boxShadow: b && b.customTheme && ((y = (
|
549
|
+
boxShadow: b && b.customTheme && ((y = (T = b.customTheme) == null ? void 0 : T.shadow) == null ? void 0 : y.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
550
550
|
},
|
551
551
|
className: "bw-w-full bw-h-[78px] bw-pl-4 md:bw-pl-5 bw-flex bw-items-center bw-gap-x-2 md:bw-gap-x-4 bw-bg-background-container bw-rounded-lg bw-border bw-border-border-primary",
|
552
552
|
children: [
|
553
553
|
/* @__PURE__ */ p("div", { className: `bw-w-[36px] bw-h-[36px] bw-flex bw-items-center bw-justify-center bw-rounded-[50%] bw-border bw-border-border-primary bw-relative ${r.image ? "bw-bg-background-secondary" : ""}`, children: [
|
554
|
-
r != null && r.image ? /* @__PURE__ */ e("img", { src: r.image, className: "bw-rounded-[50%] bw-max-w-[35px] bw-max-h-[35px] bw-object-contain", alt: "img", width: 35, height: 35 }) : /* @__PURE__ */ e("img", { src:
|
555
|
-
/* @__PURE__ */ e("div", { className: `bw-w-[21px] bw-h-[21px] bw-border bw-bg-background-secondary bw-border-border-primary bw-absolute bw-bottom-[-2px] bw-right-[-5px] bw-rounded-[50%] ${r.image ? "bw-bg-background-secondary" : ""}`, children: t != null && t.image ? /* @__PURE__ */ e("img", { className: "bw-rounded-[50%]", src: t.image, alt: "img" }) : /* @__PURE__ */ e("img", { className: "bw-rounded-[50%] ", src:
|
554
|
+
r != null && r.image ? /* @__PURE__ */ e("img", { src: r.image, className: "bw-rounded-[50%] bw-max-w-[35px] bw-max-h-[35px] bw-object-contain", alt: "img", width: 35, height: 35 }) : /* @__PURE__ */ e("img", { src: N, className: "bw-rounded-[50%] bw-object-fill ", alt: "img", width: 35, height: 35 }),
|
555
|
+
/* @__PURE__ */ e("div", { className: `bw-w-[21px] bw-h-[21px] bw-border bw-bg-background-secondary bw-border-border-primary bw-absolute bw-bottom-[-2px] bw-right-[-5px] bw-rounded-[50%] ${r.image ? "bw-bg-background-secondary" : ""}`, children: t != null && t.image ? /* @__PURE__ */ e("img", { className: "bw-rounded-[50%]", src: t.image, alt: "img" }) : /* @__PURE__ */ e("img", { className: "bw-rounded-[50%] ", src: N, alt: "img" }) })
|
556
556
|
] }),
|
557
557
|
/* @__PURE__ */ p(
|
558
558
|
"div",
|
@@ -573,12 +573,12 @@ function a1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConn
|
|
573
573
|
]
|
574
574
|
}
|
575
575
|
),
|
576
|
-
/* @__PURE__ */ e(
|
576
|
+
/* @__PURE__ */ e(ot, { isConnected: l == "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: l, chainData: t, handleToDisconnect: m })
|
577
577
|
] });
|
578
578
|
}
|
579
|
-
function
|
579
|
+
function ot({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, show: o, chainData: r, handleToDisconnect: l }) {
|
580
580
|
var x;
|
581
|
-
const b = c((
|
581
|
+
const b = c((N) => N.customWallet), d = c((N) => N.fromChain), i = c((N) => N.toChain), { getWallet: g } = Te({
|
582
582
|
chainData: r,
|
583
583
|
show: o
|
584
584
|
});
|
@@ -609,8 +609,8 @@ function st({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, sho
|
|
609
609
|
}
|
610
610
|
) });
|
611
611
|
}
|
612
|
-
const
|
613
|
-
gradient:
|
612
|
+
const st = "_gradient_15zwe_1", Ze = {
|
613
|
+
gradient: st
|
614
614
|
};
|
615
615
|
function at({ mode: t, handleMode: n }) {
|
616
616
|
var o, r;
|
@@ -889,7 +889,7 @@ function h1() {
|
|
889
889
|
] });
|
890
890
|
}
|
891
891
|
function ct({ handleClose: t }) {
|
892
|
-
const [n, s] =
|
892
|
+
const [n, s] = k(""), [o, r] = k({ name: "Low", value: "low" }), [l, b] = k(""), [d, i] = k(""), [g, x] = k(""), N = c((f) => f.broadCastMode), A = c((f) => f.customFee), M = c((f) => f.setCustomFee), F = c((f) => f.slippage), h = c((f) => f.setSlippage), m = c((f) => f.setBroadCastMode), T = c((f) => f.option), y = c((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
|
}
|
@@ -897,10 +897,10 @@ function ct({ handleClose: t }) {
|
|
897
897
|
b(""), r(f);
|
898
898
|
}
|
899
899
|
j(() => {
|
900
|
-
r(
|
901
|
-
}, [
|
902
|
-
|
903
|
-
}, [
|
900
|
+
r(T);
|
901
|
+
}, [T]), j(() => {
|
902
|
+
A != null && A.length ? s(A) : s("");
|
903
|
+
}, [A]);
|
904
904
|
function E() {
|
905
905
|
y(o);
|
906
906
|
}
|
@@ -911,8 +911,8 @@ function ct({ handleClose: t }) {
|
|
911
911
|
x(f.target.value);
|
912
912
|
}
|
913
913
|
j(() => {
|
914
|
-
i(
|
915
|
-
}, [
|
914
|
+
i(N);
|
915
|
+
}, [N]);
|
916
916
|
function O() {
|
917
917
|
if (d == "" && (n.length || o.name.length)) {
|
918
918
|
m(""), b("Please select a mode");
|
@@ -924,8 +924,8 @@ function ct({ handleClose: t }) {
|
|
924
924
|
b(""), i(f);
|
925
925
|
}
|
926
926
|
return j(() => {
|
927
|
-
!
|
928
|
-
}, [
|
927
|
+
console.log(A, T.name, "customFee"), !A && !T.name.length && (m(""), i(""));
|
928
|
+
}, [A, T.name]), console.log(o, T, "customFee"), /* @__PURE__ */ p("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: [
|
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, {}) }),
|
@@ -953,7 +953,7 @@ function ct({ handleClose: t }) {
|
|
953
953
|
] });
|
954
954
|
}
|
955
955
|
function lt({ handleClose: t }) {
|
956
|
-
const [n, s] =
|
956
|
+
const [n, s] = k({ name: "Low", value: "low" }), [o, r] = k(""), [l, b] = k(""), d = c((y) => y.setEvmGas), i = c((y) => y.setEvmSpeed), g = c((y) => y.evmSpeed), x = c((y) => y.evmGas), N = c((y) => y.slippage), A = c((y) => y.setSlippage), M = o == x && g.name == n.name && N == l;
|
957
957
|
function F(y, S) {
|
958
958
|
s(y);
|
959
959
|
}
|
@@ -966,17 +966,17 @@ 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)),
|
969
|
+
o.length ? (d(o), i(n)) : (d(""), i(n)), A(l), t();
|
970
970
|
}
|
971
971
|
j(() => {
|
972
|
-
b(
|
973
|
-
}, [
|
974
|
-
function
|
972
|
+
b(N);
|
973
|
+
}, [A]);
|
974
|
+
function T(y) {
|
975
975
|
b(y.target.value);
|
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: l, handleSlippage:
|
979
|
+
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage: l, 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(
|
@@ -1110,7 +1110,7 @@ function ut() {
|
|
1110
1110
|
);
|
1111
1111
|
}
|
1112
1112
|
function mt() {
|
1113
|
-
const [t, n] =
|
1113
|
+
const [t, n] = k(!1), s = c((r) => r.fromChain);
|
1114
1114
|
function o() {
|
1115
1115
|
n(!1);
|
1116
1116
|
}
|
@@ -1131,7 +1131,7 @@ function mt() {
|
|
1131
1131
|
}
|
1132
1132
|
let i1, Fe, Ce, Me = 0;
|
1133
1133
|
function pt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isRoutesEnabled: r, fetchBalance: l }) {
|
1134
|
-
const [b, d] =
|
1134
|
+
const [b, d] = k(0), { getWallet: i } = Te({}), g = c((h) => h.fromChain), x = i(g), { isConnected: N } = fe();
|
1135
1135
|
j(() => {
|
1136
1136
|
t && clearInterval(Ce);
|
1137
1137
|
}, [t]), j(() => {
|
@@ -1150,18 +1150,18 @@ function pt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isR
|
|
1150
1150
|
}, [o]), j(() => (pe.isEmpty(o) || document.addEventListener("visibilitychange", F), () => {
|
1151
1151
|
document.removeEventListener("visibilitychange", F);
|
1152
1152
|
}), [o]);
|
1153
|
-
function
|
1153
|
+
function A() {
|
1154
1154
|
i1 = Date.now(), d((h) => (Fe = h, h));
|
1155
1155
|
}
|
1156
1156
|
function M() {
|
1157
1157
|
let h = Date.now(), m = Math.round((h - i1) / 1e3);
|
1158
|
-
o.deadline - Fe + m > o.deadline ? n((
|
1158
|
+
o.deadline - Fe + m > o.deadline ? n((T) => {
|
1159
1159
|
var y;
|
1160
|
-
return
|
1160
|
+
return console.log(t, "called confirm"), T || ((y = x.address) != null && y.length && l.refetch(), s.refetch(), d(o.deadline)), T;
|
1161
1161
|
}) : Fe && m && d(Fe - m);
|
1162
1162
|
}
|
1163
1163
|
function F() {
|
1164
|
-
document.visibilityState === "visible" ? M() :
|
1164
|
+
document.visibilityState === "visible" ? M() : A();
|
1165
1165
|
}
|
1166
1166
|
return j(() => (pe.isEmpty(o) ? Ce && clearInterval(Ce) : Ce = setInterval(() => {
|
1167
1167
|
d((h) => h <= 0 ? (Me = 0, o.deadline) : (Me++, h - 1));
|
@@ -1170,19 +1170,19 @@ function pt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isR
|
|
1170
1170
|
}), [o]), c((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1171
1171
|
}
|
1172
1172
|
function gt(t, n, s) {
|
1173
|
-
const { primaryWallet: o } = Ie(), [r, l] =
|
1173
|
+
const { primaryWallet: o } = Ie(), [r, l] = 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
|
1179
|
-
i.onAccountChange(g, (
|
1180
|
-
l(
|
1178
|
+
const g = new we(o.address);
|
1179
|
+
i.onAccountChange(g, (A) => {
|
1180
|
+
l(A.lamports / 1e9);
|
1181
1181
|
});
|
1182
|
-
const
|
1183
|
-
l(
|
1184
|
-
} catch {
|
1185
|
-
s(!1);
|
1182
|
+
const N = await i.getBalance(g) / 1e9;
|
1183
|
+
l(N), s(!1);
|
1184
|
+
} catch (g) {
|
1185
|
+
console.log(g), s(!1);
|
1186
1186
|
}
|
1187
1187
|
};
|
1188
1188
|
return j(() => {
|
@@ -1192,13 +1192,13 @@ function gt(t, n, s) {
|
|
1192
1192
|
function ft(t) {
|
1193
1193
|
return t == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ? "" : t;
|
1194
1194
|
}
|
1195
|
-
const xt = new
|
1196
|
-
new
|
1197
|
-
new
|
1198
|
-
new
|
1195
|
+
const xt = new we("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), ht = new we("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
1196
|
+
new we("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
1197
|
+
new we("So11111111111111111111111111111111111111112");
|
1198
|
+
new we("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
|
1199
1199
|
async function yt(t, n) {
|
1200
1200
|
if (!t) return;
|
1201
|
-
const s = new Ve(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new
|
1201
|
+
const s = new Ve(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new we(t), r = await s.getParsedTokenAccountsByOwner(o, {
|
1202
1202
|
programId: n ? ht : xt
|
1203
1203
|
});
|
1204
1204
|
let l = {};
|
@@ -1213,7 +1213,7 @@ const Ct = "0000000000000000000000000000000000", vt = async (t) => {
|
|
1213
1213
|
const n = await tronWeb.trx.getBalance(t);
|
1214
1214
|
return { balance: tronWeb.fromSun(n) };
|
1215
1215
|
} catch (n) {
|
1216
|
-
throw n;
|
1216
|
+
throw console.error("Error fetching TRX balance:", n), n;
|
1217
1217
|
}
|
1218
1218
|
};
|
1219
1219
|
async function kt(t, n) {
|
@@ -1221,20 +1221,20 @@ async function kt(t, n) {
|
|
1221
1221
|
if (n === Ct)
|
1222
1222
|
return vt(t);
|
1223
1223
|
const s = await tronWeb.contract().at(n), o = await s.balanceOf(t).call(), r = await s.decimals().call();
|
1224
|
-
return {
|
1224
|
+
return console.log(o, Number(o), Number(r), "balance"), {
|
1225
1225
|
balance: Number(o) / Math.pow(10, Number(r)),
|
1226
1226
|
contractAddress: n,
|
1227
1227
|
decimals: r.toString()
|
1228
1228
|
};
|
1229
1229
|
} catch (s) {
|
1230
|
-
throw s;
|
1230
|
+
throw console.error("Error fetching token balance:", s), s;
|
1231
1231
|
}
|
1232
1232
|
}
|
1233
1233
|
function Nt(t, n) {
|
1234
|
-
const [s, o] =
|
1234
|
+
const [s, o] = k(0), { primaryWallet: r, setPrimaryWallet: l } = Ie(), [b, d] = k(!1), i = c((w) => w.fromChain), { address: g, isConnected: x } = fe(), { address: N, isConnected: A } = ze(), M = c((w) => w.cosmosChainIds), { data: F, isConnected: h } = Oe({
|
1235
1235
|
chainId: M,
|
1236
1236
|
multiChain: !0
|
1237
|
-
}), m = c((w) => w.fromCoin), { data:
|
1237
|
+
}), m = c((w) => w.fromCoin), { data: T, isLoading: y } = $1({
|
1238
1238
|
address: g,
|
1239
1239
|
token: ft((m == null ? void 0 : m.address) || ""),
|
1240
1240
|
chainId: Number((i == null ? void 0 : i.chainId) || 0),
|
@@ -1251,13 +1251,13 @@ function Nt(t, n) {
|
|
1251
1251
|
});
|
1252
1252
|
async function O(w) {
|
1253
1253
|
if (!r) return;
|
1254
|
-
const
|
1255
|
-
if (
|
1254
|
+
const I = new Ve(w || "https://solana-rpc.publicnode.com");
|
1255
|
+
if (I)
|
1256
1256
|
try {
|
1257
|
-
const
|
1257
|
+
const B = new we(r.address);
|
1258
1258
|
d(!0);
|
1259
|
-
const
|
1260
|
-
o(
|
1259
|
+
const v = await I.getBalance(B) / 1e9;
|
1260
|
+
o(v), d(!1);
|
1261
1261
|
} catch {
|
1262
1262
|
d(!1);
|
1263
1263
|
}
|
@@ -1265,10 +1265,10 @@ function Nt(t, n) {
|
|
1265
1265
|
async function z(w) {
|
1266
1266
|
try {
|
1267
1267
|
d(!0);
|
1268
|
-
let
|
1269
|
-
d(!1), o(
|
1270
|
-
} catch {
|
1271
|
-
d(!1);
|
1268
|
+
let I = await yt(r.address, w);
|
1269
|
+
console.log(I, "ecres"), d(!1), o(I == null ? void 0 : I[m == null ? void 0 : m.address]);
|
1270
|
+
} catch (I) {
|
1271
|
+
console.log(I), d(!1);
|
1272
1272
|
}
|
1273
1273
|
}
|
1274
1274
|
let f;
|
@@ -1276,8 +1276,8 @@ function Nt(t, n) {
|
|
1276
1276
|
if (!r) return;
|
1277
1277
|
const w = await r.connector.getPublicClient();
|
1278
1278
|
if (!w) return;
|
1279
|
-
const
|
1280
|
-
|
1279
|
+
const I = new we(r.address);
|
1280
|
+
I && (f = w.onAccountChange(I, (B) => {
|
1281
1281
|
var L;
|
1282
1282
|
if (i.networkType == "sol" && (r != null && r.address))
|
1283
1283
|
if (((L = m == null ? void 0 : m.symbol) == null ? void 0 : L.toLowerCase()) === "sol")
|
@@ -1302,44 +1302,44 @@ function Nt(t, n) {
|
|
1302
1302
|
w && w.removeAccountChangeListener(f);
|
1303
1303
|
}), [r == null ? void 0 : r.address, i == null ? void 0 : i.networkType, m]);
|
1304
1304
|
async function Z(w) {
|
1305
|
-
var
|
1306
|
-
let
|
1305
|
+
var B, L;
|
1306
|
+
let I = S[w] || S;
|
1307
1307
|
try {
|
1308
1308
|
d(!0);
|
1309
|
-
let
|
1309
|
+
let v = await I.getAllBalances((B = F == null ? void 0 : F[w]) == null ? void 0 : B.bech32Address), R = pe.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
|
-
} catch {
|
1312
|
-
d(!1);
|
1311
|
+
} catch (v) {
|
1312
|
+
console.log(v, "balerrorcos"), d(!1);
|
1313
1313
|
}
|
1314
1314
|
}
|
1315
|
-
async function $(w,
|
1315
|
+
async function $(w, I) {
|
1316
1316
|
o(0);
|
1317
1317
|
try {
|
1318
1318
|
d(!0);
|
1319
|
-
let
|
1320
|
-
o((
|
1321
|
-
} catch {
|
1322
|
-
d(!1);
|
1319
|
+
let B = await kt(w, I);
|
1320
|
+
console.log(B, "balancetron"), o((B == null ? void 0 : B.balance) || 0), d(!1);
|
1321
|
+
} catch (B) {
|
1322
|
+
console.log(B, "balerrortron"), d(!1);
|
1323
1323
|
}
|
1324
1324
|
}
|
1325
1325
|
return j(() => {
|
1326
1326
|
var w;
|
1327
|
-
o(0), i.networkType == "sol" && (r != null && r.address) ? ((w = m == null ? void 0 : m.symbol) == null ? void 0 : w.toLowerCase()) === "sol" ? O() : i.chainId == "eclipse-svm" ? m.symbol == "ETH" ? O("https://eclipse.lgns.net/") : z("https://eclipse.lgns.net/") : z() : i.networkType == "sui" && (r == null ? void 0 : r.chain) == "SUI" || i.networkType == "btc" && (r == null ? void 0 : r.chain) == "BTC" ? P() : i.networkType == "evm" && g && (g != null && g.length) ? o(Number((
|
1328
|
-
}, [i.networkType, i == null ? void 0 : i.chainId, m.symbol, m == null ? void 0 : m.address,
|
1327
|
+
o(0), i.networkType == "sol" && (r != null && r.address) ? ((w = m == null ? void 0 : m.symbol) == null ? void 0 : w.toLowerCase()) === "sol" ? O() : i.chainId == "eclipse-svm" ? m.symbol == "ETH" ? O("https://eclipse.lgns.net/") : z("https://eclipse.lgns.net/") : z() : i.networkType == "sui" && (r == null ? void 0 : r.chain) == "SUI" || i.networkType == "btc" && (r == null ? void 0 : r.chain) == "BTC" ? P() : i.networkType == "evm" && g && (g != null && g.length) ? o(Number((T == null ? void 0 : T.formatted) || 0)) : i.networkType == "cosmos" && h && !_ ? Z(i == null ? void 0 : i.chainId) : i.networkType == "tron" && N && $(N, m == null ? void 0 : m.address);
|
1328
|
+
}, [i.networkType, i == null ? void 0 : i.chainId, m.symbol, m == null ? void 0 : m.address, T, g, r == null ? void 0 : r.address, g, h, _, r == null ? void 0 : r.chain, t, N]), {
|
1329
1329
|
getbal: s,
|
1330
1330
|
isBalanceLoading: (i == null ? void 0 : i.networkType) == "evm" ? y : b
|
1331
1331
|
};
|
1332
1332
|
}
|
1333
|
-
const Tt = ce.lazy(() => import("./SwapAsset-
|
1333
|
+
const Tt = ce.lazy(() => import("./SwapAsset-CeJghqM4.js")), It = ce.lazy(() => import("./InputComp-BpwhlO5B.js")), Bt = ce.lazy(() => import("./QuotesProgress-D-bhAdY6.js")), At = ce.lazy(() => import("./TxnButton-06UcI8vZ.js")), jt = ce.lazy(() => import("./index-a8BP6V0o.js").then((t) => t.i)), Lt = ce.lazy(() => import("./index-B7xlfFYR.js")), Pt = ce.lazy(() => import("./LoadRoute-Dqk83p2o.js")), Ft = ce.lazy(() => import("./AllRoutes-DIWsY_7s.js")), Mt = ce.lazy(() => import("./AdvancedSettings-DMVTMB1Z.js"));
|
1334
1334
|
function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
1335
1335
|
var Ke, Je, qe, Xe, Qe, Ue, Ye;
|
1336
|
-
const [o, r] =
|
1336
|
+
const [o, r] = k(), [l, 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 } = Ie(), { address: y } = fe(), { address: S } = ze(), { getbal: _, isBalanceLoading: te } = Nt(h), { data: E, isConnected: G } = Oe({ chainId: "cosmoshub-4" }), O = c((a) => a.persist), z = c((a) => a.setPersist), f = c((a) => a.route), C = c((a) => a.fromChain), P = c((a) => a.toChain), Z = c((a) => a.fromCoin), $ = c((a) => a.toCoin), w = c((a) => a.setFromChain), I = c((a) => a.setToChain), B = c((a) => a.setFromCoin), L = c((a) => a.setToCoin), v = c((a) => a.amount), R = c((a) => a.setAmount), re = c((a) => a.customWallet), Be = c((a) => a.setCosmosChainIds), W = c((a) => a.customFee), H = c((a) => a.broadCastMode), U = c((a) => a.evmGas), V = c((a) => a.evmSpeed), Ae = c((a) => a.slippage), ve = c((a) => a.option), je = c((a) => a.setCustomWallet), Le = c((a) => a.setSelectedProvider), { balanceSol: u } = gt(C, h, Re), { suggestAndConnectAsync: D } = Z1(), ne = !!(v.length && C.chain.length && Z.coin.length && P.chain.length && $.coin.length && !g && N), le = c((a) => a.direct), oe = c((a) => a.maxAccounts), se = ["routes", y, C, P, Z, $, v, T == null ? void 0 : T.address, S, re, E == null ? void 0 : E.bech32Address, W, U, V, Ae, H, ve.value, le, oe];
|
1337
1337
|
let K = (H === "Priority Fee" || H === "Both") && (W != null && W.length) ? W : ve.value, q = (H === "Jito Tip" || H === "Both") && (W != null && W.length) ? W : ve.value, ae = U != null && U.length ? U : V.value;
|
1338
1338
|
const ee = (C == null ? void 0 : C.networkType) === "sol" ? H === "Priority Fee" ? `&solanaPriorityFee=${K}` : H === "Jito Tip" ? { solanaJitoTip: q } : { solanaPriorityFee: K, solanaJitoTip: q } : (C == null ? void 0 : C.networkType) === "evm" ? { evmPriorityFee: ae } : "", { getWallet: Y, refetch: ge } = Te({}), { routes: X, routesData: Q, setRoutesData: xe, errorMessage: be, setErrorMessage: ke } = q1({
|
1339
1339
|
enabled: ne,
|
1340
|
-
dependency:
|
1341
|
-
payload: [(C == null ? void 0 : C.networkType) === "cosmos" ?
|
1342
|
-
}), ie = Y(C),
|
1340
|
+
dependency: se,
|
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 = Y(C)) == null ? void 0 : Je.address) || "", C, P, Z, $, v, Number(Ae) * 100, (re == null ? void 0 : re.length) > 30 ? ((qe = Y({})) == 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 = Y(P)) == null ? void 0 : Qe.address) || "", ee]
|
1342
|
+
}), ie = Y(C), ue = l1({
|
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),
|
@@ -1350,17 +1350,17 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1350
1350
|
confirmRoute: d,
|
1351
1351
|
setConfirmRoute: i,
|
1352
1352
|
isRoutesEnabled: ne,
|
1353
|
-
fetchBalance:
|
1353
|
+
fetchBalance: ue
|
1354
1354
|
});
|
1355
1355
|
j(() => {
|
1356
|
-
|
1356
|
+
v || xe({});
|
1357
1357
|
let a;
|
1358
|
-
return Number(
|
1359
|
-
|
1358
|
+
return Number(v) > 0 && (a = setTimeout(() => {
|
1359
|
+
A(!0);
|
1360
1360
|
}, 500)), () => {
|
1361
|
-
clearTimeout(a),
|
1361
|
+
clearTimeout(a), A(!1);
|
1362
1362
|
};
|
1363
|
-
}, [
|
1363
|
+
}, [v]), j(() => {
|
1364
1364
|
X.isFetching && xe({});
|
1365
1365
|
}, [X.isFetching]);
|
1366
1366
|
function Ne(a) {
|
@@ -1372,24 +1372,25 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1372
1372
|
async function C1(a) {
|
1373
1373
|
if (G)
|
1374
1374
|
try {
|
1375
|
-
let
|
1376
|
-
if (
|
1375
|
+
let de = await r1();
|
1376
|
+
if (de.length && !de.includes(a.chainId)) {
|
1377
1377
|
let he = await D({
|
1378
1378
|
chainInfo: a,
|
1379
1379
|
walletType: H1.KEPLR
|
1380
1380
|
}), me = await ge(), ye = await r1();
|
1381
1381
|
Be(ye);
|
1382
1382
|
}
|
1383
|
-
} catch {
|
1383
|
+
} catch (de) {
|
1384
|
+
console.log(de);
|
1384
1385
|
}
|
1385
1386
|
else
|
1386
1387
|
return;
|
1387
1388
|
}
|
1388
1389
|
function v1(a) {
|
1389
|
-
(a == null ? void 0 : a.networkType) == "cosmos" && C1(a.chainInfo), R(""), ke({ error: "" }), o == "from" ? w({ ...a }) : o == "to" &&
|
1390
|
+
(a == null ? void 0 : a.networkType) == "cosmos" && C1(a.chainInfo), R(""), ke({ error: "" }), o == "from" ? w({ ...a }) : o == "to" && I({ ...a });
|
1390
1391
|
}
|
1391
1392
|
function k1(a) {
|
1392
|
-
ke({ error: "" }), R(""), o == "from" ?
|
1393
|
+
ke({ error: "" }), R(""), o == "from" ? B({ ...a }) : o == "to" && L({ ...a });
|
1393
1394
|
}
|
1394
1395
|
function He() {
|
1395
1396
|
b(!l);
|
@@ -1405,17 +1406,17 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1405
1406
|
}
|
1406
1407
|
function T1() {
|
1407
1408
|
setTimeout(() => {
|
1408
|
-
Re(!0),
|
1409
|
+
Re(!0), ue.refetch();
|
1409
1410
|
}, 1e3);
|
1410
1411
|
}
|
1411
1412
|
function I1() {
|
1412
1413
|
R("");
|
1413
1414
|
}
|
1414
|
-
function B1(a,
|
1415
|
+
function B1(a, de, he) {
|
1415
1416
|
_e.fetchTokens(a.chainId, he).then((me) => me.json()).then((me) => {
|
1416
1417
|
var ye, We;
|
1417
1418
|
(We = (ye = me.data) == null ? void 0 : ye[a.chainId]) == null || We.forEach((De) => {
|
1418
|
-
|
1419
|
+
de({
|
1419
1420
|
...Z,
|
1420
1421
|
coin: De.symbol,
|
1421
1422
|
...De,
|
@@ -1425,39 +1426,39 @@ function Et({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1425
1426
|
});
|
1426
1427
|
}
|
1427
1428
|
function A1() {
|
1428
|
-
R(""), w(P),
|
1429
|
+
R(""), w(P), B($), I(C), L(Z), C.networkType !== P.networkType && je("");
|
1429
1430
|
}
|
1430
1431
|
j(() => {
|
1431
1432
|
O.isHistory && f === "" && (z({ allSteps: { steps: null, currentStep: 0 }, stepData: {} }), Ne(!1));
|
1432
1433
|
}, [O]);
|
1433
1434
|
function j1(a) {
|
1434
|
-
var
|
1435
|
+
var de;
|
1435
1436
|
if (a && s.isSuccess && a !== (P == null ? void 0 : P.networkType) && a !== (C == null ? void 0 : C.networkType)) {
|
1436
1437
|
let he = pe.keyBy(s.data.data, "chainId"), me = a == "evm" ? "8453" : a == "sol" ? "sol" : a == "sui" ? "1" : a == "btc" ? "btc" : a == "tron" ? "tron" : "cosmoshub-4", ye = a == "evm" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "sol" ? "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" : a == "sui" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "btc" ? "bitcoin" : a == "tron" ? "0000000000000000000000000000000000" : "uatom";
|
1437
1438
|
w({
|
1438
1439
|
...he[me],
|
1439
|
-
chain: ((
|
1440
|
-
}), B1(he[me],
|
1440
|
+
chain: ((de = he[me]) == null ? void 0 : de.name) || ""
|
1441
|
+
}), B1(he[me], B, ye);
|
1441
1442
|
} else
|
1442
1443
|
return;
|
1443
1444
|
}
|
1444
|
-
return /* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e(M1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(jt, { connectWalletField: M, handleShowWallet: t, handleRecentSelectedWallet: j1 }) : !d && !((Ye = O == null ? void 0 : O.routeId) != null && Ye.length) ? l ? /* @__PURE__ */ e(Ft, { routes: X, handleShowAllRoutes: He, handleRoutesData: N1, convertVal: ($ == null ? void 0 : $.lastPrice) || 0, amount:
|
1445
|
+
return console.log(T, "confirm route"), /* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e(M1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(jt, { connectWalletField: M, handleShowWallet: t, handleRecentSelectedWallet: j1 }) : !d && !((Ye = O == null ? void 0 : O.routeId) != null && Ye.length) ? l ? /* @__PURE__ */ e(Ft, { routes: X, handleShowAllRoutes: He, handleRoutesData: N1, convertVal: ($ == null ? void 0 : $.lastPrice) || 0, amount: v }) : o ? /* @__PURE__ */ e(nt, { chainData: o == "from" ? C : P, coinData: o == "from" ? Z : $, setChainData: v1, setCoinData: k1, handleReset: y1, showExchangeList: o, fetchBalance: ue, fetchChains: s }) : /* @__PURE__ */ p(J, { children: [
|
1445
1446
|
/* @__PURE__ */ e(mt, {}),
|
1446
1447
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1447
1448
|
/* @__PURE__ */ e(Tt, { handleSwap: A1 }),
|
1448
1449
|
/* @__PURE__ */ e(a1, { chainData: C, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: Z }),
|
1449
1450
|
/* @__PURE__ */ e(a1, { chainData: P, show: "to", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: $ })
|
1450
1451
|
] }),
|
1451
|
-
/* @__PURE__ */ e(It, { amount:
|
1452
|
+
/* @__PURE__ */ e(It, { amount: v, setAmount: R, fetchBalance: ue, getCoinBalance: _, isBalanceLoading: te }),
|
1452
1453
|
/* @__PURE__ */ e(e1, { fallback: /* @__PURE__ */ e("div", { children: "Loading..." }), children: /* @__PURE__ */ e(Mt, {}) }),
|
1453
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Pt, { routes: X, handleShowAllRoutes: He, routesData: Q, amount:
|
1454
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Pt, { routes: X, handleShowAllRoutes: He, routesData: Q, amount: v, isRoutesEnabled: N, price: ((Q == null ? void 0 : Q.outputAmountDisplay) || "") * (($ == null ? void 0 : $.lastPrice) || 0) }) }),
|
1454
1455
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (be == null ? void 0 : be.error) == "string" ? be == null ? void 0 : be.error : "" }),
|
1455
|
-
/* @__PURE__ */ e(Bt, { amount:
|
1456
|
-
/* @__PURE__ */ e(At, { routesData: Q, handleSuccess: Re, routes: X, fetchBalancePrev:
|
1457
|
-
] }) : /* @__PURE__ */ e(Lt, { handleConfirmClose: Ge, amount:
|
1456
|
+
/* @__PURE__ */ e(Bt, { amount: N, routes: X, routesData: Q, quoteTimer: Pe }),
|
1457
|
+
/* @__PURE__ */ e(At, { routesData: Q, handleSuccess: Re, routes: X, fetchBalancePrev: ue, amount: v, isAmountTyped: N, handleShowWallet: t, setConnectWalletField: F, handleConfirmClose: Ge, balanceSol: u, getCoinBalance: _ })
|
1458
|
+
] }) : /* @__PURE__ */ e(Lt, { handleConfirmClose: Ge, amount: v, routesData: Q, resetAmount: I1, routes: X, handleStopRoute: Ne, resetBalance: T1 }) }) });
|
1458
1459
|
}
|
1459
1460
|
function Ot({ fetchChains: t }) {
|
1460
|
-
const [n, s] =
|
1461
|
+
const [n, s] = k(!1), { isConnected: o } = fe();
|
1461
1462
|
function r(l) {
|
1462
1463
|
s(!n);
|
1463
1464
|
}
|