@blockend/widget 1.0.38 → 1.0.39-beta.1
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-B7pX20Zo.js → AllRoutes-pVn5r2AF.js} +17 -17
- package/dist/{Box-D4SF6IgE.js → Box-2EhEu03K.js} +1 -1
- package/dist/{EstGas-XPPmSPyE.js → EstGas-WwkfFHpv.js} +54 -224
- package/dist/{Grow-CIKLOO0_.js → Grow-D4EVow-M.js} +2 -2
- package/dist/{InputComp-CmIAuBF5.js → InputComp-DQBDoD71.js} +6 -6
- package/dist/{LoadRoute-DKqaBFPc.js → LoadRoute-42ZgErfe.js} +39 -39
- package/dist/{QuotesProgress-Cd8OXy_N.js → QuotesProgress-CTlZ7elT.js} +1 -1
- package/dist/{SwapAsset-D4Ordn3g.js → SwapAsset-CU5YEZ75.js} +4 -17
- package/dist/{Tooltip-D9AmvxjY.js → Tooltip-DSOAqpED.js} +3 -3
- package/dist/{TxnButton-B-83_5zc.js → TxnButton-CfruxaOs.js} +19 -19
- package/dist/{add-BZzjgxfy.js → add-DayuYwbp.js} +1 -1
- package/dist/{all-wallets-DLW4V3zq.js → all-wallets-B7lOWwQ-.js} +1 -1
- package/dist/{app-store-D9zl-1il.js → app-store-CWVen5K_.js} +1 -1
- package/dist/{apple-nhTBOubh.js → apple-Xce5ePDw.js} +1 -1
- package/dist/{arrow-bottom-CA41golp.js → arrow-bottom-CJ5QodIU.js} +1 -1
- package/dist/{arrow-bottom-circle-C7bcVyL5.js → arrow-bottom-circle-m6M-yL2m.js} +1 -1
- package/dist/{arrow-left-Dr3e_iWm.js → arrow-left-gbgYje3p.js} +1 -1
- package/dist/{arrow-right-BWPh_8om.js → arrow-right-BWBYQ-3w.js} +1 -1
- package/dist/{arrow-top-B-3i_liJ.js → arrow-top-TV0fK_PC.js} +1 -1
- package/dist/{bank-Dx797_uv.js → bank-D5WUpbbn.js} +1 -1
- package/dist/{basic-D0oXwPg9.js → basic-yKyoIw_n.js} +3 -3
- package/dist/{browser-BSKhz_Rl.js → browser-C1Gw-601.js} +1 -1
- package/dist/{card-JvH_eZER.js → card-BGu7Ytfr.js} +1 -1
- package/dist/{ccip-Q2_jbZ9I.js → ccip-8pKaCE7W.js} +1 -1
- package/dist/{checkmark-BWJC9xZR.js → checkmark-DXjp9482.js} +1 -1
- package/dist/{checkmark-bold-Cl8Q-86u.js → checkmark-bold-C-Za8drF.js} +1 -1
- package/dist/{chevron-bottom-B5LD72dB.js → chevron-bottom-pyAIkjST.js} +1 -1
- package/dist/{chevron-left-zcD_S5Mh.js → chevron-left-Fo0wnlZX.js} +1 -1
- package/dist/{chevron-right-Dshpb1tn.js → chevron-right-DkmxB-lW.js} +1 -1
- package/dist/{chevron-top-CyAvSkbB.js → chevron-top-r9CVQcQg.js} +1 -1
- package/dist/{chrome-store-IqQZe3Dt.js → chrome-store-CRlb0bJh.js} +1 -1
- package/dist/{clock-C3R8kpDJ.js → clock-TqJS2h0Z.js} +1 -1
- package/dist/{close-CFffZcXA.js → close-C2cPb_3q.js} +1 -1
- package/dist/{coinPlaceholder-D5ue3gut.js → coinPlaceholder-D-_tUshz.js} +1 -1
- package/dist/{compass-5P5ETuT-.js → compass-D-JOMMbC.js} +1 -1
- package/dist/{copy-sOWq_xZr.js → copy-CS7IA_r_.js} +1 -1
- package/dist/{core-CkGb3HnF.js → core-DbjedOio.js} +3 -3
- package/dist/{cursor-C9PsMzYL.js → cursor-3K2-QZLT.js} +1 -1
- package/dist/{cursor-transparent-DhdvRXRL.js → cursor-transparent-DKdHMJra.js} +1 -1
- package/dist/{desktop-nlXeRhMP.js → desktop-CAxsE6Ga.js} +1 -1
- package/dist/{disconnect-r6cq0rms.js → disconnect-Dc-LNqNb.js} +1 -1
- package/dist/{discord-wtaS7sRl.js → discord-VfiQtaLg.js} +1 -1
- package/dist/{down-BWT0-5W2.js → down-C69EIwo1.js} +4 -4
- package/dist/{etherscan-C6JzEuD5.js → etherscan-nfJcVg9R.js} +1 -1
- package/dist/{exclamation-triangle-SYK5z7t0.js → exclamation-triangle-DaMU5L_4.js} +1 -1
- package/dist/{extension-BtKfbDhd.js → extension-BaO8FLXh.js} +1 -1
- package/dist/{external-link-DiJAb_Zx.js → external-link-B9oCkuPJ.js} +1 -1
- package/dist/{facebook-C6waWMFR.js → facebook-nSdQubUH.js} +1 -1
- package/dist/{farcaster-B2h5iNcC.js → farcaster-BtInSUqS.js} +1 -1
- package/dist/{filters-D5fv3EPd.js → filters-C9LrueAm.js} +1 -1
- package/dist/{getChainIds-Dz6aap_K.js → getChainIds-CQg6djVc.js} +2 -2
- package/dist/{getCosmosAddress-8jLHKIcL.js → getCosmosAddress-Qwk5Y2WB.js} +2 -2
- package/dist/{github-BFPJm3cS.js → github-BVzfRJXr.js} +1 -1
- package/dist/{google-BKrDcc4H.js → google-C_Zkq44M.js} +1 -1
- package/dist/{hamburger-DIZlVaaS.js → hamburger-Bss9ENTU.js} +5 -5
- package/dist/{help-circle-B9E4KaaL.js → help-circle-D9KC2TTg.js} +1 -1
- package/dist/{id-DSWELVdP.js → id-D5ODDUPi.js} +1 -1
- package/dist/{image-D_XLTDNA.js → image-D9BguVkX.js} +1 -1
- package/dist/{index-Dbievn97.js → index-B-LMuVus.js} +6 -6
- package/dist/{index-C-nZzi_h.js → index-B-Y6H6ZT.js} +2 -2
- package/dist/{index-wgpAJ4oi.js → index-B8BzdUYX.js} +396 -396
- package/dist/{index-BAfaemUH.js → index-Bknn7U1s.js} +41 -87
- package/dist/{index-CuTh2WgK.js → index-C3Yx39QI.js} +43 -109
- package/dist/{index-BvLXd2ez.js → index-CCJxyv13.js} +1724 -1724
- package/dist/{index-8-b4bggg.js → index-Csnr5wYZ.js} +116 -142
- package/dist/{index-OqRsFFkj.js → index-D1suJrBe.js} +78 -78
- package/dist/{index-DDX8hCfq.js → index-D7cNHH01.js} +1 -1
- package/dist/{index-C8qMFb8J.js → index-DTTNs7X2.js} +1 -1
- package/dist/{index-tz85S4oi.js → index-mLOjEWq5.js} +20 -46
- package/dist/{index.es-DmoKG6PQ.js → index.es-BvpkVeYn.js} +1 -1
- package/dist/{index.es-C8S1tVGA.js → index.es-J7Adt0qn.js} +2 -2
- package/dist/index.es.js +1 -1
- package/dist/{info-Jp3wzaJD.js → info-BbZu8EmP.js} +1 -1
- package/dist/{info-circle-D8qzYGLl.js → info-circle-DC4d8t58.js} +1 -1
- package/dist/{lightbulb-BPif1XX7.js → lightbulb-B_XHWcwO.js} +1 -1
- package/dist/{mail-CXvOvka2.js → mail-DUBlSWnW.js} +1 -1
- package/dist/{mobile-6jozwZ_W.js → mobile-DW7n1RaC.js} +1 -1
- package/dist/{more-4GK73HVb.js → more-CHiJ0jdA.js} +1 -1
- package/dist/{network-placeholder-BXMI9mvM.js → network-placeholder-fkXdFnU3.js} +1 -1
- package/dist/{nftPlaceholder-eFMtbevb.js → nftPlaceholder-CzdJZ_xc.js} +1 -1
- package/dist/{off-BVgsCCY7.js → off-liaZCdZH.js} +1 -1
- package/dist/{play-store-CSnP_bJN.js → play-store-Dlmh4PlW.js} +1 -1
- package/dist/{plus-DJwRlvDh.js → plus-QBGWemZZ.js} +1 -1
- package/dist/{qr-code-BlSwmYrr.js → qr-code-2rARSIxP.js} +1 -1
- package/dist/{recycle-horizontal-BHvmgtxJ.js → recycle-horizontal-DByCihYW.js} +1 -1
- package/dist/{refresh-BRF6qJWJ.js → refresh-BFM457iN.js} +1 -1
- package/dist/{reown-logo-BoS3xniW.js → reown-logo-C9dbpsPZ.js} +1 -1
- package/dist/{search-Ce5NGUl8.js → search-_GMCgtU4.js} +1 -1
- package/dist/{send-BQypsZV1.js → send-CBnSvpXY.js} +1 -1
- package/dist/{swapHorizontal-D6nLcUbS.js → swapHorizontal-BiN3nSBx.js} +1 -1
- package/dist/{swapHorizontalBold-BjyFhrDl.js → swapHorizontalBold-CAWIrlnq.js} +1 -1
- package/dist/{swapHorizontalMedium-yfsH3ZiT.js → swapHorizontalMedium-DrfkO94z.js} +1 -1
- package/dist/{swapHorizontalRoundedBold--7neTazp.js → swapHorizontalRoundedBold-DbJnc4Gs.js} +1 -1
- package/dist/{swapVertical-DebXq8vP.js → swapVertical-nx3G0q67.js} +1 -1
- package/dist/{telegram-DdA-uHK5.js → telegram-BBmONWiX.js} +1 -1
- package/dist/{three-dots-n4hxld75.js → three-dots-CxLcYR_u.js} +1 -1
- package/dist/{twitch-CebVfqsE.js → twitch-BCER0FU2.js} +1 -1
- package/dist/{twitterIcon-cB7s4iFj.js → twitterIcon-D7lNSGDl.js} +1 -1
- package/dist/{unsupportedProp-CM13Y09e.js → unsupportedProp-Cgx_R3Ro.js} +1 -1
- package/dist/{useRegisterError-BX8_6VKB.js → useRegisterError-CIj7yT4N.js} +1 -1
- package/dist/{verify-B8Nf81Xk.js → verify-BtPqlMYv.js} +1 -1
- package/dist/{verify-filled-XrLUzouC.js → verify-filled-D69dNjXa.js} +1 -1
- package/dist/{w3m-modal-Cw2A---U.js → w3m-modal-BRaqvs1m.js} +2 -2
- package/dist/{wallet-DIi8pXyb.js → wallet-B0uYbj_y.js} +1 -1
- package/dist/{wallet-placeholder-B1dz-pLA.js → wallet-placeholder-C64Kayjj.js} +1 -1
- package/dist/{walletconnect-CnK4KBEj.js → walletconnect-Bl6U4E40.js} +1 -1
- package/dist/{warning-circle-Cm2vNTGA.js → warning-circle-DdcOPYkT.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-xCvkwrYO.js → x-PEBthjJm.js} +1 -1
- package/package.json +1 -1
@@ -1,17 +1,17 @@
|
|
1
1
|
import { jsxs as u, jsx as e, Fragment as K } from "react/jsx-runtime";
|
2
2
|
import de, { useState as N, useEffect as B, useRef as I1, Suspense as B1 } from "react";
|
3
|
-
import { B as A1, i as Ee, u as ke, F as De, f as $e, C as _e, W as s1 } from "./useRegisterError-
|
4
|
-
import { u as
|
5
|
-
import { C as L1, M as F1, g as e1 } from "./getChainIds-
|
6
|
-
import { useQuery as
|
3
|
+
import { B as A1, i as Ee, u as ke, F as De, f as $e, C as _e, W as s1 } from "./useRegisterError-CIj7yT4N.js";
|
4
|
+
import { u as l, l as pe, a as i1, c as Ve, S as j1, M as P1 } from "./index-CCJxyv13.js";
|
5
|
+
import { C as L1, M as F1, g as e1 } from "./getChainIds-CQg6djVc.js";
|
6
|
+
import { useQuery as a1 } 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 V1, B as z1 } from "./index-
|
11
|
-
import { useAccount as Oe, useStargateClient as
|
12
|
-
import { S as H1, D as G1 } from "./down-
|
10
|
+
import { u as V1, B as z1 } from "./index-B-Y6H6ZT.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as l1, useSuggestChainAndConnect as S1, WalletType as Z1 } from "graz";
|
12
|
+
import { S as H1, D as G1 } from "./down-C69EIwo1.js";
|
13
13
|
import { R as K1 } from "./index-CDq3vNnP.js";
|
14
|
-
import { C as ze, P as be, u as J1, g as t1 } from "./getCosmosAddress-
|
14
|
+
import { C as ze, P as be, u as J1, g as t1 } from "./getCosmosAddress-Qwk5Y2WB.js";
|
15
15
|
function c1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ u(
|
17
17
|
"svg",
|
@@ -47,7 +47,7 @@ function c1({ fill: t }) {
|
|
47
47
|
);
|
48
48
|
}
|
49
49
|
function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
50
|
-
const [r, c] = N(t), [b, d] = N(""), { tick:
|
50
|
+
const [r, c] = N(t), [b, d] = N(""), { tick: a, defaultCoin: p } = Ee;
|
51
51
|
return /* @__PURE__ */ u("div", { children: [
|
52
52
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
53
53
|
/* @__PURE__ */ e(
|
@@ -106,7 +106,7 @@ function q1({ data: t, handleBack: n, handleSetChainData: o, network: s }) {
|
|
106
106
|
/* @__PURE__ */ e("img", { src: (T = y.image) != null && T.length ? y.image : p, className: "bw-rounded-[50%] bw-border bw-border-border-primary", width: 25, height: 25, alt: "img" }),
|
107
107
|
" ",
|
108
108
|
/* @__PURE__ */ e("p", { children: y.name }),
|
109
|
-
s.chain === y.name ? /* @__PURE__ */ e("img", { src:
|
109
|
+
s.chain === y.name ? /* @__PURE__ */ e("img", { src: a, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(K, {})
|
110
110
|
] }),
|
111
111
|
/* @__PURE__ */ u("div", { className: "bw-pr-2", children: [
|
112
112
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal", children: "Tokens" }),
|
@@ -128,18 +128,18 @@ function W1(t) {
|
|
128
128
|
return t.slice(0, 2) === "0x" ? !0 : n ? t == n : !1;
|
129
129
|
}
|
130
130
|
function U1(t) {
|
131
|
-
const [n, o] = N({}), s =
|
131
|
+
const [n, o] = N({}), s = l((a) => a.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: s,
|
133
133
|
multiChain: !0
|
134
|
-
}), c =
|
134
|
+
}), c = l((a) => a.fromChain), { data: b } = l1({
|
135
135
|
chainId: [(t == null ? void 0 : t.chainId) || c.chainId],
|
136
136
|
multiChain: !0
|
137
137
|
});
|
138
|
-
async function d(
|
138
|
+
async function d(a) {
|
139
139
|
var p, y;
|
140
|
-
if ((p = r == null ? void 0 : r[
|
141
|
-
let T = await (b[
|
142
|
-
(y = r == null ? void 0 : r[
|
140
|
+
if ((p = r == null ? void 0 : r[a]) != null && p.bech32Address && b) {
|
141
|
+
let T = await (b[a] || b).getAllBalances(
|
142
|
+
(y = r == null ? void 0 : r[a]) == null ? void 0 : y.bech32Address
|
143
143
|
), P = pe.keyBy(T, "denom");
|
144
144
|
o(P);
|
145
145
|
}
|
@@ -218,24 +218,24 @@ function D1({ selectedChain: t }) {
|
|
218
218
|
}
|
219
219
|
const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s, showExchangeList: r, setCoinData: c, setChainData: b }) {
|
220
220
|
var Be, Ae;
|
221
|
-
|
222
|
-
const d =
|
221
|
+
l((w) => w.searchCustomCoin);
|
222
|
+
const d = l((w) => w.setSearchCustomCoin), { ref: a, inView: p } = V1(), { getWallet: y } = ke({}), { connected: I, address: T } = i1(), { isConnected: P, address: f } = ge(), { primaryWallet: h } = Ne();
|
223
223
|
R1();
|
224
|
-
const C = y(n), A =
|
224
|
+
const C = y(n), A = l((w) => w.fromChain), v = l((w) => w.fromCoin), Z = l((w) => w.toChain), H = l((w) => w.toCoin), [re, L] = N(!1), { cosmosBalance: R } = U1(n), { defaultCoin: _ } = Ee, [J, g] = N(0), m = I1(null), { data: k } = Oe({
|
225
225
|
chainId: [n.chainId],
|
226
226
|
multiChain: !0
|
227
|
-
}), M = (n == null ? void 0 : n.networkType) === "evm" && f || (n == null ? void 0 : n.networkType) === "sol" && (h == null ? void 0 : h.address) || (n == null ? void 0 : n.networkType) === "tron" && T || (n == null ? void 0 : n.networkType) === "cosmos" && ((Be = k == null ? void 0 : k[n == null ? void 0 : n.chainId]) == null ? void 0 : Be.bech32Address), F =
|
228
|
-
|
229
|
-
const x =
|
227
|
+
}), M = (n == null ? void 0 : n.networkType) === "evm" && f || (n == null ? void 0 : n.networkType) === "sol" && (h == null ? void 0 : h.address) || (n == null ? void 0 : n.networkType) === "tron" && T || (n == null ? void 0 : n.networkType) === "cosmos" && ((Be = k == null ? void 0 : k[n == null ? void 0 : n.chainId]) == null ? void 0 : Be.bech32Address), F = l((w) => w.toDisconnect);
|
228
|
+
l((w) => w.setToDisconnect);
|
229
|
+
const x = l((w) => w.customWallet), O = l((w) => w.setCustomWallet), $ = l((w) => w.tokens), [E, j] = N([]), [V, ie] = N([]), [Te, Y] = N([]), G = $, Q = a1({
|
230
230
|
queryKey: ["balance", C == null ? void 0 : C.address, n],
|
231
231
|
queryFn: async () => await (await Ve.fetchBalance(C.address, n.chainId)).json(),
|
232
232
|
enabled: !!((Ae = C == null ? void 0 : C.address) != null && Ae.length && n.chainId),
|
233
233
|
refetchOnWindowFocus: !1
|
234
234
|
});
|
235
235
|
function z(w) {
|
236
|
-
var ee,
|
236
|
+
var ee, le, oe, se, q, W, U, te, S, X, ce, ne;
|
237
237
|
let D = b1(w.address);
|
238
|
-
return w.networkType == "cosmos" ? $e(((ee = R == null ? void 0 : R[D]) == null ? void 0 : ee.amount) / Math.pow(10, w.decimals) || 0) || "" : $e((((W = (q = (se = (oe = (
|
238
|
+
return w.networkType == "cosmos" ? $e(((ee = R == null ? void 0 : R[D]) == null ? void 0 : ee.amount) / Math.pow(10, w.decimals) || 0) || "" : $e((((W = (q = (se = (oe = (le = Q.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 : q[w.address]) == null ? void 0 : W.balance) || 0) / Math.pow(10, ((ne = (ce = (X = (S = (te = (U = Q.data) == null ? void 0 : U.data) == null ? void 0 : te[n == null ? void 0 : n.networkType]) == null ? void 0 : S[n.chainId]) == null ? void 0 : X[w.address]) == null ? void 0 : ce.asset) == null ? void 0 : ne.decimals) || 0) || 0) || "";
|
239
239
|
}
|
240
240
|
B(() => {
|
241
241
|
o.length > 40 && W1(o) && !V.length ? (L(!0), d({
|
@@ -261,7 +261,7 @@ const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
261
261
|
return ((W = q.name) == null ? void 0 : W.toLowerCase().includes(o == null ? void 0 : o.toLowerCase())) || ((U = q.symbol) == null ? void 0 : U.toLowerCase().includes(o == null ? void 0 : o.toLowerCase())) || ((S = (te = q.address) == null ? void 0 : te.toLowerCase()) == null ? void 0 : S.includes(o == null ? void 0 : o.toLowerCase()));
|
262
262
|
})) == null ? void 0 : se.sort((q, W) => {
|
263
263
|
if (M) return z(W) * W.lastPrice - z(q) * q.lastPrice;
|
264
|
-
}), D = 20, ee = J * D,
|
264
|
+
}), D = 20, ee = J * D, le = ee + D, oe = w.slice(ee, le);
|
265
265
|
J == 0 ? ie([...oe]) : ie([...V, ...oe]);
|
266
266
|
}
|
267
267
|
return B(() => {
|
@@ -269,31 +269,31 @@ const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
269
269
|
}, [E, o, J, M, R, Q.data]), B(() => {
|
270
270
|
p && g((w) => w + 1);
|
271
271
|
}, [p]), /* @__PURE__ */ e("div", { ref: m, className: " bw-h-[200px] bw-pr-2 md:bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: V && (V == null ? void 0 : V.length) > 0 ? V == null ? void 0 : V.map((w, D, ee) => {
|
272
|
-
var
|
272
|
+
var le, oe, se, q, W, U;
|
273
273
|
return /* @__PURE__ */ u(
|
274
274
|
"div",
|
275
275
|
{
|
276
|
-
ref: ee.length >= 20 && ee.length - 1 === D ?
|
276
|
+
ref: ee.length >= 20 && ee.length - 1 === D ? a : null,
|
277
277
|
className: `bw-py-2
|
278
278
|
${r == "from" && H._id !== w._id || r == "to" && v._id !== w._id, ""}
|
279
279
|
bw-flex bw-items-center bw-justify-between bw-cursor-pointer bw-border-b bw-border-border-primary
|
280
280
|
|
281
281
|
}`,
|
282
282
|
onClick: async () => {
|
283
|
-
var S, X, ce, ne, Ce,
|
283
|
+
var S, X, ce, ne, Ce, ae, we, je, ve, Pe, Le;
|
284
284
|
let te = {
|
285
285
|
// ...coinData,
|
286
286
|
coin: w.symbol,
|
287
287
|
...w,
|
288
|
-
availBal: ((Ce = (ne = (ce = (X = (S = Q.data) == null ? void 0 : S.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : ce[n.chainId]) == null ? void 0 : ne[w.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((Le = (Pe = (ve = (je = (we = (
|
288
|
+
availBal: ((Ce = (ne = (ce = (X = (S = Q.data) == null ? void 0 : S.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : ce[n.chainId]) == null ? void 0 : ne[w.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((Le = (Pe = (ve = (je = (we = (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
290
|
c(te), b(n), s(n, te), (n == null ? void 0 : n.networkType) === (Z == null ? void 0 : Z.networkType) || (n == null || n.networkType, A == null || A.networkType, O(""));
|
291
291
|
},
|
292
292
|
children: [
|
293
293
|
/* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-justify-center bw-w-max bw-gap-x-2", children: [
|
294
|
-
/* @__PURE__ */ u("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(
|
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
295
|
(oe = w.image) != null && oe.length ? /* @__PURE__ */ e("img", { src: w.image, className: "bw-rounded-[50%] bw-max-w-[30px] bw-max-h-[30px] bw-object-contain", width: 30, height: 30, alt: "img" }) : /* @__PURE__ */ e("img", { src: _, className: "bw-rounded-[50%]", width: 30, height: 30, alt: "img" }),
|
296
|
-
(se = n == null ? void 0 : n.image) != null && se.length ? /* @__PURE__ */ e("img", { src: n.image, className: `bw-absolute ${(q = n == null ? void 0 : n.image) != null && q.length ? "bw-bg-background-
|
296
|
+
(se = n == null ? void 0 : n.image) != null && se.length ? /* @__PURE__ */ e("img", { src: n.image, className: `bw-absolute ${(q = n == null ? void 0 : n.image) != null && q.length ? "bw-bg-background-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: [
|
@@ -354,12 +354,12 @@ const et = de.memo(function({ selectChainState: n, value: o, handleClosePopup: s
|
|
354
354
|
});
|
355
355
|
function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coinData: r, showExchangeList: c, fetchChains: b }) {
|
356
356
|
var g, m, k, M, F;
|
357
|
-
const [d,
|
357
|
+
const [d, a] = N(!1), [p, y] = N(""), I = l((x) => x.tokens), [T, P] = N([]), [f, h] = 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
359
|
var x, O, $, E;
|
360
360
|
if ((O = (x = b.data) == null ? void 0 : x.data) != null && O.length) {
|
361
361
|
let j = [...(E = ($ = b.data) == null ? void 0 : $.data) == null ? void 0 : E.slice(0, 9)], V = j.findIndex((z) => z.chainId === "137"), ie = j.findIndex((z) => z.chainId === "324"), Te = j.findIndex((z) => z.chainId === "10"), Y = j.findIndex((z) => z.chainId === "43114");
|
362
|
-
j.splice(V, 1, H[80094]), j.splice(ie, 1, H[2741]), j.splice(Te, 1, H["eclipse-svm"]), j.splice(Y, 1, H[999]), !!pe.keyBy(j, "chainId")[C.chainId] || (j.pop(), j.push(C)), P(j);
|
362
|
+
j.splice(V, 1, H[80094] || {}), j.splice(ie, 1, H[2741] || {}), j.splice(Te, 1, H["eclipse-svm"] || {}), j.splice(Y, 1, H[999] || {}), !!pe.keyBy(j, "chainId")[C.chainId] || (j.pop(), j.push(C)), P(j);
|
363
363
|
}
|
364
364
|
}, [H, (g = b.data) == null ? void 0 : g.data, s, C]), B(() => {
|
365
365
|
A(s);
|
@@ -375,7 +375,7 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
375
375
|
($ = x.chain) != null && $.length && ((E = O == null ? void 0 : O.coin) != null && E.length) && o();
|
376
376
|
}
|
377
377
|
function L() {
|
378
|
-
|
378
|
+
a(!1);
|
379
379
|
}
|
380
380
|
function R(x) {
|
381
381
|
A(x);
|
@@ -439,7 +439,7 @@ function tt({ setChainData: t, setCoinData: n, handleReset: o, chainData: s, coi
|
|
439
439
|
"div",
|
440
440
|
{
|
441
441
|
onClick: () => {
|
442
|
-
|
442
|
+
a(!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" },
|
@@ -490,7 +490,7 @@ function nt({
|
|
490
490
|
handleShowWallet: r,
|
491
491
|
setConnectWalletField: c
|
492
492
|
}) {
|
493
|
-
const [b, d] = N(null), { address:
|
493
|
+
const [b, d] = N(null), { address: a, chain: p, data: y, disconnect: I, ...T } = t, [P, f] = N(), { connector: h } = ge(), { connectors: C } = M1(), A = () => {
|
494
494
|
c(o), o == "to" ? (v(), n(!0)) : v();
|
495
495
|
};
|
496
496
|
E1(), B(() => {
|
@@ -509,8 +509,8 @@ function nt({
|
|
509
509
|
id: "basic-button",
|
510
510
|
style: { fontSize: "12px" },
|
511
511
|
className: "bw-bg-background-container bw-flex bw-items-center bw-justify-center bw-gap-x-2 bw-mb-[4px] bw-w-[100px] bw-h-[25px] bw-rounded-xl bw-border bw-border-border-primary",
|
512
|
-
children:
|
513
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((
|
512
|
+
children: a ? /* @__PURE__ */ u(K, { children: [
|
513
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((a == null ? void 0 : a.substring(0, 4)) || "") + "..." + ((a == null ? void 0 : a.substring(a.length - 4, a.length)) || "") }),
|
514
514
|
/* @__PURE__ */ e(
|
515
515
|
"div",
|
516
516
|
{
|
@@ -523,14 +523,14 @@ function nt({
|
|
523
523
|
}
|
524
524
|
function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConnectWalletField: s, coinData: r, show: c }) {
|
525
525
|
var A, v, Z, H, re, L, R, _, J;
|
526
|
-
const b =
|
526
|
+
const b = l((g) => g.configuration), d = l((g) => g.customWallet), { isConnected: a, isConnecting: p, isReconnecting: y } = ge();
|
527
527
|
Ne();
|
528
528
|
const { defaultCoin: I } = Ee, { isAnyWalletConnected: T, getWallet: P } = ke({
|
529
529
|
chainData: t,
|
530
530
|
show: c
|
531
531
|
});
|
532
|
-
|
533
|
-
const f =
|
532
|
+
l((g) => g.toDisconnect), l((g) => g.setToDisconnect);
|
533
|
+
const f = l((g) => g.fromChain), h = l((g) => g.toChain);
|
534
534
|
function C(g) {
|
535
535
|
}
|
536
536
|
return /* @__PURE__ */ u("div", { className: "bw-w-[50%] ", children: [
|
@@ -541,11 +541,11 @@ function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConn
|
|
541
541
|
style: {
|
542
542
|
boxShadow: b && b.customTheme && ((v = (A = b.customTheme) == null ? void 0 : A.shadow) == null ? void 0 : v.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
543
543
|
},
|
544
|
-
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-
|
544
|
+
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",
|
545
545
|
children: [
|
546
|
-
/* @__PURE__ */ u("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-
|
546
|
+
/* @__PURE__ */ u("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: [
|
547
547
|
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: I, className: "bw-rounded-[50%] bw-object-fill ", alt: "img", width: 35, height: 35 }),
|
548
|
-
/* @__PURE__ */ e("div", { className: `bw-w-[21px] bw-h-[21px] bw-border bw-bg-background-
|
548
|
+
/* @__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: I, alt: "img" }) })
|
549
549
|
] }),
|
550
550
|
/* @__PURE__ */ u(
|
551
551
|
"div",
|
@@ -571,14 +571,14 @@ function r1({ chainData: t, setShowExchangeList: n, handleShowWallet: o, setConn
|
|
571
571
|
}
|
572
572
|
function rt({ isConnected: t, setConnectWalletField: n, handleShowWallet: o, show: s, chainData: r, handleToDisconnect: c }) {
|
573
573
|
var y;
|
574
|
-
const b =
|
574
|
+
const b = l((I) => I.customWallet), d = l((I) => I.fromChain), a = l((I) => I.toChain), { getWallet: p } = ke({
|
575
575
|
chainData: r,
|
576
576
|
show: s
|
577
577
|
});
|
578
578
|
return /* @__PURE__ */ e("div", { className: "bw-mt-2 bw-flex bw-justify-end", children: t ? /* @__PURE__ */ e(
|
579
579
|
nt,
|
580
580
|
{
|
581
|
-
walletDetails: (b == null ? void 0 : b.length) > 30 && s == "to" ? p({}) : (d == null ? void 0 : d.networkType) == (
|
581
|
+
walletDetails: (b == null ? void 0 : b.length) > 30 && s == "to" ? p({}) : (d == null ? void 0 : d.networkType) == (a == null ? void 0 : a.networkType) && s == "to" ? {
|
582
582
|
disconnect: c,
|
583
583
|
address: (y = p(d)) == null ? void 0 : y.address
|
584
584
|
} : p(r),
|
@@ -607,7 +607,7 @@ const ot = "_gradient_15zwe_1", Se = {
|
|
607
607
|
};
|
608
608
|
function st({ mode: t, handleMode: n }) {
|
609
609
|
var s, r;
|
610
|
-
const o =
|
610
|
+
const o = l((c) => c.configuration);
|
611
611
|
return /* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center", children: /* @__PURE__ */ u(
|
612
612
|
"div",
|
613
613
|
{
|
@@ -622,19 +622,12 @@ function st({ mode: t, handleMode: n }) {
|
|
622
622
|
onClick: () => {
|
623
623
|
n("Priority Fee");
|
624
624
|
},
|
625
|
-
className: " bw-font-normal bw-text-text-secondary bw-border bw-border-r-0 bw-bg-background-
|
625
|
+
className: " bw-font-normal bw-text-text-secondary bw-border bw-border-r-0 bw-bg-background-container bw-flex bw-justify-center bw-items-center bw-relative bw-text-sm bw-flex-1 bw-h-[40px] bw-rounded-l-md bw-border-border-primary",
|
626
626
|
children: [
|
627
|
-
/* @__PURE__ */ u(
|
628
|
-
"
|
629
|
-
|
630
|
-
|
631
|
-
style: { transition: "opacity 0.1s ease" },
|
632
|
-
children: [
|
633
|
-
" ",
|
634
|
-
"Priority Fee"
|
635
|
-
]
|
636
|
-
}
|
637
|
-
),
|
627
|
+
/* @__PURE__ */ u("p", { className: `${t === "Priority Fee" ? "bw-opacity-0" : "bw-opacity-100"}`, style: { transition: "opacity 0.1s ease" }, children: [
|
628
|
+
" ",
|
629
|
+
"Priority Fee"
|
630
|
+
] }),
|
638
631
|
/* @__PURE__ */ e("div", { className: "bw-h-[70%] bw-right-0 bw-absolute bw-w-[1px] bw-bg-border-primary" })
|
639
632
|
]
|
640
633
|
}
|
@@ -657,16 +650,9 @@ function st({ mode: t, handleMode: n }) {
|
|
657
650
|
onClick: () => {
|
658
651
|
n("Jito Tip");
|
659
652
|
},
|
660
|
-
className: "bw-font-normal bw-text-text-secondary bw-border bw-bg-background-
|
653
|
+
className: "bw-font-normal bw-text-text-secondary bw-border bw-bg-background-container bw-border-x-0 bw-flex bw-justify-center bw-items-center bw-relative bw-text-sm bw-flex-1 bw-border-border-primary bw-h-[40px] ",
|
661
654
|
children: [
|
662
|
-
/* @__PURE__ */ e(
|
663
|
-
"p",
|
664
|
-
{
|
665
|
-
className: `${t === "Jito Tip" ? "bw-opacity-0" : "bw-opacity-100"}`,
|
666
|
-
style: { transition: "opacity 0.1s ease" },
|
667
|
-
children: "Jito Tip"
|
668
|
-
}
|
669
|
-
),
|
655
|
+
/* @__PURE__ */ e("p", { className: `${t === "Jito Tip" ? "bw-opacity-0" : "bw-opacity-100"}`, style: { transition: "opacity 0.1s ease" }, children: "Jito Tip" }),
|
670
656
|
/* @__PURE__ */ e("div", { className: "bw-h-[70%] bw-right-0 bw-absolute bw-w-[1px] bw-bg-border-primary" })
|
671
657
|
]
|
672
658
|
}
|
@@ -677,18 +663,11 @@ function st({ mode: t, handleMode: n }) {
|
|
677
663
|
onClick: () => {
|
678
664
|
n("Both");
|
679
665
|
},
|
680
|
-
className: "bw-font-normal bw-text-text-secondary bw-border bw-bg-background-
|
681
|
-
children: /* @__PURE__ */ u(
|
682
|
-
"
|
683
|
-
|
684
|
-
|
685
|
-
style: { transition: "opacity 0.1s ease" },
|
686
|
-
children: [
|
687
|
-
" ",
|
688
|
-
"Both"
|
689
|
-
]
|
690
|
-
}
|
691
|
-
)
|
666
|
+
className: "bw-font-normal bw-text-text-secondary bw-border bw-bg-background-container bw-border-l-0 bw-text-sm bw-flex-1 bw-border-border-primary bw-h-[40px] bw-rounded-r-md ",
|
667
|
+
children: /* @__PURE__ */ u("p", { className: `${t === "Both" ? "bw-opacity-0" : "bw-opacity-100"}`, style: { transition: "opacity 0.1s ease" }, children: [
|
668
|
+
" ",
|
669
|
+
"Both"
|
670
|
+
] })
|
692
671
|
}
|
693
672
|
)
|
694
673
|
]
|
@@ -722,7 +701,7 @@ function d1({ options: t, handleOptions: n }) {
|
|
722
701
|
{ name: "Medium", value: "medium" },
|
723
702
|
{ name: "High", value: "high" },
|
724
703
|
{ name: "Degen", value: "ultra" }
|
725
|
-
], s =
|
704
|
+
], s = l((b) => b.configuration);
|
726
705
|
return /* @__PURE__ */ u("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between", children: [
|
727
706
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: "Speed" }),
|
728
707
|
/* @__PURE__ */ e(
|
@@ -731,8 +710,8 @@ function d1({ options: t, handleOptions: n }) {
|
|
731
710
|
style: {
|
732
711
|
boxShadow: s && s.customTheme && ((c = (r = s.customTheme) == null ? void 0 : r.shadow) == null ? void 0 : c.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
733
712
|
},
|
734
|
-
className: "bw-flex bw-border bw-bg-background-
|
735
|
-
children: o.map((b, d,
|
713
|
+
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",
|
714
|
+
children: o.map((b, d, a) => /* @__PURE__ */ u(
|
736
715
|
"button",
|
737
716
|
{
|
738
717
|
onClick: () => {
|
@@ -747,12 +726,7 @@ function d1({ options: t, handleOptions: n }) {
|
|
747
726
|
className: `
|
748
727
|
bw-flex bw-flex-1 bw-relative bw-h-full bw-rounded-md bw-gap-x-1 bw-justify-center bw-items-center `,
|
749
728
|
children: [
|
750
|
-
b.value === "ultra" ? /* @__PURE__ */ e(
|
751
|
-
it,
|
752
|
-
{
|
753
|
-
fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)"
|
754
|
-
}
|
755
|
-
) : /* @__PURE__ */ e(K, {}),
|
729
|
+
b.value === "ultra" ? /* @__PURE__ */ e(it, { fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" }) : /* @__PURE__ */ e(K, {}),
|
756
730
|
/* @__PURE__ */ e(
|
757
731
|
"p",
|
758
732
|
{
|
@@ -760,7 +734,7 @@ function d1({ options: t, handleOptions: n }) {
|
|
760
734
|
children: b.name
|
761
735
|
}
|
762
736
|
),
|
763
|
-
|
737
|
+
a.length - 1 !== d && /* @__PURE__ */ e("div", { className: "bw-h-[70%] bw-absolute bw-right-0 bw-w-[1px] bw-border bw-border-border-primary" }),
|
764
738
|
/* @__PURE__ */ e(
|
765
739
|
"div",
|
766
740
|
{
|
@@ -796,7 +770,7 @@ function w1(t) {
|
|
796
770
|
}
|
797
771
|
function u1({ inputVal: t, handleCustomVal: n, title: o, inputSideText: s }) {
|
798
772
|
var c, b;
|
799
|
-
const r =
|
773
|
+
const r = l((d) => d.configuration);
|
800
774
|
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: [
|
801
775
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal", children: o }),
|
802
776
|
/* @__PURE__ */ u(
|
@@ -805,7 +779,7 @@ function u1({ inputVal: t, handleCustomVal: n, title: o, inputSideText: s }) {
|
|
805
779
|
style: {
|
806
780
|
boxShadow: r && r.customTheme && ((b = (c = r.customTheme) == null ? void 0 : c.shadow) == null ? void 0 : b.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
807
781
|
},
|
808
|
-
className: "bw-h-[40px] bw-w-[70%] md:bw-w-[60%] bw-flex bw-rounded-md bw-border bw-border-border-primary bw-bg-background-
|
782
|
+
className: "bw-h-[40px] bw-w-[70%] md:bw-w-[60%] bw-flex bw-rounded-md bw-border bw-border-border-primary bw-bg-background-container bw-p-1 bw-text-text-primary",
|
809
783
|
children: [
|
810
784
|
/* @__PURE__ */ e(
|
811
785
|
"input",
|
@@ -829,8 +803,8 @@ function u1({ inputVal: t, handleCustomVal: n, title: o, inputSideText: s }) {
|
|
829
803
|
] });
|
830
804
|
}
|
831
805
|
function m1({ handleSave: t, isSaveButtonDisabled: n }) {
|
832
|
-
const o =
|
833
|
-
return
|
806
|
+
const o = l((s) => s.configuration);
|
807
|
+
return l((s) => s.slippage), /* @__PURE__ */ e(
|
834
808
|
"div",
|
835
809
|
{
|
836
810
|
style: { ...o == null ? void 0 : o.gradientStyle },
|
@@ -862,7 +836,7 @@ function p1({ handleClose: t }) {
|
|
862
836
|
}
|
863
837
|
function g1({ slippage: t, handleSlippage: n }) {
|
864
838
|
var s, r;
|
865
|
-
const o =
|
839
|
+
const o = l((c) => c.configuration);
|
866
840
|
return /* @__PURE__ */ u("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
867
841
|
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-font-normal bw-text-text-primary", children: "Max Slippage" }),
|
868
842
|
/* @__PURE__ */ u(
|
@@ -907,8 +881,8 @@ function x1() {
|
|
907
881
|
/* @__PURE__ */ e("div", { className: "bw-h-[1px] bw-flex-1 bw-bg-border-primary " })
|
908
882
|
] });
|
909
883
|
}
|
910
|
-
function
|
911
|
-
const [n, o] = N(""), [s, r] = N({ name: "Low", value: "low" }), [c, b] = N(""), [d,
|
884
|
+
function at({ handleClose: t }) {
|
885
|
+
const [n, o] = N(""), [s, r] = N({ name: "Low", value: "low" }), [c, b] = N(""), [d, a] = N(""), [p, y] = N(""), I = l((g) => g.broadCastMode), T = l((g) => g.customFee), P = l((g) => g.setCustomFee), f = l((g) => g.slippage), h = l((g) => g.setSlippage), C = l((g) => g.setBroadCastMode), A = l((g) => g.option), v = l((g) => g.setOption), Z = n == T && A.name == s.name && f == p && (d === I && d !== "" || !n.length && !A.name.length);
|
912
886
|
function H(g) {
|
913
887
|
b(""), o(g.target.value);
|
914
888
|
}
|
@@ -930,7 +904,7 @@ function lt({ handleClose: t }) {
|
|
930
904
|
y(g.target.value);
|
931
905
|
}
|
932
906
|
B(() => {
|
933
|
-
|
907
|
+
a(I);
|
934
908
|
}, [I]);
|
935
909
|
function _() {
|
936
910
|
if (d == "" && (n.length || s.name.length)) {
|
@@ -940,10 +914,10 @@ function lt({ handleClose: t }) {
|
|
940
914
|
n.length ? (P(n), v(s)) : (P(""), L()), C(d), h(p), t();
|
941
915
|
}
|
942
916
|
function J(g) {
|
943
|
-
b(""),
|
917
|
+
b(""), a(g);
|
944
918
|
}
|
945
919
|
return B(() => {
|
946
|
-
!T && !A.name.length && (C(""),
|
920
|
+
!T && !A.name.length && (C(""), a(""));
|
947
921
|
}, [T, A.name]), /* @__PURE__ */ u("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[447px] bw-rounded-lg bw-border bw-p-3 px-4 md:bw-px-6 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
948
922
|
/* @__PURE__ */ e(p1, { handleClose: t }),
|
949
923
|
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(g1, { slippage: p, handleSlippage: R }) }),
|
@@ -971,8 +945,8 @@ function lt({ handleClose: t }) {
|
|
971
945
|
] })
|
972
946
|
] });
|
973
947
|
}
|
974
|
-
function
|
975
|
-
const [n, o] = N({ name: "Low", value: "low" }), [s, r] = N(""), [c, b] = N(""), d =
|
948
|
+
function lt({ handleClose: t }) {
|
949
|
+
const [n, o] = N({ name: "Low", value: "low" }), [s, r] = N(""), [c, b] = N(""), d = l((v) => v.setEvmGas), a = l((v) => v.setEvmSpeed), p = l((v) => v.evmSpeed), y = l((v) => v.evmGas), I = l((v) => v.slippage), T = l((v) => v.setSlippage), P = s == y && p.name == n.name && I == c;
|
976
950
|
function f(v, Z) {
|
977
951
|
o(v);
|
978
952
|
}
|
@@ -985,7 +959,7 @@ function at({ handleClose: t }) {
|
|
985
959
|
y != null && y.length ? r(y) : r("");
|
986
960
|
}, [y]);
|
987
961
|
function C() {
|
988
|
-
s.length ? (d(s),
|
962
|
+
s.length ? (d(s), a(n)) : (d(""), a(n)), T(c), t();
|
989
963
|
}
|
990
964
|
B(() => {
|
991
965
|
b(I);
|
@@ -1017,7 +991,7 @@ function at({ handleClose: t }) {
|
|
1017
991
|
] });
|
1018
992
|
}
|
1019
993
|
function ct({ open: t, handleClose: n }) {
|
1020
|
-
const o =
|
994
|
+
const o = l((r) => r.fromChain);
|
1021
995
|
return /* @__PURE__ */ e(
|
1022
996
|
F1,
|
1023
997
|
{
|
@@ -1034,7 +1008,7 @@ function ct({ open: t, handleClose: n }) {
|
|
1034
1008
|
// left: "47%",
|
1035
1009
|
// transform: "translate(-50%, -50%)",
|
1036
1010
|
bgcolor: "var(--tw-bg-container)"
|
1037
|
-
}, children: o.networkType == "sol" ? /* @__PURE__ */ e(
|
1011
|
+
}, children: o.networkType == "sol" ? /* @__PURE__ */ e(at, { handleClose: n }) : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(lt, { handleClose: n }) }) })
|
1038
1012
|
}
|
1039
1013
|
);
|
1040
1014
|
}
|
@@ -1078,7 +1052,7 @@ function bt({ fill: t }) {
|
|
1078
1052
|
);
|
1079
1053
|
}
|
1080
1054
|
function dt() {
|
1081
|
-
const t =
|
1055
|
+
const t = l((s) => s.configuration), n = t == null ? void 0 : t.headingStyles, o = (t == null ? void 0 : t.headingText) || "";
|
1082
1056
|
return o.length ? /* @__PURE__ */ e(
|
1083
1057
|
"span",
|
1084
1058
|
{
|
@@ -1096,7 +1070,7 @@ function dt() {
|
|
1096
1070
|
] });
|
1097
1071
|
}
|
1098
1072
|
function wt() {
|
1099
|
-
const t =
|
1073
|
+
const t = l((o) => o.configuration), n = t == null ? void 0 : t.headingContainerStyles;
|
1100
1074
|
return /* @__PURE__ */ e(
|
1101
1075
|
"div",
|
1102
1076
|
{
|
@@ -1129,7 +1103,7 @@ function wt() {
|
|
1129
1103
|
);
|
1130
1104
|
}
|
1131
1105
|
function ut() {
|
1132
|
-
const [t, n] = N(!1), o =
|
1106
|
+
const [t, n] = N(!1), o = l((r) => r.fromChain);
|
1133
1107
|
function s() {
|
1134
1108
|
n(!1);
|
1135
1109
|
}
|
@@ -1150,7 +1124,7 @@ function ut() {
|
|
1150
1124
|
}
|
1151
1125
|
let o1, Fe, he, Me = 0;
|
1152
1126
|
function mt({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isRoutesEnabled: r, fetchBalance: c }) {
|
1153
|
-
const [b, d] = N(0), { getWallet:
|
1127
|
+
const [b, d] = N(0), { getWallet: a } = ke({}), p = l((h) => h.fromChain), y = a(p), { isConnected: I } = ge();
|
1154
1128
|
B(() => {
|
1155
1129
|
t && clearInterval(he);
|
1156
1130
|
}, [t]), B(() => {
|
@@ -1186,19 +1160,19 @@ function mt({ confirmRoute: t, setConfirmRoute: n, routes: o, routesData: s, isR
|
|
1186
1160
|
d((h) => h <= 0 ? (Me = 0, s.deadline) : (Me++, h - 1));
|
1187
1161
|
}, 1e3), () => {
|
1188
1162
|
he && clearInterval(he);
|
1189
|
-
}), [s]),
|
1163
|
+
}), [s]), l((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1190
1164
|
}
|
1191
1165
|
function pt(t, n, o) {
|
1192
1166
|
const { primaryWallet: s } = Ne(), [r, c] = N(0), b = async (d) => {
|
1193
1167
|
if (!s) return;
|
1194
|
-
const
|
1195
|
-
if (
|
1168
|
+
const a = new ze(d || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed");
|
1169
|
+
if (a)
|
1196
1170
|
try {
|
1197
1171
|
const p = new be(s.address);
|
1198
|
-
|
1172
|
+
a.onAccountChange(p, (T) => {
|
1199
1173
|
c(T.lamports / 1e9);
|
1200
1174
|
});
|
1201
|
-
const I = await
|
1175
|
+
const I = await a.getBalance(p) / 1e9;
|
1202
1176
|
c(I), o(!1);
|
1203
1177
|
} catch {
|
1204
1178
|
o(!1);
|
@@ -1222,28 +1196,28 @@ async function ht(t, n) {
|
|
1222
1196
|
});
|
1223
1197
|
let c = {};
|
1224
1198
|
for (const { account: b } of r.value) {
|
1225
|
-
const d = b.data.parsed.info.mint,
|
1226
|
-
c[d] =
|
1199
|
+
const d = b.data.parsed.info.mint, a = b.data.parsed.info.tokenAmount.uiAmount;
|
1200
|
+
c[d] = a;
|
1227
1201
|
}
|
1228
1202
|
return c;
|
1229
1203
|
}
|
1230
1204
|
function yt(t, n) {
|
1231
|
-
const [o, s] = N(0), { primaryWallet: r, setPrimaryWallet: c } = Ne(), [b, d] = N(!1),
|
1205
|
+
const [o, s] = N(0), { primaryWallet: r, setPrimaryWallet: c } = Ne(), [b, d] = N(!1), a = l((m) => m.fromChain), { address: p, isConnected: y } = ge(), I = l((m) => m.cosmosChainIds), { data: T, isConnected: P } = Oe({
|
1232
1206
|
chainId: I,
|
1233
1207
|
multiChain: !0
|
1234
|
-
}), f =
|
1208
|
+
}), f = l((m) => m.fromCoin), { data: h, isLoading: C } = O1({
|
1235
1209
|
address: p,
|
1236
1210
|
token: gt((f == null ? void 0 : f.address) || ""),
|
1237
|
-
chainId: Number((
|
1238
|
-
enabled: !!((
|
1211
|
+
chainId: Number((a == null ? void 0 : a.chainId) || 0),
|
1212
|
+
enabled: !!((a.networkType == "evm" || n) && p && (p != null && p.length))
|
1239
1213
|
}), {
|
1240
1214
|
data: A,
|
1241
1215
|
isLoading: v,
|
1242
1216
|
isFetching: Z,
|
1243
1217
|
isInitialLoading: H,
|
1244
1218
|
isRefetching: re
|
1245
|
-
} =
|
1246
|
-
chainId: [
|
1219
|
+
} = l1({
|
1220
|
+
chainId: [a.chainId],
|
1247
1221
|
multiChain: !0
|
1248
1222
|
});
|
1249
1223
|
async function L(m) {
|
@@ -1276,13 +1250,13 @@ function yt(t, n) {
|
|
1276
1250
|
const k = new be(r.address);
|
1277
1251
|
k && (_ = m.onAccountChange(k, (M) => {
|
1278
1252
|
var F;
|
1279
|
-
|
1253
|
+
a.networkType == "sol" && (r != null && r.address) && (((F = f == null ? void 0 : f.symbol) == null ? void 0 : F.toLowerCase()) === "sol" ? L() : a.chainId === "eclipse-svm" ? f.symbol == "ETH" ? L("https://eclipse.lgns.net/") : R("https://eclipse.lgns.net/") : R());
|
1280
1254
|
}));
|
1281
1255
|
}
|
1282
|
-
B(() => ((
|
1256
|
+
B(() => ((a == null ? void 0 : a.networkType) === "sol" && J(), async () => {
|
1283
1257
|
if (!r) return;
|
1284
1258
|
(await r.connector.getPublicClient()).removeAccountChangeListener(_);
|
1285
|
-
}), [r == null ? void 0 : r.address,
|
1259
|
+
}), [r == null ? void 0 : r.address, a == null ? void 0 : a.networkType, f]);
|
1286
1260
|
async function g(m) {
|
1287
1261
|
var M, F;
|
1288
1262
|
let k = A[m] || A;
|
@@ -1296,37 +1270,37 @@ function yt(t, n) {
|
|
1296
1270
|
}
|
1297
1271
|
return B(() => {
|
1298
1272
|
var m;
|
1299
|
-
|
1300
|
-
}, [
|
1273
|
+
a.networkType == "sol" && (r != null && r.address) ? ((m = f == null ? void 0 : f.symbol) == null ? void 0 : m.toLowerCase()) === "sol" ? L() : a.chainId == "eclipse-svm" ? f.symbol == "ETH" ? L("https://eclipse.lgns.net/") : R("https://eclipse.lgns.net/") : R() : a.networkType == "evm" && p && (p != null && p.length) ? s(Number((h == null ? void 0 : h.formatted) || 0)) : a.networkType == "cosmos" && P && !v && g(a == null ? void 0 : a.chainId);
|
1274
|
+
}, [a.networkType, a == null ? void 0 : a.chainId, f.symbol, f == null ? void 0 : f.address, h, p, r == null ? void 0 : r.address, p, P, v, t]), {
|
1301
1275
|
getbal: o,
|
1302
|
-
isBalanceLoading: (
|
1276
|
+
isBalanceLoading: (a == null ? void 0 : a.networkType) == "sol" || (a == null ? void 0 : a.networkType) == "cosmos" ? b : (a == null ? void 0 : a.networkType) == "evm" ? C : !1
|
1303
1277
|
};
|
1304
1278
|
}
|
1305
|
-
const Ct = de.lazy(() => import("./SwapAsset-
|
1279
|
+
const Ct = de.lazy(() => import("./SwapAsset-CU5YEZ75.js")), vt = de.lazy(() => import("./InputComp-DQBDoD71.js")), kt = de.lazy(() => import("./QuotesProgress-CTlZ7elT.js")), Nt = de.lazy(() => import("./TxnButton-CfruxaOs.js")), Tt = de.lazy(() => import("./index-B8BzdUYX.js").then((t) => t.i)), It = de.lazy(() => import("./index-Bknn7U1s.js")), Bt = de.lazy(() => import("./LoadRoute-42ZgErfe.js")), At = de.lazy(() => import("./AllRoutes-pVn5r2AF.js"));
|
1306
1280
|
function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
1307
1281
|
var Ge, Ke, Je, qe, Xe, Qe, We;
|
1308
|
-
const [s, r] = N(), [c, b] = N(!1), [d,
|
1282
|
+
const [s, r] = N(), [c, b] = N(!1), [d, a] = N(!1), [p, y] = N(!1), [I, T] = N(!1), [P, f] = N("all"), [h, C] = N(!1), { primaryWallet: A } = Ne();
|
1309
1283
|
$1();
|
1310
1284
|
const { address: v } = ge(), { address: Z } = i1(), { getbal: H, isBalanceLoading: re } = yt(h), { data: L, isConnected: R } = Oe({ chainId: "cosmoshub-4" });
|
1311
|
-
|
1312
|
-
const _ =
|
1313
|
-
|
1314
|
-
const Te =
|
1285
|
+
l((i) => i.configuration);
|
1286
|
+
const _ = l((i) => i.persist), J = l((i) => i.setPersist), g = l((i) => i.route), m = l((i) => i.fromChain), k = l((i) => i.toChain), M = l((i) => i.fromCoin), F = l((i) => i.toCoin), x = l((i) => i.setFromChain), O = l((i) => i.setToChain), $ = l((i) => i.setFromCoin), E = l((i) => i.setToCoin), j = l((i) => i.amount), V = l((i) => i.setAmount), ie = l((i) => i.customWallet);
|
1287
|
+
l((i) => i.setToDisconnect);
|
1288
|
+
const Te = l((i) => i.setCosmosChainIds), Y = l((i) => i.customFee), G = l((i) => i.broadCastMode), Q = l((i) => i.evmGas), z = l((i) => i.evmSpeed), Ie = l((i) => i.slippage), ye = l((i) => i.option), Be = l((i) => i.setCustomWallet), Ae = l((i) => i.setSelectedProvider), { balanceSol: w } = pt(m, h, Re), { suggestAndConnectAsync: D } = S1(), ee = !!(j.length && m.chain.length && M.coin.length && k.chain.length && F.coin.length && !p && I), le = ["routes", v, m, k, M, F, j, A == null ? void 0 : A.address, Z, ie, L == null ? void 0 : L.bech32Address, Y, Q, z, Ie, G, ye.value];
|
1315
1289
|
let oe = (G === "Priority Fee" || G === "Both") && (Y != null && Y.length) ? Y : ye.value, se = (G === "Jito Tip" || G === "Both") && (Y != null && Y.length) ? Y : ye.value, q = Q != null && Q.length ? Q : z.value;
|
1316
1290
|
const W = (m == null ? void 0 : m.networkType) === "sol" ? G === "Priority Fee" ? `&solanaPriorityFee=${oe}` : G === "Jito Tip" ? `&solanaJitoTip=${se}` : `&solanaPriorityFee=${oe}&solanaJitoTip=${se}` : (m == null ? void 0 : m.networkType) === "evm" ? `&evmPriorityFee=${q}` : "", { getWallet: U, refetch: te } = ke({}), { routes: S, routesData: X, setRoutesData: ce, errorMessage: ne, setErrorMessage: Ce } = J1({
|
1317
1291
|
enabled: ee,
|
1318
|
-
dependency:
|
1292
|
+
dependency: le,
|
1319
1293
|
payload: [(m == null ? void 0 : m.networkType) === "cosmos" ? t1(L == null ? void 0 : L.bech32Address, (Ge = m == null ? void 0 : m.chainInfo) == null ? void 0 : Ge.bech32Config.bech32PrefixAccAddr) : ((Ke = U(m)) == null ? void 0 : Ke.address) || "", m, k, M, F, j, Number(Ie) * 100, (ie == null ? void 0 : ie.length) > 30 ? ((Je = U({})) == null ? void 0 : Je.address) || "" : (k == null ? void 0 : k.networkType) === "cosmos" ? t1(L == null ? void 0 : L.bech32Address, (qe = k == null ? void 0 : k.chainInfo) == null ? void 0 : qe.bech32Config.bech32PrefixAccAddr) : ((Xe = U(k)) == null ? void 0 : Xe.address) || "", W]
|
1320
|
-
}),
|
1321
|
-
queryKey: ["balance",
|
1322
|
-
queryFn: async () => await (await Ve.fetchBalance(
|
1323
|
-
enabled: !!((Qe =
|
1294
|
+
}), ae = U(m), we = a1({
|
1295
|
+
queryKey: ["balance", ae == null ? void 0 : ae.address, m],
|
1296
|
+
queryFn: async () => await (await Ve.fetchBalance(ae.address, m.chainId)).json(),
|
1297
|
+
enabled: !!((Qe = ae == null ? void 0 : ae.address) != null && Qe.length && m.chainId),
|
1324
1298
|
refetchOnWindowFocus: !1
|
1325
1299
|
}), { quoteTimer: je } = mt({
|
1326
1300
|
routes: S,
|
1327
1301
|
routesData: X,
|
1328
1302
|
confirmRoute: d,
|
1329
|
-
setConfirmRoute:
|
1303
|
+
setConfirmRoute: a,
|
1330
1304
|
isRoutesEnabled: ee,
|
1331
1305
|
fetchBalance: we
|
1332
1306
|
});
|
@@ -1373,7 +1347,7 @@ function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1373
1347
|
b(!c);
|
1374
1348
|
}
|
1375
1349
|
function He(i) {
|
1376
|
-
|
1350
|
+
a(typeof i < "u" ? i : !d);
|
1377
1351
|
}
|
1378
1352
|
function Re(i) {
|
1379
1353
|
C(i);
|
@@ -1429,7 +1403,7 @@ function jt({ handleShowWallet: t, showWallet: n, fetchChains: o }) {
|
|
1429
1403
|
/* @__PURE__ */ e(vt, { amount: j, setAmount: V, fetchBalance: we, getCoinBalance: H, isBalanceLoading: re }),
|
1430
1404
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Bt, { routes: S, handleShowAllRoutes: Ze, routesData: X, amount: j, isRoutesEnabled: I, price: ((X == null ? void 0 : X.outputAmountDisplay) || "") * ((F == null ? void 0 : F.lastPrice) || 0) }) }),
|
1431
1405
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (ne == null ? void 0 : ne.error) == "string" ? ne == null ? void 0 : ne.error : "" }),
|
1432
|
-
/* @__PURE__ */ e(kt, { routes: S, routesData: X, confirmRoute: d, setConfirmRoute:
|
1406
|
+
/* @__PURE__ */ e(kt, { routes: S, routesData: X, confirmRoute: d, setConfirmRoute: a, isRoutesEnabled: ee, quoteTimer: je }),
|
1433
1407
|
/* @__PURE__ */ e(Nt, { routesData: X, handleSuccess: Re, routes: S, fetchBalancePrev: we, amount: j, isAmountTyped: I, handleShowWallet: t, setConnectWalletField: f, handleConfirmClose: He, balanceSol: w, getCoinBalance: H })
|
1434
1408
|
] }) : /* @__PURE__ */ e(It, { handleConfirmClose: He, amount: j, routesData: X, resetAmount: v1, routes: S, handleStopRoute: ve, resetBalance: C1 }) }) });
|
1435
1409
|
}
|