@blockend/widget 1.0.47 → 1.0.48-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AllRoutes-DzeVxLDj.js → AllRoutes-D8LuuVmM.js} +9 -9
- package/dist/{Box-Ci2zRQrs.js → Box-DM9yFOex.js} +8 -8
- package/dist/EstGas-BeT31S57.js +13644 -0
- package/dist/{Grow-BE3H0oa5.js → Grow-DOn6L3co.js} +2 -2
- package/dist/{InputComp-CJp-XwEr.js → InputComp-NuVHgaJr.js} +5 -5
- package/dist/{LoadRoute-eUX6vrIQ.js → LoadRoute-B67KdzDM.js} +18 -18
- package/dist/QuotesProgress-QaDMFoy1.js +28 -0
- package/dist/{SwapAsset-Dk21ATof.js → SwapAsset-DS1khTG7.js} +1 -1
- package/dist/{Tooltip-BZfJNVn-.js → Tooltip-Ba3WFgGd.js} +15 -15
- package/dist/TxnButton-tr4Dz_jE.js +223 -0
- package/dist/{add-ZLHbLJJu.js → add-q9Nf6prg.js} +1 -1
- package/dist/{all-wallets-d2aKzL33.js → all-wallets-DPeT0Mif.js} +1 -1
- package/dist/{app-store-D64ScJNv.js → app-store-DN3WdWdo.js} +1 -1
- package/dist/{apple-Du4IHASB.js → apple-DyzMqifv.js} +1 -1
- package/dist/{arrow-bottom-Dv2epYGz.js → arrow-bottom-DqoHxj9Z.js} +1 -1
- package/dist/{arrow-bottom-circle-UWVTMTVh.js → arrow-bottom-circle-gYCPf_-a.js} +1 -1
- package/dist/{arrow-left-BKfIGA7r.js → arrow-left-BCb0WGCp.js} +1 -1
- package/dist/{arrow-right-2mONf0tM.js → arrow-right-COFDKXwO.js} +1 -1
- package/dist/{arrow-top-X4pWUiKn.js → arrow-top-A2hPO7gg.js} +1 -1
- package/dist/{bank-CsABCgFp.js → bank-DzMH-tSV.js} +1 -1
- package/dist/{basic-BPWB_wOx.js → basic-C5wivloW.js} +3 -3
- package/dist/{browser-DwbBRE2D.js → browser-pBih3Y0E.js} +1 -1
- package/dist/{card-BewgfynW.js → card-CnPr5FkC.js} +1 -1
- package/dist/{ccip-CLnQdUd7.js → ccip-Di_Zaa6h.js} +16 -16
- package/dist/{checkmark-CQhUJTfi.js → checkmark-DuHkawx4.js} +1 -1
- package/dist/{checkmark-bold-CedqjnnO.js → checkmark-bold-CbTyGrPC.js} +1 -1
- package/dist/{chevron-bottom-DJ4X9Prx.js → chevron-bottom-ClujWrwS.js} +1 -1
- package/dist/{chevron-left-DWynSM9B.js → chevron-left-Bk48p4Zx.js} +1 -1
- package/dist/{chevron-right-DvWAAqhV.js → chevron-right-DNGloKKX.js} +1 -1
- package/dist/{chevron-top-BR530r9H.js → chevron-top-BeF-AMWu.js} +1 -1
- package/dist/{chrome-store-_0c6caxN.js → chrome-store-DbhS7z0N.js} +1 -1
- package/dist/{clock-VdAYDjqL.js → clock-C_6_l4to.js} +1 -1
- package/dist/{close-CO-0N2CX.js → close-CSt1jFt2.js} +1 -1
- package/dist/{coinPlaceholder-ujAsyqU0.js → coinPlaceholder-BCj1y0PN.js} +1 -1
- package/dist/{compass-VKJy5_W5.js → compass-BylNTlMa.js} +1 -1
- package/dist/{copy-osfd8JXZ.js → copy-B5chXsW-.js} +1 -1
- package/dist/{core-B_HqNWOu.js → core-DMrbUYAd.js} +16 -17
- package/dist/{cursor-DpjQo7re.js → cursor-DOai1hPO.js} +1 -1
- package/dist/{cursor-transparent-xK4CF8Hs.js → cursor-transparent-Cadcmy6E.js} +1 -1
- package/dist/{desktop-BMPBQv2t.js → desktop-DCy_OF9q.js} +1 -1
- package/dist/{disconnect-Cl9LGKMz.js → disconnect-d_9YI8yP.js} +1 -1
- package/dist/{discord-CZVHD-wp.js → discord-C5PncbsA.js} +1 -1
- package/dist/{down-Ct-xismN.js → down-B0DJRPMS.js} +2 -2
- package/dist/{etherscan-DdrzJHLk.js → etherscan-ClGwr9lW.js} +1 -1
- package/dist/{exclamation-triangle-CIQaYDSx.js → exclamation-triangle-UG68kEuv.js} +1 -1
- package/dist/{extension-Bb_ygQH_.js → extension-Bhr-Ssau.js} +1 -1
- package/dist/{external-link-Ddh7vP38.js → external-link-BRJo7SZO.js} +1 -1
- package/dist/{facebook-D6zpX69B.js → facebook-BnA-xxoO.js} +1 -1
- package/dist/{farcaster-ifhEe-N4.js → farcaster-CvgpGB8R.js} +1 -1
- package/dist/{filters-DkeDbJhM.js → filters-2DNvXC2d.js} +1 -1
- package/dist/{getChainIds-B9EIXuqY.js → getChainIds-BJOBostX.js} +2 -2
- package/dist/getCosmosAddress-nYlLagxO.js +8398 -0
- package/dist/{github-DBFD3-Hx.js → github-CqCIZfoi.js} +1 -1
- package/dist/{google-CoR2VD6q.js → google-Cb46Xe1N.js} +1 -1
- package/dist/{hamburger-Bw36etpI.js → hamburger-Cj81xHVG.js} +5 -5
- package/dist/{help-circle-DUrhwW6n.js → help-circle-BQm3Y4uL.js} +1 -1
- package/dist/{id-Bq9kGLxW.js → id-DlZAWXhX.js} +1 -1
- package/dist/{image-m0IwqZ1Z.js → image-C-Rdb3yG.js} +1 -1
- package/dist/{index-DOop9kfD.js → index-BEianCH_.js} +374 -349
- package/dist/{index-DbRR6GNq.js → index-BJtXFuWZ.js} +8 -7
- package/dist/{index-ZWAnsHEz.js → index-BKAQ3OTd.js} +11 -11
- package/dist/{index-D2EfKDiV.js → index-CPAph-rb.js} +4 -4
- package/dist/{index-C-aKTD_P.js → index-CUDhfiq5.js} +10 -10
- package/dist/{index-BsWWdDAF.js → index-CxxmgFkL.js} +1 -1
- package/dist/{index-Cdagj5-o.js → index-DD4yqUTK.js} +78 -78
- package/dist/index-DQ-upUtl.js +85050 -0
- package/dist/{index-CUx6_xcj.js → index-DeBuj-lE.js} +1 -1
- package/dist/{index-U2mQgSOl.js → index-N4PNqcjR.js} +2 -2
- package/dist/index-eC9_VgZe.js +3183 -0
- package/dist/{index.es-BYDUqEHk.js → index.es-BkvYD6Tp.js} +3032 -3244
- package/dist/{index.es-D8AzsbDB.js → index.es-DGhokHli.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-circle-Cpd8vFSP.js → info-circle-BweemjWa.js} +1 -1
- package/dist/{info-anm9CSBd.js → info-o_cb8tTT.js} +1 -1
- package/dist/{lightbulb-DPXldPzr.js → lightbulb-CIREQKfQ.js} +1 -1
- package/dist/{mail-r4sP3-4z.js → mail-D7pla8qN.js} +1 -1
- package/dist/{mobile-D0nLhS3C.js → mobile-BfSFqXTR.js} +1 -1
- package/dist/{more-BKn6NMxN.js → more-Cm2OZt-4.js} +1 -1
- package/dist/{network-placeholder-YBGnG39d.js → network-placeholder-cja_SKEh.js} +1 -1
- package/dist/{nftPlaceholder-B2s--N4I.js → nftPlaceholder-CPMGC0YA.js} +1 -1
- package/dist/{off-BMZ4jVAS.js → off-2ov8-cMg.js} +1 -1
- package/dist/{play-store-BjMQicZs.js → play-store-K7jF5Tx9.js} +1 -1
- package/dist/{plus-CYx41gPe.js → plus-D2hT5Tke.js} +1 -1
- package/dist/{qr-code-Drc3pJQ_.js → qr-code-DdAcFtyy.js} +1 -1
- package/dist/{recycle-horizontal-rWs7v9lF.js → recycle-horizontal-C_hgDyOE.js} +1 -1
- package/dist/{refresh-D2BcFG4j.js → refresh-DmHZ_uHs.js} +1 -1
- package/dist/{reown-logo-wUSSdW9D.js → reown-logo-C7Ew_uaV.js} +1 -1
- package/dist/{search-B-YtHXtd.js → search-DIQ1nJd8.js} +1 -1
- package/dist/{send-DLvL_BbY.js → send-oPtL6xIE.js} +1 -1
- package/dist/{swapHorizontal-D44_OZ9u.js → swapHorizontal-Csk-Etan.js} +1 -1
- package/dist/{swapHorizontalBold-Cep1eyxj.js → swapHorizontalBold-BcWknhY6.js} +1 -1
- package/dist/{swapHorizontalMedium-CwPNAHyv.js → swapHorizontalMedium-DmNmthd2.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-s5nQTCKq.js → swapHorizontalRoundedBold-Cqili0jK.js} +1 -1
- package/dist/{swapVertical-Bc1o38Xk.js → swapVertical-CmQhV1BW.js} +1 -1
- package/dist/{telegram-BW1hx271.js → telegram-8VqDFrbM.js} +1 -1
- package/dist/{three-dots-BY9EVUEH.js → three-dots-54YC22RW.js} +1 -1
- package/dist/{twitch-Cte3S7e8.js → twitch-BG66DH8z.js} +1 -1
- package/dist/{twitterIcon-CSNk9-ke.js → twitterIcon-B3TRjKnO.js} +1 -1
- package/dist/{unsupportedProp-7kgM9Qp3.js → unsupportedProp-DxJPUr4X.js} +1 -1
- package/dist/useRegisterError-RP3LuUvG.js +8913 -0
- package/dist/{verify-D1ht4LA_.js → verify-Cxrk9OZf.js} +1 -1
- package/dist/{verify-filled-dnv72m5L.js → verify-filled-DTYh5fHd.js} +1 -1
- package/dist/{w3m-modal-C6GoV_9z.js → w3m-modal-BtzAU8Rd.js} +2 -2
- package/dist/{wallet-Bprt1UAo.js → wallet-CqHzy9UL.js} +1 -1
- package/dist/{wallet-placeholder-Gxhin3eq.js → wallet-placeholder-DUpL8Wi-.js} +1 -1
- package/dist/{walletconnect-BtGZzptI.js → walletconnect-CMShOjhI.js} +1 -1
- package/dist/{warning-circle-Dg0PEAqK.js → warning-circle-C-6BUTdg.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-DvzFvpB5.js → x-Bs3i9yGj.js} +1 -1
- package/package.json +6 -2
- package/dist/EstGas-CObudv5z.js +0 -12661
- package/dist/QuotesProgress-DCNTk9oc.js +0 -28
- package/dist/TxnButton-DEs1au8L.js +0 -208
- package/dist/getCosmosAddress-CyskK48O.js +0 -9565
- package/dist/index-BcWL0DrD.js +0 -30399
- package/dist/index-BeQiCUcq.js +0 -3010
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/useRegisterError-JoAAYTsQ.js +0 -8812
@@ -1,17 +1,17 @@
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as K } from "react/jsx-runtime";
|
2
2
|
import de, { useState as N, useEffect as B, useRef as B1, Suspense as A1 } from "react";
|
3
|
-
import { B as j1, i as Ee, u as ke, F as De, f as $e, C as _e, W as i1 } from "./useRegisterError-
|
4
|
-
import { u as l, l as pe, a as a1, c as
|
5
|
-
import { C as e1, M as F1, g as t1 } from "./getChainIds-
|
3
|
+
import { B as j1, i as Ee, u as ke, F as De, f as $e, C as _e, W as i1 } from "./useRegisterError-RP3LuUvG.js";
|
4
|
+
import { u as l, l as pe, a as a1, c as Se, S as P1, M as L1 } from "./index-DQ-upUtl.js";
|
5
|
+
import { C as e1, M as F1, g as t1 } from "./getChainIds-BJOBostX.js";
|
6
6
|
import { useQuery as l1 } from "@tanstack/react-query";
|
7
7
|
import { useAccount as ge, useConnect as M1, useConnections as E1, useBalance as O1 } from "wagmi";
|
8
8
|
import { useDynamicContext as Ne, useIsLoggedIn as R1, useUserWallets as $1 } from "@dynamic-labs/sdk-react-core";
|
9
9
|
import { S as _1 } from "./shareicon-CG3v7iKI.js";
|
10
|
-
import { u as
|
11
|
-
import { useAccount as Oe, useStargateClient as c1, useSuggestChainAndConnect as
|
12
|
-
import { S as H1, D as G1 } from "./down-
|
10
|
+
import { u as S1, B as V1 } from "./index-N4PNqcjR.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as c1, useSuggestChainAndConnect as z1, WalletType as Z1 } from "graz";
|
12
|
+
import { S as H1, D as G1 } from "./down-B0DJRPMS.js";
|
13
13
|
import { R as K1 } from "./index-CDq3vNnP.js";
|
14
|
-
import { C as
|
14
|
+
import { C as Ve, P as be, u as J1, g as n1 } from "./getCosmosAddress-nYlLagxO.js";
|
15
15
|
function b1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ u(
|
17
17
|
"svg",
|
@@ -46,8 +46,8 @@ function b1({ fill: t }) {
|
|
46
46
|
}
|
47
47
|
);
|
48
48
|
}
|
49
|
-
function q1({ data: t, handleBack: n, handleSetChainData:
|
50
|
-
const [r, c] = N(t), [b,
|
49
|
+
function q1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
50
|
+
const [r, c] = N(t), [b, d] = N(""), { tick: i, defaultCoin: m } = Ee;
|
51
51
|
return /* @__PURE__ */ u("div", { children: [
|
52
52
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
53
53
|
/* @__PURE__ */ e(
|
@@ -78,7 +78,7 @@ function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
78
78
|
type: "text",
|
79
79
|
value: b,
|
80
80
|
onChange: (f) => {
|
81
|
-
|
81
|
+
d(f.target.value);
|
82
82
|
},
|
83
83
|
className: `bw-text-sm bw-px-2 bw-w-full bw-h-[34px] ${b.length ? "bw-border-0 bw-border-transparent" : "bw-border bw-border-border-primary"} bw-rounded-[5px] bw-font-normal bw-bg-background-container placeholder:bw-text-text-placeholder bw-text-text-primary`,
|
84
84
|
placeholder: "Search Network"
|
@@ -94,8 +94,8 @@ function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
94
94
|
"div",
|
95
95
|
{
|
96
96
|
onClick: () => {
|
97
|
-
let
|
98
|
-
n(f),
|
97
|
+
let L = { chain: f.name, ...f };
|
98
|
+
n(f), s(L);
|
99
99
|
},
|
100
100
|
className: `first-letter:bw-py-2 bw-cursor-pointer bw-border-b bw-flex bw-items-center bw-justify-between bw-gap-x-3 bw-border-border-primary bw-text-sm bw-font-normal bw-text-text-primary
|
101
101
|
|
@@ -103,10 +103,10 @@ function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
103
103
|
children: [
|
104
104
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-gap-x-3", children: [
|
105
105
|
" ",
|
106
|
-
/* @__PURE__ */ e("img", { src: (T = f.image) != null && T.length ? f.image :
|
106
|
+
/* @__PURE__ */ e("img", { src: (T = f.image) != null && T.length ? f.image : m, className: "bw-rounded-[50%] bw-border bw-border-border-primary", width: 25, height: 25, alt: "img" }),
|
107
107
|
" ",
|
108
108
|
/* @__PURE__ */ e("p", { children: f.name }),
|
109
|
-
|
109
|
+
o.chain === f.name ? /* @__PURE__ */ e("img", { src: i, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(K, {})
|
110
110
|
] }),
|
111
111
|
/* @__PURE__ */ u("div", { className: "bw-pr-2", children: [
|
112
112
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal", children: "Tokens" }),
|
@@ -123,40 +123,40 @@ const X1 = "_gradientbackground_7x8s8_1", Q1 = "_overlay_7x8s8_5", r1 = {
|
|
123
123
|
gradientbackground: X1,
|
124
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,
|
132
|
-
chainId:
|
130
|
+
function Y1(t) {
|
131
|
+
const [n, s] = N({}), o = l((i) => i.cosmosChainIds), { data: r } = Oe({
|
132
|
+
chainId: o,
|
133
133
|
multiChain: !0
|
134
|
-
}), c = l((
|
134
|
+
}), c = l((i) => i.fromChain), { data: b } = c1({
|
135
135
|
chainId: [(t == null ? void 0 : t.chainId) || c.chainId],
|
136
136
|
multiChain: !0
|
137
137
|
});
|
138
|
-
async function
|
139
|
-
var
|
140
|
-
if ((
|
141
|
-
let T = await (b[
|
142
|
-
(f = r == null ? void 0 : r[
|
143
|
-
),
|
144
|
-
|
138
|
+
async function d(i) {
|
139
|
+
var m, f;
|
140
|
+
if ((m = r == null ? void 0 : r[i]) != null && m.bech32Address && b) {
|
141
|
+
let T = await (b[i] || b).getAllBalances(
|
142
|
+
(f = r == null ? void 0 : r[i]) == null ? void 0 : f.bech32Address
|
143
|
+
), L = pe.keyBy(T, "denom");
|
144
|
+
s(L);
|
145
145
|
}
|
146
146
|
}
|
147
147
|
return B(() => {
|
148
|
-
((t == null ? void 0 : t.networkType) == "cosmos" || (c == null ? void 0 : c.networkType) == "cosmos") &&
|
148
|
+
((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));
|
149
149
|
}, [b, c, t]), { cosmosBalance: n };
|
150
150
|
}
|
151
151
|
function d1(t) {
|
152
152
|
let n = t.split("/");
|
153
153
|
if (n.length > 1) {
|
154
|
-
let
|
155
|
-
return n[1] =
|
154
|
+
let s = n[1].toUpperCase();
|
155
|
+
return n[1] = s, n.join("/");
|
156
156
|
} else
|
157
157
|
return t;
|
158
158
|
}
|
159
|
-
function
|
159
|
+
function W1({ fill: t }) {
|
160
160
|
return /* @__PURE__ */ u(
|
161
161
|
"svg",
|
162
162
|
{
|
@@ -202,7 +202,7 @@ function D1({ selectedChain: t }) {
|
|
202
202
|
alt: "chain"
|
203
203
|
}
|
204
204
|
) : /* @__PURE__ */ e(K, {}),
|
205
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-bg-background-container -bw-bottom-2 -bw-right-2 bw-flex bw-items-center bw-justify-center bw-rounded-full bw-border bw-border-border-primary bw-w-[44px] bw-h-[44px]", children: /* @__PURE__ */ e(
|
205
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-bg-background-container -bw-bottom-2 -bw-right-2 bw-flex bw-items-center bw-justify-center bw-rounded-full bw-border bw-border-border-primary bw-w-[44px] bw-h-[44px]", children: /* @__PURE__ */ e(W1, { fill: "var(--tw-text-secondary)" }) })
|
206
206
|
] }) }),
|
207
207
|
/* @__PURE__ */ u("h2", { className: "bw-text-base bw-text-center bw-mt-3 bw-font-bold bw-text-text-primary", children: [
|
208
208
|
"No Tokens found on ",
|
@@ -216,101 +216,101 @@ function D1({ selectedChain: t }) {
|
|
216
216
|
] })
|
217
217
|
] });
|
218
218
|
}
|
219
|
-
const et = de.memo(function({ selectChainState: n, value:
|
219
|
+
const et = de.memo(function({ selectChainState: n, value: s, handleClosePopup: o, showExchangeList: r, setCoinData: c, setChainData: b }) {
|
220
220
|
var Be, Ae;
|
221
|
-
l((
|
222
|
-
const
|
221
|
+
l((w) => w.searchCustomCoin);
|
222
|
+
const d = l((w) => w.setSearchCustomCoin), { ref: i, inView: m } = S1(), { getWallet: f } = ke({}), { connected: I, address: T } = a1(), { isConnected: L, address: h } = ge(), { primaryWallet: y } = Ne();
|
223
223
|
R1();
|
224
|
-
const C = f(n), A = l((
|
224
|
+
const C = f(n), A = l((w) => w.fromChain), v = l((w) => w.fromCoin), Z = l((w) => w.toChain), H = l((w) => w.toCoin), [ne, F] = N(!1), { cosmosBalance: $ } = Y1(n), { defaultCoin: _ } = Ee, [J, p] = N(0), k = B1(null), { data: g } = Oe({
|
225
225
|
chainId: [n.chainId],
|
226
226
|
multiChain: !0
|
227
|
-
}),
|
228
|
-
l((
|
229
|
-
const x = l((
|
227
|
+
}), P = (n == null ? void 0 : n.networkType) === "evm" && h || (n == null ? void 0 : n.networkType) === "sol" && (y == null ? void 0 : y.address) || (n == null ? void 0 : n.networkType) === "tron" && T || (n == null ? void 0 : n.networkType) === "cosmos" && ((Be = g == null ? void 0 : g[n == null ? void 0 : n.chainId]) == null ? void 0 : Be.bech32Address), M = l((w) => w.toDisconnect);
|
228
|
+
l((w) => w.setToDisconnect);
|
229
|
+
const x = l((w) => w.customWallet), E = l((w) => w.setCustomWallet), O = l((w) => w.tokens), [R, j] = N([]), [S, ie] = N([]), [Te, W] = N([]), G = O, Q = l1({
|
230
230
|
queryKey: ["balance", C == null ? void 0 : C.address, n],
|
231
|
-
queryFn: async () => await (await
|
231
|
+
queryFn: async () => await (await Se.fetchBalance(C.address, n.chainId)).json(),
|
232
232
|
enabled: !!((Ae = C == null ? void 0 : C.address) != null && Ae.length && n.chainId),
|
233
233
|
refetchOnWindowFocus: !1
|
234
234
|
});
|
235
|
-
function
|
236
|
-
var re, le,
|
237
|
-
let D = d1(
|
238
|
-
return
|
235
|
+
function V(w) {
|
236
|
+
var re, le, se, oe, q, U, Y, ee, z, X, ce, te;
|
237
|
+
let D = d1(w.address);
|
238
|
+
return w.networkType == "cosmos" ? $e(((re = $ == null ? void 0 : $[D]) == null ? void 0 : re.amount) / Math.pow(10, w.decimals) || 0) || "" : $e((((U = (q = (oe = (se = (le = Q.data) == null ? void 0 : le.data) == null ? void 0 : se[n == null ? void 0 : n.networkType]) == null ? void 0 : oe[n.chainId]) == null ? void 0 : q[w.address]) == null ? void 0 : U.balance) || 0) / Math.pow(10, ((te = (ce = (X = (z = (ee = (Y = Q.data) == null ? void 0 : Y.data) == null ? void 0 : ee[n == null ? void 0 : n.networkType]) == null ? void 0 : z[n.chainId]) == null ? void 0 : X[w.address]) == null ? void 0 : ce.asset) == null ? void 0 : te.decimals) || 0) || 0) || "";
|
239
239
|
}
|
240
240
|
B(() => {
|
241
|
-
|
241
|
+
s.length > 40 && U1(s) && !S.length ? (F(!0), d({
|
242
242
|
chainId: n.chainId,
|
243
|
-
address:
|
244
|
-
})) :
|
245
|
-
}, [
|
246
|
-
|
247
|
-
}, [
|
243
|
+
address: s
|
244
|
+
})) : s.length || (F(!1), d({ chainId: "", address: "" }));
|
245
|
+
}, [s, S]), B(() => {
|
246
|
+
p(0);
|
247
|
+
}, [s]);
|
248
248
|
function Ie() {
|
249
|
-
|
249
|
+
p(0), ie([]), k.current.scrollTo(0, 0);
|
250
250
|
}
|
251
251
|
B(() => {
|
252
|
-
var
|
253
|
-
G != null && G.isSuccess && (n != null && n.chainId) && j(((D = (
|
252
|
+
var w, D;
|
253
|
+
G != null && G.isSuccess && (n != null && n.chainId) && j(((D = (w = G == null ? void 0 : G.data) == null ? void 0 : w.data) == null ? void 0 : D[n == null ? void 0 : n.chainId]) || []);
|
254
254
|
}, [G, n.chainId]), B(() => {
|
255
255
|
Ie();
|
256
256
|
}, [n.chainId]);
|
257
257
|
function ye() {
|
258
|
-
var
|
259
|
-
let
|
260
|
-
var
|
261
|
-
return ((
|
262
|
-
})) == null ? void 0 :
|
263
|
-
if (
|
264
|
-
}), D = 20, re = J * D, le = re + D,
|
265
|
-
J == 0 ? ie([...
|
258
|
+
var oe;
|
259
|
+
let w = (oe = R == null ? void 0 : R.filter((q) => {
|
260
|
+
var U, Y, ee, z;
|
261
|
+
return ((U = q.name) == null ? void 0 : U.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((Y = q.symbol) == null ? void 0 : Y.toLowerCase().includes(s == null ? void 0 : s.toLowerCase())) || ((z = (ee = q.address) == null ? void 0 : ee.toLowerCase()) == null ? void 0 : z.includes(s == null ? void 0 : s.toLowerCase()));
|
262
|
+
})) == null ? void 0 : oe.sort((q, U) => {
|
263
|
+
if (P) return V(U) * U.lastPrice - V(q) * q.lastPrice;
|
264
|
+
}), D = 20, re = J * D, le = re + D, se = w.slice(re, le);
|
265
|
+
J == 0 ? ie([...se]) : ie([...S, ...se]);
|
266
266
|
}
|
267
267
|
return B(() => {
|
268
|
-
|
269
|
-
}, [
|
270
|
-
|
271
|
-
}, [
|
272
|
-
var le,
|
268
|
+
R != null && R.length && ye();
|
269
|
+
}, [R, s, J, P, $, Q.data]), B(() => {
|
270
|
+
m && p((w) => w + 1);
|
271
|
+
}, [m]), /* @__PURE__ */ e("div", { ref: k, className: " bw-h-[200px] bw-pr-2 md:bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: S && (S == null ? void 0 : S.length) > 0 ? S == null ? void 0 : S.map((w, D, re) => {
|
272
|
+
var le, se, oe, q, U, Y;
|
273
273
|
return /* @__PURE__ */ u(
|
274
274
|
"div",
|
275
275
|
{
|
276
|
-
ref: re.length >= 20 && re.length - 1 === D ?
|
276
|
+
ref: re.length >= 20 && re.length - 1 === D ? i : null,
|
277
277
|
className: `bw-py-2
|
278
|
-
${r == "from" && H._id !==
|
278
|
+
${r == "from" && H._id !== w._id || r == "to" && v._id !== w._id, ""}
|
279
279
|
bw-flex bw-items-center bw-justify-between bw-cursor-pointer bw-border-b bw-border-border-primary
|
280
280
|
|
281
281
|
}`,
|
282
282
|
onClick: async () => {
|
283
|
-
var
|
283
|
+
var z, X, ce, te, Ce, ae, we, je, ve, Pe, Le;
|
284
284
|
let ee = {
|
285
285
|
// ...coinData,
|
286
|
-
coin:
|
287
|
-
...
|
288
|
-
availBal: ((Ce = (te = (ce = (X = (
|
286
|
+
coin: w.symbol,
|
287
|
+
...w,
|
288
|
+
availBal: ((Ce = (te = (ce = (X = (z = Q.data) == null ? void 0 : z.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : ce[n.chainId]) == null ? void 0 : te[w.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((Le = (Pe = (ve = (je = (we = (ae = Q.data) == null ? void 0 : ae.data) == null ? void 0 : we[n == null ? void 0 : n.networkType]) == null ? void 0 : je[n == null ? void 0 : n.chainId]) == null ? void 0 : ve[w.address.toLowerCase()]) == null ? void 0 : Pe.asset) == null ? void 0 : Le.decimals) || 0)
|
289
289
|
};
|
290
|
-
c(ee), b(n),
|
290
|
+
c(ee), b(n), o(n, ee), (n == null ? void 0 : n.networkType) === (Z == null ? void 0 : Z.networkType) || (n == null || n.networkType, A == null || A.networkType, E(""));
|
291
291
|
},
|
292
292
|
children: [
|
293
293
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-justify-center bw-w-max bw-gap-x-2", children: [
|
294
|
-
/* @__PURE__ */ u("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(le =
|
295
|
-
(
|
296
|
-
(
|
294
|
+
/* @__PURE__ */ u("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(le = w.image) != null && le.length ? "bw-bg-background-secondary" : ""}`, children: [
|
295
|
+
(se = w.image) != null && se.length ? /* @__PURE__ */ e("img", { src: w.image, className: "bw-rounded-[50%] bw-max-w-[30px] bw-max-h-[30px] bw-object-contain", width: 30, height: 30, alt: "img" }) : /* @__PURE__ */ e("img", { src: _, className: "bw-rounded-[50%]", width: 30, height: 30, alt: "img" }),
|
296
|
+
(oe = n == null ? void 0 : n.image) != null && oe.length ? /* @__PURE__ */ e("img", { src: n.image, className: `bw-absolute ${(q = n == null ? void 0 : n.image) != null && q.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: _, 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" })
|
297
297
|
] }),
|
298
298
|
/* @__PURE__ */ u("div", { children: [
|
299
299
|
/* @__PURE__ */ u("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
300
300
|
/* @__PURE__ */ u("span", { className: "bw-font-bold bw-text-text-primary", children: [
|
301
|
-
|
301
|
+
w.symbol || "",
|
302
302
|
" "
|
303
303
|
] }),
|
304
|
-
|
304
|
+
w.name
|
305
305
|
] }),
|
306
306
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-gap-x-2", children: [
|
307
307
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: n.name }),
|
308
308
|
/* @__PURE__ */ u("div", { className: "bw-bg-background-networkcard bw-flex bw-items-center bw-gap-x-2 bw-px-2", children: [
|
309
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children:
|
309
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-secondary", children: w != null && w.address ? w.address.substring(0, 6) + "..." + w.address.substring(w.address.length - 6, w.address.length) : "" }),
|
310
310
|
/* @__PURE__ */ e(
|
311
311
|
"a",
|
312
312
|
{
|
313
|
-
href: (
|
313
|
+
href: (Y = (U = n.explorer) == null ? void 0 : U.token) == null ? void 0 : Y.replace("{tokenAddress}", w.address),
|
314
314
|
target: "_blank",
|
315
315
|
onClick: (ee) => {
|
316
316
|
ee.stopPropagation();
|
@@ -323,22 +323,22 @@ const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
323
323
|
] })
|
324
324
|
] })
|
325
325
|
] }),
|
326
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && x && ((x == null ? void 0 : x.length) > 30 ||
|
326
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && x && ((x == null ? void 0 : x.length) > 30 || M) ? /* @__PURE__ */ e(K, {}) : Q.isFetching ? /* @__PURE__ */ e(_e, { size: 12, thickness: 4, color: "inherit" }) : P ? V(w) > 0 ? /* @__PURE__ */ u(K, { children: [
|
327
327
|
/* @__PURE__ */ e(
|
328
328
|
De,
|
329
329
|
{
|
330
|
-
value:
|
330
|
+
value: V(w) || "",
|
331
331
|
options: {
|
332
332
|
maxDecimals: 10
|
333
333
|
}
|
334
334
|
}
|
335
335
|
),
|
336
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children:
|
336
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: V(w) * w.lastPrice > 0 ? /* @__PURE__ */ u(K, { children: [
|
337
337
|
"$",
|
338
338
|
/* @__PURE__ */ e(
|
339
339
|
De,
|
340
340
|
{
|
341
|
-
value: $e(
|
341
|
+
value: $e(V(w) * w.lastPrice),
|
342
342
|
options: {
|
343
343
|
maxDecimals: 10
|
344
344
|
}
|
@@ -350,45 +350,45 @@ const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
350
350
|
},
|
351
351
|
D
|
352
352
|
);
|
353
|
-
}) : ne && !(
|
353
|
+
}) : ne && !(O.isLoading && O.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(_e, { color: "inherit", size: 30 }) }) });
|
354
354
|
});
|
355
|
-
function tt({ setChainData: t, setCoinData: n, handleReset:
|
356
|
-
var
|
357
|
-
const [
|
355
|
+
function tt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coinData: r, showExchangeList: c, fetchChains: b }) {
|
356
|
+
var p, k, g, P, M;
|
357
|
+
const [d, i] = N(!1), [m, f] = N(""), I = l((x) => x.tokens), [T, L] = N([]), [h, y] = N(0), [C, A] = N({ chain: "" }), v = l((x) => x.gradient), Z = l((x) => x.configuration), H = l((x) => x.chainObj);
|
358
358
|
B(() => {
|
359
|
-
var x, O,
|
360
|
-
if ((
|
361
|
-
let j = [...(
|
362
|
-
j.splice(
|
359
|
+
var x, E, O, R;
|
360
|
+
if ((E = (x = b.data) == null ? void 0 : x.data) != null && E.length) {
|
361
|
+
let j = [...(R = (O = b.data) == null ? void 0 : O.data) == null ? void 0 : R.slice(0, 9)], S = j.findIndex((V) => V.chainId === "137"), ie = j.findIndex((V) => V.chainId === "324"), Te = j.findIndex((V) => V.chainId === "10"), W = j.findIndex((V) => V.chainId === "43114");
|
362
|
+
j.splice(S, 1, H[80094] || {}), j.splice(ie, 1, H[2741] || {}), j.splice(Te, 1, H["eclipse-svm"] || {}), j.splice(W, 1, H[999] || {}), !!pe.keyBy(j, "chainId")[C.chainId] || (j.pop(), j.push(C)), L(j);
|
363
363
|
}
|
364
|
-
}, [H, (
|
365
|
-
A(
|
366
|
-
}, [
|
367
|
-
var x,
|
368
|
-
if ((
|
369
|
-
let
|
370
|
-
y(
|
364
|
+
}, [H, (p = b.data) == null ? void 0 : p.data, o, C]), B(() => {
|
365
|
+
A(o);
|
366
|
+
}, [o]), B(() => {
|
367
|
+
var x, E, O;
|
368
|
+
if ((E = (x = b.data) == null ? void 0 : x.data) != null && E.length) {
|
369
|
+
let R = (O = b.data) == null ? void 0 : O.data.filter((j) => !0);
|
370
|
+
y(R.length);
|
371
371
|
}
|
372
|
-
}, [(
|
373
|
-
function ne(x,
|
374
|
-
var
|
375
|
-
(
|
372
|
+
}, [(k = b.data) == null ? void 0 : k.data]);
|
373
|
+
function ne(x, E) {
|
374
|
+
var O, R;
|
375
|
+
(O = x.chain) != null && O.length && ((R = E == null ? void 0 : E.coin) != null && R.length) && s();
|
376
376
|
}
|
377
|
-
function
|
378
|
-
|
377
|
+
function F() {
|
378
|
+
i(!1);
|
379
379
|
}
|
380
|
-
function
|
380
|
+
function $(x) {
|
381
381
|
A(x), f("");
|
382
382
|
}
|
383
383
|
const { tick: _, defaultCoin: J } = Ee;
|
384
|
-
return
|
384
|
+
return d ? /* @__PURE__ */ e(q1, { handleSetChainData: $, data: (g = b.data) == null ? void 0 : g.data, handleBack: F, network: C }) : /* @__PURE__ */ u(K, { children: [
|
385
385
|
/* @__PURE__ */ u("div", { children: [
|
386
386
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
387
387
|
/* @__PURE__ */ e(
|
388
388
|
"button",
|
389
389
|
{
|
390
390
|
onClick: () => {
|
391
|
-
|
391
|
+
s(), (!r.coin.length || !o.chain.length) && (n({ coin: "" }), t({ chain: "" }));
|
392
392
|
},
|
393
393
|
className: "bw-absolute bw-left-0 bw-top-[25%]",
|
394
394
|
children: /* @__PURE__ */ e(e1, { fill: "var(--tw-text-secondary)" })
|
@@ -400,8 +400,8 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
400
400
|
] })
|
401
401
|
] }),
|
402
402
|
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__ */ u("div", { className: "bw-grid bw-grid-cols-5 bw-gap-1 bw-overflow-y-auto bw-w-full", children: [
|
403
|
-
b.isSuccess && T.map((x,
|
404
|
-
var
|
403
|
+
b.isSuccess && T.map((x, E) => {
|
404
|
+
var O, R;
|
405
405
|
return /* @__PURE__ */ e(
|
406
406
|
"div",
|
407
407
|
{
|
@@ -418,33 +418,33 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
418
418
|
...x
|
419
419
|
// networkType: "cosmos",
|
420
420
|
};
|
421
|
-
|
421
|
+
$(j);
|
422
422
|
},
|
423
423
|
className: "bw-p-2 bw-w-full bw-aspect-video bw-relative bw-z-10 bw-bg-background-networkcard bw-rounded-md bw-flex bw-flex-col bw-justify-center bw-items-center",
|
424
424
|
style: { cursor: "pointer" },
|
425
425
|
children: [
|
426
|
-
/* @__PURE__ */ e("img", { src: (
|
426
|
+
/* @__PURE__ */ e("img", { src: (O = x.image) != null && O.length ? x.image : J, width: 25, className: "bw-rounded-[50%] bw-border bw-border-border-primary", height: 25, alt: "img" }),
|
427
427
|
" ",
|
428
|
-
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${C.name == x.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((
|
428
|
+
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${C.name == x.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((R = x.name) == null ? void 0 : R.length) > 7 ? x.name.substring(0, 7) + ".." : x.name }),
|
429
429
|
(C == null ? void 0 : C.chain) == x ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: _ }) : /* @__PURE__ */ e(K, {})
|
430
430
|
]
|
431
431
|
},
|
432
|
-
|
432
|
+
E
|
433
433
|
)
|
434
434
|
},
|
435
|
-
|
435
|
+
E
|
436
436
|
);
|
437
437
|
}),
|
438
438
|
b.isSuccess && T.length ? /* @__PURE__ */ e("div", { className: "bw-p-[2px] bw-w-full", children: /* @__PURE__ */ u(
|
439
439
|
"div",
|
440
440
|
{
|
441
441
|
onClick: () => {
|
442
|
-
|
442
|
+
i(!0);
|
443
443
|
},
|
444
444
|
className: "bw-p-2 bw-w-full bw-aspect-video bw-bg-background-networkcard bw-rounded-md bw-flex bw-flex-col bw-justify-center bw-items-center",
|
445
445
|
style: { cursor: "pointer" },
|
446
446
|
children: [
|
447
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-medium bw-text-text-primary", children: (
|
447
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-medium bw-text-text-primary", children: (M = (P = b.data) == null ? void 0 : P.data) != null && M.length ? `+${h - 9}` : "0" }),
|
448
448
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-primary", children: "Networks" })
|
449
449
|
]
|
450
450
|
}
|
@@ -456,7 +456,7 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
456
456
|
"div",
|
457
457
|
{
|
458
458
|
className: "bw-relative bw-mt-4",
|
459
|
-
style:
|
459
|
+
style: m.length ? {
|
460
460
|
background: "linear-gradient(to right,#A45EFF ,#2CFFE4)",
|
461
461
|
padding: "1px",
|
462
462
|
borderRadius: "5px"
|
@@ -466,15 +466,15 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
466
466
|
"input",
|
467
467
|
{
|
468
468
|
type: "text",
|
469
|
-
value:
|
469
|
+
value: m,
|
470
470
|
onChange: (x) => {
|
471
471
|
f(x.target.value);
|
472
472
|
},
|
473
|
-
className: `bw-text-sm bw-px-2 bw-w-full bw-h-[34px] ${
|
473
|
+
className: `bw-text-sm bw-px-2 bw-w-full bw-h-[34px] ${m.length ? "bw-border-0 bw-border-border-transparent" : "bw-border bw-border-border-primary"} bw-rounded-[5px] bw-font-normal bw-bg-background-container placeholder:bw-text-text-placeholder bw-text-text-primary`,
|
474
474
|
placeholder: "Search Token Name or Contract Address"
|
475
475
|
}
|
476
476
|
),
|
477
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (I.isLoading || I.isFetching) &&
|
477
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (I.isLoading || I.isFetching) && m.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, {}) }) : m.length ? /* @__PURE__ */ e(
|
478
478
|
"button",
|
479
479
|
{
|
480
480
|
onClick: () => {
|
@@ -487,20 +487,20 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
487
487
|
]
|
488
488
|
}
|
489
489
|
),
|
490
|
-
/* @__PURE__ */ e(et, { value:
|
490
|
+
/* @__PURE__ */ e(et, { value: m, handleClosePopup: ne, showExchangeList: c, setChainData: t, setCoinData: n, selectChainState: C })
|
491
491
|
] })
|
492
492
|
] });
|
493
493
|
}
|
494
494
|
function nt({
|
495
495
|
walletDetails: t,
|
496
496
|
handleToDisconnect: n,
|
497
|
-
show:
|
498
|
-
networkType:
|
497
|
+
show: s,
|
498
|
+
networkType: o,
|
499
499
|
handleShowWallet: r,
|
500
500
|
setConnectWalletField: c
|
501
501
|
}) {
|
502
|
-
const [b,
|
503
|
-
c(
|
502
|
+
const [b, d] = N(null), { address: i, chain: m, data: f, disconnect: I, ...T } = t, [L, h] = N(), { connector: y } = ge(), { connectors: C } = M1(), A = () => {
|
503
|
+
c(s), s == "to" ? (v(), n(!0)) : v();
|
504
504
|
};
|
505
505
|
E1(), B(() => {
|
506
506
|
C.length && h(
|
@@ -508,7 +508,7 @@ function nt({
|
|
508
508
|
);
|
509
509
|
}, [C]);
|
510
510
|
async function v() {
|
511
|
-
|
511
|
+
o === "evm" && (m == null ? void 0 : m.network) !== "custom" && (L != null && L[y == null ? void 0 : y.uid]), r();
|
512
512
|
}
|
513
513
|
return /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
|
514
514
|
"button",
|
@@ -518,8 +518,8 @@ function nt({
|
|
518
518
|
id: "basic-button",
|
519
519
|
style: { fontSize: "12px" },
|
520
520
|
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",
|
521
|
-
children:
|
522
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((
|
521
|
+
children: i ? /* @__PURE__ */ u(K, { children: [
|
522
|
+
/* @__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)) || "") }),
|
523
523
|
/* @__PURE__ */ e(
|
524
524
|
"div",
|
525
525
|
{
|
@@ -530,17 +530,17 @@ function nt({
|
|
530
530
|
}
|
531
531
|
) });
|
532
532
|
}
|
533
|
-
function
|
534
|
-
var A, v, Z, H, ne,
|
535
|
-
const b = l((
|
533
|
+
function s1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show: c }) {
|
534
|
+
var A, v, Z, H, ne, F, $, _, J;
|
535
|
+
const b = l((p) => p.configuration), d = l((p) => p.customWallet), { isConnected: i, isConnecting: m, isReconnecting: f } = ge();
|
536
536
|
Ne();
|
537
|
-
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet:
|
537
|
+
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet: L } = ke({
|
538
538
|
chainData: t,
|
539
539
|
show: c
|
540
540
|
});
|
541
|
-
l((
|
542
|
-
const h = l((
|
543
|
-
function C(
|
541
|
+
l((p) => p.toDisconnect), l((p) => p.setToDisconnect);
|
542
|
+
const h = l((p) => p.fromChain), y = l((p) => p.toChain);
|
543
|
+
function C(p) {
|
544
544
|
}
|
545
545
|
return /* @__PURE__ */ u("div", { className: "bw-w-[50%] ", children: [
|
546
546
|
/* @__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" }),
|
@@ -575,33 +575,33 @@ function o1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConn
|
|
575
575
|
]
|
576
576
|
}
|
577
577
|
),
|
578
|
-
/* @__PURE__ */ e(rt, { isConnected: c == "to" ? (h == null ? void 0 : h.networkType) === (y == null ? void 0 : y.networkType) ? !!((
|
578
|
+
/* @__PURE__ */ e(rt, { isConnected: c == "to" ? (h == null ? void 0 : h.networkType) === (y == null ? void 0 : y.networkType) ? !!(($ = (F = L(h)) == null ? void 0 : F.address) != null && $.length || (d == null ? void 0 : d.length) > 30) : !!((J = (_ = L(y)) == null ? void 0 : _.address) != null && J.length || (d == null ? void 0 : d.length) > 30) : T, setConnectWalletField: o, handleShowWallet: s, show: c, chainData: t, handleToDisconnect: C })
|
579
579
|
] });
|
580
580
|
}
|
581
|
-
function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet:
|
581
|
+
function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, show: o, chainData: r, handleToDisconnect: c }) {
|
582
582
|
var f;
|
583
|
-
const b = l((I) => I.customWallet),
|
583
|
+
const b = l((I) => I.customWallet), d = l((I) => I.fromChain), i = l((I) => I.toChain), { getWallet: m } = ke({
|
584
584
|
chainData: r,
|
585
|
-
show:
|
585
|
+
show: o
|
586
586
|
});
|
587
587
|
return /* @__PURE__ */ e("div", { className: "bw-mt-2 bw-flex bw-justify-end", children: t ? /* @__PURE__ */ e(
|
588
588
|
nt,
|
589
589
|
{
|
590
|
-
walletDetails: (b == null ? void 0 : b.length) > 30 &&
|
590
|
+
walletDetails: (b == null ? void 0 : b.length) > 30 && o == "to" ? m({}) : (d == null ? void 0 : d.networkType) == (i == null ? void 0 : i.networkType) && o == "to" ? {
|
591
591
|
disconnect: c,
|
592
|
-
address: (f =
|
593
|
-
} :
|
592
|
+
address: (f = m(d)) == null ? void 0 : f.address
|
593
|
+
} : m(r),
|
594
594
|
handleToDisconnect: c,
|
595
|
-
show:
|
595
|
+
show: o,
|
596
596
|
networkType: r == null ? void 0 : r.networkType,
|
597
597
|
setConnectWalletField: n,
|
598
|
-
handleShowWallet:
|
598
|
+
handleShowWallet: s
|
599
599
|
}
|
600
600
|
) : /* @__PURE__ */ u(
|
601
601
|
"button",
|
602
602
|
{
|
603
603
|
onClick: () => {
|
604
|
-
n(
|
604
|
+
n(o), s();
|
605
605
|
},
|
606
606
|
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",
|
607
607
|
children: [
|
@@ -611,17 +611,17 @@ function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet: o, sho
|
|
611
611
|
}
|
612
612
|
) });
|
613
613
|
}
|
614
|
-
const
|
615
|
-
gradient:
|
614
|
+
const st = "_gradient_15zwe_1", ze = {
|
615
|
+
gradient: st
|
616
616
|
};
|
617
|
-
function
|
618
|
-
var
|
619
|
-
const
|
617
|
+
function ot({ mode: t, handleMode: n }) {
|
618
|
+
var o, r;
|
619
|
+
const s = l((c) => c.configuration);
|
620
620
|
return /* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center", children: /* @__PURE__ */ u(
|
621
621
|
"div",
|
622
622
|
{
|
623
623
|
style: {
|
624
|
-
boxShadow:
|
624
|
+
boxShadow: s && s.customTheme && ((r = (o = s.customTheme) == null ? void 0 : o.shadow) == null ? void 0 : r.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
625
625
|
},
|
626
626
|
className: "bw-flex bw-relative bw-h-[40px] bw-w-full md:bw-w-[90%] bw-items-center",
|
627
627
|
children: [
|
@@ -647,9 +647,9 @@ function st({ mode: t, handleMode: n }) {
|
|
647
647
|
style: {
|
648
648
|
transition: "left 0.5s",
|
649
649
|
width: "calc(100% / 3)",
|
650
|
-
...
|
650
|
+
...s == null ? void 0 : s.gradientStyle
|
651
651
|
},
|
652
|
-
className: `${!(
|
652
|
+
className: `${!(s != null && s.gradientStyle) && ze.gradient} ${t === "Both" ? "bw-left-[66.5%]" : t === "Priority Fee" ? "bw-left-0" : t === "Jito Tip" ? "bw-left-[33%]" : "bw-hidden"} bw-z-10 bw-cursor-pointer bw-absolute bw-h-[40px] bw-p-[2px] bw-rounded-md `,
|
653
653
|
children: /* @__PURE__ */ e("div", { className: "bw-w-full bw-h-full bw-text-text-primary bw-text-sm bw-font-extrabold bw-flex bw-justify-center bw-items-center bw-rounded-md bw-bg-background-container", children: t })
|
654
654
|
}
|
655
655
|
),
|
@@ -706,21 +706,21 @@ function it({ fill: t }) {
|
|
706
706
|
}
|
707
707
|
function w1({ options: t, handleOptions: n }) {
|
708
708
|
var r, c;
|
709
|
-
const
|
709
|
+
const s = [
|
710
710
|
{ name: "Medium", value: "medium" },
|
711
711
|
{ name: "High", value: "high" },
|
712
712
|
{ name: "Degen", value: "ultra" }
|
713
|
-
],
|
713
|
+
], o = l((b) => b.configuration);
|
714
714
|
return /* @__PURE__ */ u("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between", children: [
|
715
715
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: "Speed" }),
|
716
716
|
/* @__PURE__ */ e(
|
717
717
|
"div",
|
718
718
|
{
|
719
719
|
style: {
|
720
|
-
boxShadow:
|
720
|
+
boxShadow: o && o.customTheme && ((c = (r = o.customTheme) == null ? void 0 : r.shadow) == null ? void 0 : c.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
721
721
|
},
|
722
722
|
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",
|
723
|
-
children:
|
723
|
+
children: s.map((b, d, i) => /* @__PURE__ */ u(
|
724
724
|
"button",
|
725
725
|
{
|
726
726
|
onClick: () => {
|
@@ -743,17 +743,17 @@ function w1({ options: t, handleOptions: n }) {
|
|
743
743
|
children: b.name
|
744
744
|
}
|
745
745
|
),
|
746
|
-
|
746
|
+
i.length - 1 !== d && /* @__PURE__ */ e("div", { className: "bw-h-[70%] bw-absolute bw-right-0 bw-w-[1px] bw-border bw-border-border-primary" }),
|
747
747
|
/* @__PURE__ */ e(
|
748
748
|
"div",
|
749
749
|
{
|
750
750
|
style: {
|
751
751
|
transition: "opacity 0.5s ease-in-out",
|
752
|
-
...
|
752
|
+
...o == null ? void 0 : o.gradientStyle
|
753
753
|
},
|
754
754
|
className: `bw-w-full
|
755
755
|
|
756
|
-
${b.value === t.value ? "bw-opacity-100" : "bw-opacity-0"} bw-absolute bw-bottom-0 bw-h-[2px] bw-rounded-md ${!(
|
756
|
+
${b.value === t.value ? "bw-opacity-100" : "bw-opacity-0"} bw-absolute bw-bottom-0 bw-h-[2px] bw-rounded-md ${!(o != null && o.gradientStyle) && ze.gradient}`
|
757
757
|
}
|
758
758
|
)
|
759
759
|
]
|
@@ -777,11 +777,11 @@ function u1(t) {
|
|
777
777
|
];
|
778
778
|
/^\d$/.test(t.key) || n.includes(t.key) || t.preventDefault();
|
779
779
|
}
|
780
|
-
function m1({ inputVal: t, handleCustomVal: n, title:
|
780
|
+
function m1({ inputVal: t, handleCustomVal: n, title: s, inputSideText: o }) {
|
781
781
|
var c, b;
|
782
|
-
const r = l((
|
782
|
+
const r = l((d) => d.configuration);
|
783
783
|
return /* @__PURE__ */ u("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: [
|
784
|
-
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal", children:
|
784
|
+
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal", children: s }),
|
785
785
|
/* @__PURE__ */ u(
|
786
786
|
"div",
|
787
787
|
{
|
@@ -797,14 +797,14 @@ function m1({ inputVal: t, handleCustomVal: n, title: o, inputSideText: s }) {
|
|
797
797
|
className: "bw-bg-transparent bw-border-none bw-text-text-primary bw-text-xl bw-font-medium bw-pl-3 bw-pr-2 bw-w-[80%] bw-h-full bw-text-right",
|
798
798
|
value: t,
|
799
799
|
onChange: n,
|
800
|
-
onKeyDown: (
|
801
|
-
u1(
|
800
|
+
onKeyDown: (d) => {
|
801
|
+
u1(d);
|
802
802
|
}
|
803
803
|
}
|
804
804
|
),
|
805
805
|
/* @__PURE__ */ u("div", { className: "bw-w-[20%] bw-h-full bw-flex bw-justify-center bw-items-center", children: [
|
806
806
|
" ",
|
807
|
-
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-text-text-secondary bw-font-normal", children:
|
807
|
+
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-text-text-secondary bw-font-normal", children: o })
|
808
808
|
] })
|
809
809
|
]
|
810
810
|
}
|
@@ -812,12 +812,12 @@ function m1({ inputVal: t, handleCustomVal: n, title: o, inputSideText: s }) {
|
|
812
812
|
] });
|
813
813
|
}
|
814
814
|
function p1({ handleSave: t, isSaveButtonDisabled: n }) {
|
815
|
-
const
|
816
|
-
return l((
|
815
|
+
const s = l((o) => o.configuration);
|
816
|
+
return l((o) => o.slippage), /* @__PURE__ */ e(
|
817
817
|
"div",
|
818
818
|
{
|
819
|
-
style: { ...
|
820
|
-
className: `${n ? "bw-bg-border-primary" : !(
|
819
|
+
style: { ...s == null ? void 0 : s.gradientStyle },
|
820
|
+
className: `${n ? "bw-bg-border-primary" : !(s != null && s.gradientStyle) && ze.gradient} bw-rounded-sm bw-p-[2px] bw-mt-10`,
|
821
821
|
children: /* @__PURE__ */ e(
|
822
822
|
"button",
|
823
823
|
{
|
@@ -833,7 +833,7 @@ function g1({ handleClose: t }) {
|
|
833
833
|
return /* @__PURE__ */ u("div", { className: "bw-w-full bw-relative bw-flex bw-items-center bw-justify-center", children: [
|
834
834
|
/* @__PURE__ */ e("h2", { className: "bw-text-2xl bw-font-bold bw-text-text-primary", children: "Config" }),
|
835
835
|
/* @__PURE__ */ e(
|
836
|
-
|
836
|
+
V1,
|
837
837
|
{
|
838
838
|
disableRipple: !0,
|
839
839
|
onClick: t,
|
@@ -844,15 +844,15 @@ function g1({ handleClose: t }) {
|
|
844
844
|
] });
|
845
845
|
}
|
846
846
|
function x1({ slippage: t, handleSlippage: n }) {
|
847
|
-
var
|
848
|
-
const
|
847
|
+
var o, r;
|
848
|
+
const s = l((c) => c.configuration);
|
849
849
|
return /* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
850
850
|
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-font-normal bw-text-text-primary", children: "Max Slippage" }),
|
851
851
|
/* @__PURE__ */ u(
|
852
852
|
"div",
|
853
853
|
{
|
854
854
|
style: {
|
855
|
-
boxShadow:
|
855
|
+
boxShadow: s && s.customTheme && ((r = (o = s.customTheme) == null ? void 0 : o.shadow) == null ? void 0 : r.boxShadow) || "0px 0px 12.5px 0px #0000001A",
|
856
856
|
border: "1px solid var(--tw-border-primary)"
|
857
857
|
},
|
858
858
|
className: " bw-text-lg bw-w-[131px] bw-h-[40px] bw-rounded-md bw-flex bw-items-center ",
|
@@ -891,48 +891,48 @@ function f1() {
|
|
891
891
|
] });
|
892
892
|
}
|
893
893
|
function at({ handleClose: t }) {
|
894
|
-
const [n,
|
895
|
-
function H(
|
896
|
-
b(""),
|
894
|
+
const [n, s] = N(""), [o, r] = N({ name: "Low", value: "low" }), [c, b] = N(""), [d, i] = N(""), [m, f] = N(""), I = l((p) => p.broadCastMode), T = l((p) => p.customFee), L = l((p) => p.setCustomFee), h = l((p) => p.slippage), y = l((p) => p.setSlippage), C = l((p) => p.setBroadCastMode), A = l((p) => p.option), v = l((p) => p.setOption), Z = n == T && A.name == o.name && h == m && (d === I && d !== "" || !n.length && !A.name.length);
|
895
|
+
function H(p) {
|
896
|
+
b(""), s(p.target.value);
|
897
897
|
}
|
898
|
-
function ne(
|
899
|
-
b(""), r(
|
898
|
+
function ne(p, k) {
|
899
|
+
b(""), r(p);
|
900
900
|
}
|
901
901
|
B(() => {
|
902
902
|
r(A);
|
903
903
|
}, [A]), B(() => {
|
904
|
-
T != null && T.length ?
|
904
|
+
T != null && T.length ? s(T) : s("");
|
905
905
|
}, [T]);
|
906
|
-
function
|
907
|
-
v(
|
906
|
+
function F() {
|
907
|
+
v(o);
|
908
908
|
}
|
909
909
|
B(() => {
|
910
910
|
f(h);
|
911
911
|
}, [y]);
|
912
|
-
function
|
913
|
-
f(
|
912
|
+
function $(p) {
|
913
|
+
f(p.target.value);
|
914
914
|
}
|
915
915
|
B(() => {
|
916
|
-
|
916
|
+
i(I);
|
917
917
|
}, [I]);
|
918
918
|
function _() {
|
919
|
-
if (
|
919
|
+
if (d == "" && (n.length || o.name.length)) {
|
920
920
|
C(""), b("Please select a mode");
|
921
921
|
return;
|
922
922
|
}
|
923
|
-
n.length ? (
|
923
|
+
n.length ? (L(n), v(o)) : (L(""), F()), C(d), y(m), t();
|
924
924
|
}
|
925
|
-
function J(
|
926
|
-
b(""),
|
925
|
+
function J(p) {
|
926
|
+
b(""), i(p);
|
927
927
|
}
|
928
928
|
return B(() => {
|
929
|
-
!T && !A.name.length && (C(""),
|
929
|
+
!T && !A.name.length && (C(""), i(""));
|
930
930
|
}, [T, A.name]), /* @__PURE__ */ u("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[447px] bw-rounded-lg bw-border bw-p-3 px-4 md:bw-px-6 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
931
931
|
/* @__PURE__ */ e(g1, { handleClose: t }),
|
932
|
-
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage:
|
932
|
+
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(x1, { slippage: m, handleSlippage: $ }) }),
|
933
933
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(f1, {}) }),
|
934
|
-
/* @__PURE__ */ e(
|
935
|
-
/* @__PURE__ */ e(w1, { options:
|
934
|
+
/* @__PURE__ */ e(ot, { mode: d, handleMode: J }),
|
935
|
+
/* @__PURE__ */ e(w1, { options: o, handleOptions: ne }),
|
936
936
|
/* @__PURE__ */ e(
|
937
937
|
m1,
|
938
938
|
{
|
@@ -955,20 +955,20 @@ function at({ handleClose: t }) {
|
|
955
955
|
] });
|
956
956
|
}
|
957
957
|
function lt({ handleClose: t }) {
|
958
|
-
const [n,
|
958
|
+
const [n, s] = N({ name: "Low", value: "low" }), [o, r] = N(""), [c, b] = N(""), d = l((v) => v.setEvmGas), i = l((v) => v.setEvmSpeed), m = l((v) => v.evmSpeed), f = l((v) => v.evmGas), I = l((v) => v.slippage), T = l((v) => v.setSlippage), L = o == f && m.name == n.name && I == c;
|
959
959
|
function h(v, Z) {
|
960
|
-
|
960
|
+
s(v);
|
961
961
|
}
|
962
962
|
function y(v) {
|
963
963
|
r(v.target.value);
|
964
964
|
}
|
965
965
|
B(() => {
|
966
|
-
|
966
|
+
s(m);
|
967
967
|
}, []), B(() => {
|
968
968
|
f != null && f.length ? r(f) : r("");
|
969
969
|
}, [f]);
|
970
970
|
function C() {
|
971
|
-
|
971
|
+
o.length ? (d(o), i(n)) : (d(""), i(n)), T(c), t();
|
972
972
|
}
|
973
973
|
B(() => {
|
974
974
|
b(I);
|
@@ -986,7 +986,7 @@ function lt({ handleClose: t }) {
|
|
986
986
|
{
|
987
987
|
title: "Gas Price",
|
988
988
|
inputSideText: "GWEI",
|
989
|
-
inputVal:
|
989
|
+
inputVal: o,
|
990
990
|
handleCustomVal: y
|
991
991
|
}
|
992
992
|
),
|
@@ -994,13 +994,13 @@ function lt({ handleClose: t }) {
|
|
994
994
|
p1,
|
995
995
|
{
|
996
996
|
handleSave: C,
|
997
|
-
isSaveButtonDisabled:
|
997
|
+
isSaveButtonDisabled: L
|
998
998
|
}
|
999
999
|
)
|
1000
1000
|
] });
|
1001
1001
|
}
|
1002
1002
|
function ct({ open: t, handleClose: n }) {
|
1003
|
-
const
|
1003
|
+
const s = l((r) => r.fromChain);
|
1004
1004
|
return /* @__PURE__ */ e(
|
1005
1005
|
F1,
|
1006
1006
|
{
|
@@ -1017,7 +1017,7 @@ function ct({ open: t, handleClose: n }) {
|
|
1017
1017
|
// left: "47%",
|
1018
1018
|
// transform: "translate(-50%, -50%)",
|
1019
1019
|
bgcolor: "var(--tw-bg-container)"
|
1020
|
-
}, children:
|
1020
|
+
}, children: s.networkType == "sol" ? /* @__PURE__ */ e(at, { handleClose: n }) : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(lt, { handleClose: n }) }) })
|
1021
1021
|
}
|
1022
1022
|
);
|
1023
1023
|
}
|
@@ -1061,8 +1061,8 @@ function bt({ fill: t }) {
|
|
1061
1061
|
);
|
1062
1062
|
}
|
1063
1063
|
function dt() {
|
1064
|
-
const t = l((
|
1065
|
-
return
|
1064
|
+
const t = l((o) => o.configuration), n = t == null ? void 0 : t.headingStyles, s = (t == null ? void 0 : t.headingText) || "";
|
1065
|
+
return s.length ? /* @__PURE__ */ e(
|
1066
1066
|
"span",
|
1067
1067
|
{
|
1068
1068
|
style: {
|
@@ -1070,7 +1070,7 @@ function dt() {
|
|
1070
1070
|
letterSpacing: "0.05em",
|
1071
1071
|
...n
|
1072
1072
|
},
|
1073
|
-
children:
|
1073
|
+
children: s
|
1074
1074
|
}
|
1075
1075
|
) : /* @__PURE__ */ u("span", { style: { transform: "skewX(20deg)" }, className: "bw-tracking-wider", children: [
|
1076
1076
|
"LA",
|
@@ -1079,7 +1079,7 @@ function dt() {
|
|
1079
1079
|
] });
|
1080
1080
|
}
|
1081
1081
|
function wt() {
|
1082
|
-
const t = l((
|
1082
|
+
const t = l((s) => s.configuration), n = t == null ? void 0 : t.headingContainerStyles;
|
1083
1083
|
return /* @__PURE__ */ e(
|
1084
1084
|
"div",
|
1085
1085
|
{
|
@@ -1112,8 +1112,8 @@ function wt() {
|
|
1112
1112
|
);
|
1113
1113
|
}
|
1114
1114
|
function ut() {
|
1115
|
-
const [t, n] = N(!1),
|
1116
|
-
function
|
1115
|
+
const [t, n] = N(!1), s = l((r) => r.fromChain);
|
1116
|
+
function o() {
|
1117
1117
|
n(!1);
|
1118
1118
|
}
|
1119
1119
|
return /* @__PURE__ */ u(K, { children: [
|
@@ -1122,74 +1122,74 @@ function ut() {
|
|
1122
1122
|
/* @__PURE__ */ e(
|
1123
1123
|
"div",
|
1124
1124
|
{
|
1125
|
-
onClick: () => (
|
1125
|
+
onClick: () => (s == null ? void 0 : s.networkType) !== "cosmos" && n(!0),
|
1126
1126
|
className: "bw-flex bw-relative bw-right-0 bw-items-center bw-gap-x-2",
|
1127
1127
|
children: /* @__PURE__ */ e(K1, { classnames: " ", children: /* @__PURE__ */ e(bt, { fill: "var(--tw-text-secondary)" }) })
|
1128
1128
|
}
|
1129
1129
|
)
|
1130
1130
|
] }),
|
1131
|
-
/* @__PURE__ */ e(ct, { open: t, handleClose:
|
1131
|
+
/* @__PURE__ */ e(ct, { open: t, handleClose: o })
|
1132
1132
|
] });
|
1133
1133
|
}
|
1134
|
-
let
|
1135
|
-
function mt({ confirmRoute: t, setConfirmRoute: n, routes:
|
1136
|
-
const [b,
|
1134
|
+
let o1, Fe, he, Me = 0;
|
1135
|
+
function mt({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isRoutesEnabled: r, fetchBalance: c }) {
|
1136
|
+
const [b, d] = N(0), { getWallet: i } = ke({}), m = l((y) => y.fromChain), f = i(m), { isConnected: I } = ge();
|
1137
1137
|
B(() => {
|
1138
1138
|
t && clearInterval(he);
|
1139
1139
|
}, [t]), B(() => {
|
1140
1140
|
var y;
|
1141
|
-
b === 0 && document.visibilityState === "visible" && !t && r && ((y = f.address) != null && y.length && c.refetch(),
|
1141
|
+
b === 0 && document.visibilityState === "visible" && !t && r && ((y = f.address) != null && y.length && c.refetch(), s.refetch());
|
1142
1142
|
}, [b, t, r]), B(() => {
|
1143
|
-
|
1144
|
-
}, [
|
1145
|
-
if (!pe.isEmpty(
|
1146
|
-
const y = Math.max(0,
|
1147
|
-
|
1143
|
+
s.isFetching && (Me = 0);
|
1144
|
+
}, [s.isFetching]), B(() => {
|
1145
|
+
if (!pe.isEmpty(o)) {
|
1146
|
+
const y = Math.max(0, o.deadline - Me);
|
1147
|
+
d(y);
|
1148
1148
|
}
|
1149
1149
|
return () => {
|
1150
|
-
|
1150
|
+
d(0);
|
1151
1151
|
};
|
1152
|
-
}, [
|
1152
|
+
}, [o]), B(() => (pe.isEmpty(o) || document.addEventListener("visibilitychange", h), () => {
|
1153
1153
|
document.removeEventListener("visibilitychange", h);
|
1154
|
-
}), [
|
1154
|
+
}), [o]);
|
1155
1155
|
function T() {
|
1156
|
-
|
1156
|
+
o1 = Date.now(), d((y) => (Fe = y, y));
|
1157
1157
|
}
|
1158
|
-
function
|
1159
|
-
let y = Date.now(), C = Math.round((y -
|
1160
|
-
|
1158
|
+
function L() {
|
1159
|
+
let y = Date.now(), C = Math.round((y - o1) / 1e3);
|
1160
|
+
o.deadline - Fe + C > o.deadline ? n((A) => {
|
1161
1161
|
var v;
|
1162
|
-
return A || ((v = f.address) != null && v.length && c.refetch(),
|
1163
|
-
}) : Fe && C &&
|
1162
|
+
return A || ((v = f.address) != null && v.length && c.refetch(), s.refetch(), d(o.deadline)), A;
|
1163
|
+
}) : Fe && C && d(Fe - C);
|
1164
1164
|
}
|
1165
1165
|
function h() {
|
1166
|
-
document.visibilityState === "visible" ?
|
1166
|
+
document.visibilityState === "visible" ? L() : T();
|
1167
1167
|
}
|
1168
|
-
return B(() => (pe.isEmpty(
|
1169
|
-
|
1168
|
+
return B(() => (pe.isEmpty(o) ? he && clearInterval(he) : he = setInterval(() => {
|
1169
|
+
d((y) => y <= 0 ? (Me = 0, o.deadline) : (Me++, y - 1));
|
1170
1170
|
}, 1e3), () => {
|
1171
1171
|
he && clearInterval(he);
|
1172
|
-
}), [
|
1172
|
+
}), [o]), l((y) => y.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1173
1173
|
}
|
1174
|
-
function pt(t, n,
|
1175
|
-
const { primaryWallet:
|
1176
|
-
if (!
|
1177
|
-
const
|
1178
|
-
if (
|
1174
|
+
function pt(t, n, s) {
|
1175
|
+
const { primaryWallet: o } = Ne(), [r, c] = N(0), b = async (d) => {
|
1176
|
+
if (!o) return;
|
1177
|
+
const i = new Ve(d || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed");
|
1178
|
+
if (i)
|
1179
1179
|
try {
|
1180
|
-
const
|
1181
|
-
|
1180
|
+
const m = new be(o.address);
|
1181
|
+
i.onAccountChange(m, (T) => {
|
1182
1182
|
c(T.lamports / 1e9);
|
1183
1183
|
});
|
1184
|
-
const I = await
|
1185
|
-
c(I),
|
1184
|
+
const I = await i.getBalance(m) / 1e9;
|
1185
|
+
c(I), s(!1);
|
1186
1186
|
} catch {
|
1187
|
-
|
1187
|
+
s(!1);
|
1188
1188
|
}
|
1189
1189
|
};
|
1190
1190
|
return B(() => {
|
1191
1191
|
(t == null ? void 0 : t.networkType) === "sol" && b((t == null ? void 0 : t.chainId) === "eclipse-svm" ? "https://eclipse.lgns.net/" : null);
|
1192
|
-
}, [t == null ? void 0 : t.networkType,
|
1192
|
+
}, [t == null ? void 0 : t.networkType, o, t == null ? void 0 : t.chainId, o == null ? void 0 : o.address]), { balanceSol: r, getBalanceSol: b };
|
1193
1193
|
}
|
1194
1194
|
function gt(t) {
|
1195
1195
|
return t == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ? "" : t;
|
@@ -1200,25 +1200,25 @@ new be("So11111111111111111111111111111111111111112");
|
|
1200
1200
|
new be("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
|
1201
1201
|
async function ht(t, n) {
|
1202
1202
|
if (!t) return;
|
1203
|
-
const
|
1203
|
+
const s = new Ve(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new be(t), r = await s.getParsedTokenAccountsByOwner(o, {
|
1204
1204
|
programId: n ? ft : xt
|
1205
1205
|
});
|
1206
1206
|
let c = {};
|
1207
1207
|
for (const { account: b } of r.value) {
|
1208
|
-
const
|
1209
|
-
c[
|
1208
|
+
const d = b.data.parsed.info.mint, i = b.data.parsed.info.tokenAmount.uiAmount;
|
1209
|
+
c[d] = i;
|
1210
1210
|
}
|
1211
1211
|
return c;
|
1212
1212
|
}
|
1213
1213
|
function yt(t, n) {
|
1214
|
-
const [
|
1214
|
+
const [s, o] = N(0), { primaryWallet: r, setPrimaryWallet: c } = Ne(), [b, d] = N(!1), i = l((g) => g.fromChain), { address: m, isConnected: f } = ge(), I = l((g) => g.cosmosChainIds), { data: T, isConnected: L } = Oe({
|
1215
1215
|
chainId: I,
|
1216
1216
|
multiChain: !0
|
1217
|
-
}), h = l((
|
1218
|
-
address:
|
1217
|
+
}), h = l((g) => g.fromCoin), { data: y, isLoading: C } = O1({
|
1218
|
+
address: m,
|
1219
1219
|
token: gt((h == null ? void 0 : h.address) || ""),
|
1220
|
-
chainId: Number((
|
1221
|
-
enabled: !!((
|
1220
|
+
chainId: Number((i == null ? void 0 : i.chainId) || 0),
|
1221
|
+
enabled: !!((i.networkType == "evm" || n) && m && (m != null && m.length))
|
1222
1222
|
}), {
|
1223
1223
|
data: A,
|
1224
1224
|
isLoading: v,
|
@@ -1226,117 +1226,142 @@ function yt(t, n) {
|
|
1226
1226
|
isInitialLoading: H,
|
1227
1227
|
isRefetching: ne
|
1228
1228
|
} = c1({
|
1229
|
-
chainId: [
|
1229
|
+
chainId: [i.chainId],
|
1230
1230
|
multiChain: !0
|
1231
1231
|
});
|
1232
|
-
async function
|
1232
|
+
async function F(g) {
|
1233
1233
|
if (!r) return;
|
1234
|
-
const
|
1235
|
-
if (
|
1234
|
+
const P = new Ve(g || "https://solana-rpc.publicnode.com");
|
1235
|
+
if (P)
|
1236
1236
|
try {
|
1237
1237
|
const M = new be(r.address);
|
1238
|
-
|
1239
|
-
const
|
1240
|
-
|
1238
|
+
d(!0);
|
1239
|
+
const E = await P.getBalance(M) / 1e9;
|
1240
|
+
o(E), d(!1);
|
1241
1241
|
} catch {
|
1242
|
-
|
1242
|
+
d(!1);
|
1243
1243
|
}
|
1244
1244
|
}
|
1245
|
-
async function
|
1245
|
+
async function $(g) {
|
1246
1246
|
try {
|
1247
|
-
|
1248
|
-
let
|
1249
|
-
|
1247
|
+
d(!0);
|
1248
|
+
let P = await ht(r.address, g);
|
1249
|
+
d(!1), o(P == null ? void 0 : P[h == null ? void 0 : h.address]);
|
1250
1250
|
} catch {
|
1251
|
-
|
1251
|
+
d(!1);
|
1252
1252
|
}
|
1253
1253
|
}
|
1254
1254
|
let _;
|
1255
1255
|
async function J() {
|
1256
1256
|
if (!r) return;
|
1257
|
-
const
|
1258
|
-
if (!
|
1259
|
-
const
|
1260
|
-
|
1261
|
-
var
|
1262
|
-
|
1257
|
+
const g = await r.connector.getPublicClient();
|
1258
|
+
if (!g) return;
|
1259
|
+
const P = new be(r.address);
|
1260
|
+
P && (_ = g.onAccountChange(P, (M) => {
|
1261
|
+
var x;
|
1262
|
+
if (i.networkType == "sol" && (r != null && r.address))
|
1263
|
+
if (((x = h == null ? void 0 : h.symbol) == null ? void 0 : x.toLowerCase()) === "sol")
|
1264
|
+
F();
|
1265
|
+
else if (i.chainId === "eclipse-svm")
|
1266
|
+
h.symbol == "ETH" ? F("https://eclipse.lgns.net/") : $("https://eclipse.lgns.net/");
|
1267
|
+
else {
|
1268
|
+
if (i.networkType === "btc" || i.networkType === "sui")
|
1269
|
+
return;
|
1270
|
+
$();
|
1271
|
+
}
|
1263
1272
|
}));
|
1264
1273
|
}
|
1265
|
-
|
1274
|
+
async function p() {
|
1275
|
+
d(!0);
|
1276
|
+
const g = await r.getBalance();
|
1277
|
+
o(g), d(!1);
|
1278
|
+
}
|
1279
|
+
B(() => ((i == null ? void 0 : i.networkType) === "sol" && J(), async () => {
|
1266
1280
|
if (!r) return;
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1281
|
+
const g = await r.connector.getPublicClient();
|
1282
|
+
g && g.removeAccountChangeListener(_);
|
1283
|
+
}), [r == null ? void 0 : r.address, i == null ? void 0 : i.networkType, h]);
|
1284
|
+
async function k(g) {
|
1285
|
+
var M, x;
|
1286
|
+
let P = A[g] || A;
|
1272
1287
|
try {
|
1273
|
-
|
1274
|
-
let
|
1275
|
-
|
1288
|
+
d(!0);
|
1289
|
+
let E = await P.getAllBalances((M = T == null ? void 0 : T[g]) == null ? void 0 : M.bech32Address), O = pe.keyBy(E, "denom");
|
1290
|
+
o(((x = O[d1(h.address)]) == null ? void 0 : x.amount) / Math.pow(10, h.decimals) || 0), d(!1);
|
1276
1291
|
} catch {
|
1277
|
-
|
1292
|
+
d(!1);
|
1278
1293
|
}
|
1279
1294
|
}
|
1280
1295
|
return B(() => {
|
1281
|
-
var
|
1282
|
-
|
1283
|
-
}, [
|
1284
|
-
getbal:
|
1285
|
-
isBalanceLoading: (
|
1296
|
+
var g;
|
1297
|
+
i.networkType == "sol" && (r != null && r.address) ? ((g = h == null ? void 0 : h.symbol) == null ? void 0 : g.toLowerCase()) === "sol" ? F() : i.chainId == "eclipse-svm" ? h.symbol == "ETH" ? F("https://eclipse.lgns.net/") : $("https://eclipse.lgns.net/") : $() : i.networkType == "sui" && (r == null ? void 0 : r.chain) == "SUI" || i.networkType == "btc" && (r == null ? void 0 : r.chain) == "BTC" ? p() : i.networkType == "evm" && m && (m != null && m.length) ? o(Number((y == null ? void 0 : y.formatted) || 0)) : i.networkType == "cosmos" && L && !v && k(i == null ? void 0 : i.chainId);
|
1298
|
+
}, [i.networkType, i == null ? void 0 : i.chainId, h.symbol, h == null ? void 0 : h.address, y, m, r == null ? void 0 : r.address, m, L, v, r == null ? void 0 : r.chain, t]), {
|
1299
|
+
getbal: s,
|
1300
|
+
isBalanceLoading: (i == null ? void 0 : i.networkType) == "sol" || (i == null ? void 0 : i.networkType) == "cosmos" || (i == null ? void 0 : i.networkType) == "btc" || (i == null ? void 0 : i.networkType) == "sui" ? b : (i == null ? void 0 : i.networkType) == "evm" ? C : !1
|
1286
1301
|
};
|
1287
1302
|
}
|
1288
|
-
const Ct = de.lazy(() => import("./SwapAsset-
|
1289
|
-
function jt({ handleShowWallet: t, showWallet: n, fetchChains:
|
1290
|
-
var Ge, Ke, Je, qe, Xe, Qe,
|
1291
|
-
const [
|
1303
|
+
const Ct = de.lazy(() => import("./SwapAsset-DS1khTG7.js")), vt = de.lazy(() => import("./InputComp-NuVHgaJr.js")), kt = de.lazy(() => import("./QuotesProgress-QaDMFoy1.js")), Nt = de.lazy(() => import("./TxnButton-tr4Dz_jE.js")), Tt = de.lazy(() => import("./index-eC9_VgZe.js").then((t) => t.i)), It = de.lazy(() => import("./index-CPAph-rb.js")), Bt = de.lazy(() => import("./LoadRoute-B67KdzDM.js")), At = de.lazy(() => import("./AllRoutes-D8LuuVmM.js"));
|
1304
|
+
function jt({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
1305
|
+
var Ge, Ke, Je, qe, Xe, Qe, Ue;
|
1306
|
+
const [o, r] = N(), [c, b] = N(!1), [d, i] = N(!1), [m, f] = N(!1), [I, T] = N(!1), [L, h] = N("all"), [y, C] = N(!1), { primaryWallet: A } = Ne();
|
1292
1307
|
$1();
|
1293
|
-
const { address: v } = ge(), { address: Z } = a1(), { getbal: H, isBalanceLoading: ne } = yt(y), { data:
|
1294
|
-
l((
|
1295
|
-
const _ = l((
|
1296
|
-
l((
|
1297
|
-
const Te = l((
|
1298
|
-
let
|
1299
|
-
const
|
1308
|
+
const { address: v } = ge(), { address: Z } = a1(), { getbal: H, isBalanceLoading: ne } = yt(y), { data: F, isConnected: $ } = Oe({ chainId: "cosmoshub-4" });
|
1309
|
+
l((a) => a.configuration);
|
1310
|
+
const _ = l((a) => a.persist), J = l((a) => a.setPersist), p = l((a) => a.route), k = l((a) => a.fromChain), g = l((a) => a.toChain), P = l((a) => a.fromCoin), M = l((a) => a.toCoin), x = l((a) => a.setFromChain), E = l((a) => a.setToChain), O = l((a) => a.setFromCoin), R = l((a) => a.setToCoin), j = l((a) => a.amount), S = l((a) => a.setAmount), ie = l((a) => a.customWallet);
|
1311
|
+
l((a) => a.setToDisconnect);
|
1312
|
+
const Te = l((a) => a.setCosmosChainIds), W = l((a) => a.customFee), G = l((a) => a.broadCastMode), Q = l((a) => a.evmGas), V = l((a) => a.evmSpeed), Ie = l((a) => a.slippage), ye = l((a) => a.option), Be = l((a) => a.setCustomWallet), Ae = l((a) => a.setSelectedProvider), { balanceSol: w } = pt(k, y, Re), { suggestAndConnectAsync: D } = z1(), re = !!(j.length && k.chain.length && P.coin.length && g.chain.length && M.coin.length && !m && I), le = ["routes", v, k, g, P, M, j, A == null ? void 0 : A.address, Z, ie, F == null ? void 0 : F.bech32Address, W, Q, V, Ie, G, ye.value];
|
1313
|
+
let se = (G === "Priority Fee" || G === "Both") && (W != null && W.length) ? W : ye.value, oe = (G === "Jito Tip" || G === "Both") && (W != null && W.length) ? W : ye.value, q = Q != null && Q.length ? Q : V.value;
|
1314
|
+
const U = (k == null ? void 0 : k.networkType) === "sol" ? G === "Priority Fee" ? `&solanaPriorityFee=${se}` : G === "Jito Tip" ? `&solanaJitoTip=${oe}` : `&solanaPriorityFee=${se}&solanaJitoTip=${oe}` : (k == null ? void 0 : k.networkType) === "evm" ? `&evmPriorityFee=${q}` : "", { getWallet: Y, refetch: ee } = ke({}), { routes: z, routesData: X, setRoutesData: ce, errorMessage: te, setErrorMessage: Ce } = J1({
|
1300
1315
|
enabled: re,
|
1301
1316
|
dependency: le,
|
1302
|
-
payload: [
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1317
|
+
payload: [
|
1318
|
+
(k == null ? void 0 : k.networkType) === "cosmos" ? n1(F == null ? void 0 : F.bech32Address, (Ge = k == null ? void 0 : k.chainInfo) == null ? void 0 : Ge.bech32Config.bech32PrefixAccAddr) : ((Ke = Y(k)) == null ? void 0 : Ke.address) || "",
|
1319
|
+
k,
|
1320
|
+
g,
|
1321
|
+
P,
|
1322
|
+
M,
|
1323
|
+
j,
|
1324
|
+
Number(Ie) * 100,
|
1325
|
+
(ie == null ? void 0 : ie.length) > 30 ? ((Je = Y({})) == null ? void 0 : Je.address) || "" : (g == null ? void 0 : g.networkType) === "cosmos" ? n1(F == null ? void 0 : F.bech32Address, (qe = g == null ? void 0 : g.chainInfo) == null ? void 0 : qe.bech32Config.bech32PrefixAccAddr) : ((Xe = Y(g)) == null ? void 0 : Xe.address) || "",
|
1326
|
+
U
|
1327
|
+
]
|
1328
|
+
}), ae = Y(k), we = l1({
|
1329
|
+
queryKey: ["balance", ae == null ? void 0 : ae.address, k],
|
1330
|
+
queryFn: async () => await (await Se.fetchBalance(ae.address, k.chainId)).json(),
|
1331
|
+
enabled: !!((Qe = ae == null ? void 0 : ae.address) != null && Qe.length && k.chainId),
|
1307
1332
|
refetchOnWindowFocus: !1
|
1308
1333
|
}), { quoteTimer: je } = mt({
|
1309
|
-
routes:
|
1334
|
+
routes: z,
|
1310
1335
|
routesData: X,
|
1311
|
-
confirmRoute:
|
1312
|
-
setConfirmRoute:
|
1336
|
+
confirmRoute: d,
|
1337
|
+
setConfirmRoute: i,
|
1313
1338
|
isRoutesEnabled: re,
|
1314
1339
|
fetchBalance: we
|
1315
1340
|
});
|
1316
1341
|
B(() => {
|
1317
1342
|
j || ce({});
|
1318
|
-
let
|
1319
|
-
return Number(j) > 0 && (
|
1343
|
+
let a;
|
1344
|
+
return Number(j) > 0 && (a = setTimeout(() => {
|
1320
1345
|
T(!0);
|
1321
1346
|
}, 500)), () => {
|
1322
|
-
clearTimeout(
|
1347
|
+
clearTimeout(a), T(!1);
|
1323
1348
|
};
|
1324
1349
|
}, [j]), B(() => {
|
1325
|
-
|
1326
|
-
}, [
|
1327
|
-
function ve(
|
1328
|
-
f(
|
1350
|
+
z.isFetching && ce({});
|
1351
|
+
}, [z.isFetching]);
|
1352
|
+
function ve(a) {
|
1353
|
+
f(a);
|
1329
1354
|
}
|
1330
1355
|
function Pe() {
|
1331
1356
|
r();
|
1332
1357
|
}
|
1333
|
-
async function Le(
|
1334
|
-
if (
|
1358
|
+
async function Le(a) {
|
1359
|
+
if ($)
|
1335
1360
|
try {
|
1336
1361
|
let ue = await t1();
|
1337
|
-
if (ue.length && !ue.includes(
|
1362
|
+
if (ue.length && !ue.includes(a.chainId)) {
|
1338
1363
|
let xe = await D({
|
1339
|
-
chainInfo:
|
1364
|
+
chainInfo: a,
|
1340
1365
|
walletType: Z1.KEPLR
|
1341
1366
|
}), me = await ee(), fe = await t1();
|
1342
1367
|
Te(fe);
|
@@ -1346,23 +1371,23 @@ function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1346
1371
|
else
|
1347
1372
|
return;
|
1348
1373
|
}
|
1349
|
-
function h1(
|
1350
|
-
(
|
1374
|
+
function h1(a) {
|
1375
|
+
(a == null ? void 0 : a.networkType) == "cosmos" && Le(a.chainInfo), S(""), Ce({ error: "" }), o == "from" ? x({ ...a }) : o == "to" && E({ ...a });
|
1351
1376
|
}
|
1352
|
-
function y1(
|
1353
|
-
Ce({ error: "" }),
|
1377
|
+
function y1(a) {
|
1378
|
+
Ce({ error: "" }), S(""), o == "from" ? O({ ...a }) : o == "to" && R({ ...a });
|
1354
1379
|
}
|
1355
1380
|
function Ze() {
|
1356
1381
|
b(!c);
|
1357
1382
|
}
|
1358
|
-
function He(
|
1359
|
-
|
1383
|
+
function He(a) {
|
1384
|
+
i(typeof a < "u" ? a : !d);
|
1360
1385
|
}
|
1361
|
-
function Re(
|
1362
|
-
C(
|
1386
|
+
function Re(a) {
|
1387
|
+
C(a);
|
1363
1388
|
}
|
1364
|
-
function C1(
|
1365
|
-
Ae(
|
1389
|
+
function C1(a) {
|
1390
|
+
Ae(a == null ? void 0 : a.provider), ce(a);
|
1366
1391
|
}
|
1367
1392
|
function v1() {
|
1368
1393
|
setTimeout(() => {
|
@@ -1370,56 +1395,56 @@ function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1370
1395
|
}, 1e3);
|
1371
1396
|
}
|
1372
1397
|
function k1() {
|
1373
|
-
|
1398
|
+
S("");
|
1374
1399
|
}
|
1375
|
-
function N1(
|
1376
|
-
|
1377
|
-
var fe,
|
1378
|
-
(
|
1400
|
+
function N1(a, ue, xe) {
|
1401
|
+
Se.fetchTokens(a.chainId, xe).then((me) => me.json()).then((me) => {
|
1402
|
+
var fe, Ye;
|
1403
|
+
(Ye = (fe = me.data) == null ? void 0 : fe[a.chainId]) == null || Ye.forEach((We) => {
|
1379
1404
|
ue({
|
1380
|
-
...
|
1381
|
-
coin:
|
1382
|
-
...
|
1405
|
+
...P,
|
1406
|
+
coin: We.symbol,
|
1407
|
+
...We,
|
1383
1408
|
availBal: ""
|
1384
1409
|
});
|
1385
1410
|
});
|
1386
1411
|
});
|
1387
1412
|
}
|
1388
1413
|
function T1() {
|
1389
|
-
|
1414
|
+
S(""), x(g), O(M), E(k), R(P), k.networkType !== g.networkType && Be("");
|
1390
1415
|
}
|
1391
1416
|
B(() => {
|
1392
|
-
_.isHistory &&
|
1417
|
+
_.isHistory && p === "" && (J({}), ve(!1));
|
1393
1418
|
}, [_]);
|
1394
|
-
function I1(
|
1419
|
+
function I1(a) {
|
1395
1420
|
var ue;
|
1396
|
-
if (
|
1397
|
-
let xe = pe.keyBy(
|
1421
|
+
if (a && s.isSuccess && a !== (g == null ? void 0 : g.networkType) && a !== (k == null ? void 0 : k.networkType)) {
|
1422
|
+
let xe = pe.keyBy(s.data.data, "chainId"), me = a == "evm" ? "8453" : a == "sol" ? "sol" : a == "sui" ? "1" : a == "btc" ? "btc" : "cosmoshub-4", fe = a == "evm" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "sol" ? "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" : a == "sui" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "btc" ? "bitcoin" : "uatom";
|
1398
1423
|
x({
|
1399
1424
|
...xe[me],
|
1400
1425
|
chain: ((ue = xe[me]) == null ? void 0 : ue.name) || ""
|
1401
|
-
}), N1(xe[me],
|
1426
|
+
}), N1(xe[me], O, fe);
|
1402
1427
|
} else
|
1403
1428
|
return;
|
1404
1429
|
}
|
1405
|
-
return /* @__PURE__ */ e(A1, { fallback: /* @__PURE__ */ e(L1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(Tt, { connectWalletField:
|
1430
|
+
return /* @__PURE__ */ e(A1, { fallback: /* @__PURE__ */ e(L1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(Tt, { connectWalletField: L, handleShowWallet: t, handleRecentSelectedWallet: I1 }) : !d && !((Ue = _ == null ? void 0 : _.routeId) != null && Ue.length) ? c ? /* @__PURE__ */ e(At, { routes: z, handleShowAllRoutes: Ze, handleRoutesData: C1, convertVal: (M == null ? void 0 : M.lastPrice) || 0, amount: j }) : o ? /* @__PURE__ */ e(tt, { chainData: o == "from" ? k : g, coinData: o == "from" ? P : M, setChainData: h1, setCoinData: y1, handleReset: Pe, showExchangeList: o, fetchBalance: we, fetchChains: s }) : /* @__PURE__ */ u(K, { children: [
|
1406
1431
|
/* @__PURE__ */ e(ut, {}),
|
1407
1432
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1408
1433
|
/* @__PURE__ */ e(Ct, { handleSwap: T1 }),
|
1409
|
-
/* @__PURE__ */ e(
|
1410
|
-
/* @__PURE__ */ e(
|
1434
|
+
/* @__PURE__ */ e(s1, { chainData: k, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: h, coinData: P }),
|
1435
|
+
/* @__PURE__ */ e(s1, { chainData: g, show: "to", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: h, coinData: M })
|
1411
1436
|
] }),
|
1412
|
-
/* @__PURE__ */ e(vt, { amount: j, setAmount:
|
1413
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Bt, { routes:
|
1437
|
+
/* @__PURE__ */ e(vt, { amount: j, setAmount: S, fetchBalance: we, getCoinBalance: H, isBalanceLoading: ne }),
|
1438
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Bt, { routes: z, handleShowAllRoutes: Ze, routesData: X, amount: j, isRoutesEnabled: I, price: ((X == null ? void 0 : X.outputAmountDisplay) || "") * ((M == null ? void 0 : M.lastPrice) || 0) }) }),
|
1414
1439
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (te == null ? void 0 : te.error) == "string" ? te == null ? void 0 : te.error : "" }),
|
1415
|
-
/* @__PURE__ */ e(kt, { amount: I, routes:
|
1416
|
-
/* @__PURE__ */ e(Nt, { routesData: X, handleSuccess: Re, routes:
|
1417
|
-
] }) : /* @__PURE__ */ e(It, { handleConfirmClose: He, amount: j, routesData: X, resetAmount: k1, routes:
|
1440
|
+
/* @__PURE__ */ e(kt, { amount: I, routes: z, routesData: X, quoteTimer: je }),
|
1441
|
+
/* @__PURE__ */ e(Nt, { routesData: X, handleSuccess: Re, routes: z, fetchBalancePrev: we, amount: j, isAmountTyped: I, handleShowWallet: t, setConnectWalletField: h, handleConfirmClose: He, balanceSol: w, getCoinBalance: H })
|
1442
|
+
] }) : /* @__PURE__ */ e(It, { handleConfirmClose: He, amount: j, routesData: X, resetAmount: k1, routes: z, handleStopRoute: ve, resetBalance: v1 }) }) });
|
1418
1443
|
}
|
1419
1444
|
function Pt({ fetchChains: t }) {
|
1420
|
-
const [n,
|
1445
|
+
const [n, s] = N(!1), { isConnected: o } = ge();
|
1421
1446
|
function r(c) {
|
1422
|
-
|
1447
|
+
s(!n);
|
1423
1448
|
}
|
1424
1449
|
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1425
1450
|
jt,
|
@@ -1439,5 +1464,5 @@ export {
|
|
1439
1464
|
Kt as i,
|
1440
1465
|
d1 as p,
|
1441
1466
|
u1 as r,
|
1442
|
-
|
1467
|
+
Y1 as u
|
1443
1468
|
};
|