@blockend/widget 1.0.60-beta.1 → 1.0.61
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-B-tqwmhZ.js → AllRoutes-BqW5S4_J.js} +9 -9
- package/dist/AllRoutes-CIe7ZLbW.js +2209 -0
- package/dist/{Box-B9dKcT71.js → Box-Dw7IJo3D.js} +14 -14
- package/dist/Box-QpYIDD-V.js +54 -0
- package/dist/EstGas-C_ldluj6.js +1576 -0
- package/dist/EstGas-Dpwt2-50.js +1574 -0
- package/dist/{Grow-DGNIagcL.js → Grow-DjneaPQY.js} +28 -28
- package/dist/Grow-L7kyPhbh.js +1656 -0
- package/dist/{InputComp-C0BYsYO2.js → InputComp-CWH4SAk7.js} +3 -3
- package/dist/InputComp-Dl4M7E5v.js +105 -0
- package/dist/{LoadRoute-BejmZs2l.js → LoadRoute-Cafzlcfy.js} +4 -4
- package/dist/LoadRoute-cBSl34Bs.js +125 -0
- package/dist/{QuotesProgress-DUtmb0H1.js → QuotesProgress-Covy7wmW.js} +1 -1
- package/dist/QuotesProgress-CxJUoCPy.js +28 -0
- package/dist/{SwapAsset-C6q38SfB.js → SwapAsset-BqXVX_DR.js} +1 -1
- package/dist/SwapAsset-CkRat7Ok.js +51 -0
- package/dist/Tooltip-3YpYU_vO.js +572 -0
- package/dist/{Tooltip-B9eQU87E.js → Tooltip-D2kKNQ0U.js} +3 -3
- package/dist/TxnButton-CPMFPFA_.js +222 -0
- package/dist/{TxnButton-B7erQoe9.js → TxnButton-mfwy-EoQ.js} +5 -6
- package/dist/{add-BDXnG29B.js → add-CRY8asYF.js} +1 -1
- package/dist/add-Dfrw-dUV.js +19 -0
- package/dist/{all-wallets-A5aRDDSX.js → all-wallets-DOnIRIv0.js} +1 -1
- package/dist/all-wallets-Dw10lWJZ.js +10 -0
- package/dist/{app-store-CRNlWthG.js → app-store-C0M9hC1B.js} +1 -1
- package/dist/app-store-DJiZFSCr.js +21 -0
- package/dist/{apple-Bk9AlpJi.js → apple-Bv7oA5AQ.js} +1 -1
- package/dist/apple-kMZGS4AC.js +22 -0
- package/dist/{arrow-bottom-Wyw-Sjsd.js → arrow-bottom-D4arnome.js} +1 -1
- package/dist/arrow-bottom-DgmWrLqf.js +12 -0
- package/dist/{arrow-bottom-circle-F5a-Pm5A.js → arrow-bottom-circle-BUny4yP8.js} +1 -1
- package/dist/arrow-bottom-circle-C7iPKwzW.js +15 -0
- package/dist/{arrow-left-xa8Yhbw7.js → arrow-left-DImJbKZs.js} +1 -1
- package/dist/arrow-left-Dol642VI.js +12 -0
- package/dist/{arrow-right-DHehfJb9.js → arrow-right-BvRPNX9F.js} +1 -1
- package/dist/arrow-right-CMwyPVT7.js +12 -0
- package/dist/{arrow-top-Zr4NTjGQ.js → arrow-top-1RWPJImu.js} +1 -1
- package/dist/arrow-top-kn9xtx92.js +12 -0
- package/dist/{bank-hQuILOEh.js → bank-C0t9JpLj.js} +1 -1
- package/dist/bank-DK-FvDfd.js +18 -0
- package/dist/{basic-DtnxLRWd.js → basic-Sejv2JvX.js} +3 -3
- package/dist/basic-VfgwBHn1.js +5783 -0
- package/dist/{browser-DdzWWRtF.js → browser-0d0uw45D.js} +1 -1
- package/dist/browser-BzT1ACe9.js +18 -0
- package/dist/{card-CgYBeEF3.js → card-BBByykfy.js} +1 -1
- package/dist/card-DqDM55a-.js +18 -0
- package/dist/{ccip-fwzPvAXp.js → ccip-8__szz9Q.js} +1 -1
- package/dist/ccip-BPZSey8I.js +228 -0
- package/dist/{checkmark-CRSJVI7P.js → checkmark-B_osdsm_.js} +1 -1
- package/dist/checkmark-DEKH6rOS.js +15 -0
- package/dist/{checkmark-bold-Chu-2qTS.js → checkmark-bold-BEzepFY4.js} +1 -1
- package/dist/checkmark-bold-Dzv2hN2Q.js +12 -0
- package/dist/{chevron-bottom-CWuEnub2.js → chevron-bottom-Bdaxlaxc.js} +1 -1
- package/dist/chevron-bottom-CXdHWe0F.js +12 -0
- package/dist/{chevron-left-h2_syVI8.js → chevron-left-2aCeqxdm.js} +1 -1
- package/dist/chevron-left-CeuFz3M9.js +12 -0
- package/dist/{chevron-right-Ct4j2Leu.js → chevron-right-BPgQeMPz.js} +1 -1
- package/dist/chevron-right-DikqbHjp.js +12 -0
- package/dist/{chevron-top-DcBzaR2h.js → chevron-top-BskFpgMP.js} +1 -1
- package/dist/chevron-top-CjCScawp.js +12 -0
- package/dist/{chrome-store-CXn4JMj-.js → chrome-store-CxhEG2Jk.js} +1 -1
- package/dist/chrome-store-DaP5Y4w2.js +65 -0
- package/dist/{clock-JZPADmeK.js → clock-BDgHn083.js} +1 -1
- package/dist/clock-BzjZWK68.js +12 -0
- package/dist/{close-DtXi8BhO.js → close-CQTa1LZg.js} +1 -1
- package/dist/close-Dqncm2nY.js +12 -0
- package/dist/{coinPlaceholder-BK6alFNE.js → coinPlaceholder-B-NSV729.js} +1 -1
- package/dist/coinPlaceholder-BExfa33b.js +12 -0
- package/dist/{compass-DWhtsJev.js → compass-BdJmk2w2.js} +1 -1
- package/dist/compass-C1H_fht-.js +12 -0
- package/dist/{copy-D-MDSgUX.js → copy-Cg4vgr82.js} +1 -1
- package/dist/copy-DPMVX3yZ.js +19 -0
- package/dist/{core-BwKgmZsH.js → core-BSwMFU2B.js} +6124 -4570
- package/dist/core-BYOwnw_B.js +16521 -0
- package/dist/{cursor-Dh3mFu9G.js → cursor-BoD_rq0f.js} +1 -1
- package/dist/{cursor-transparent-NB0LxFUO.js → cursor-transparent-Dqs1kXcb.js} +1 -1
- package/dist/cursor-transparent-IQlZspwQ.js +16 -0
- package/dist/cursor-ybJpiPr6.js +7 -0
- package/dist/{desktop-BgF9XEMs.js → desktop-BOxkTik1.js} +1 -1
- package/dist/desktop-WMYv3b4Q.js +13 -0
- package/dist/{disconnect-Dq0GPLgW.js → disconnect-CTxFyZWa.js} +1 -1
- package/dist/disconnect-eMeec26w.js +12 -0
- package/dist/{discord-Dx0EuHuU.js → discord-BJRxIhBt.js} +1 -1
- package/dist/discord-CpTo4KnZ.js +21 -0
- package/dist/{down-D_76LJ5o.js → down-372J_rRV.js} +2 -2
- package/dist/down-hvB7J3FG.js +622 -0
- package/dist/{etherscan-CNIjXg_f.js → etherscan-CyQf5MH5.js} +1 -1
- package/dist/etherscan-DQ1h54d3.js +10 -0
- package/dist/{exclamation-triangle-Bhp8mAG7.js → exclamation-triangle-DFOXjtuI.js} +1 -1
- package/dist/exclamation-triangle-DzKs0-30.js +8 -0
- package/dist/{extension-BKqqIj7b.js → extension-XiWSr1Ku.js} +1 -1
- package/dist/extension-ep1TEUSD.js +12 -0
- package/dist/{external-link-DbGPs34E.js → external-link-CYjbHRDY.js} +1 -1
- package/dist/external-link-DRzzevt_.js +12 -0
- package/dist/{facebook-DRG1zLmw.js → facebook-DhP37m2R.js} +1 -1
- package/dist/facebook-eXS31CP5.js +30 -0
- package/dist/{farcaster-DDWwjMH9.js → farcaster-C1J2oGt2.js} +1 -1
- package/dist/farcaster-f0EPKy4w.js +16 -0
- package/dist/{filters-Bj10QvW6.js → filters-C5jLy9GP.js} +1 -1
- package/dist/filters-RqawLZYy.js +12 -0
- package/dist/{getChainIds-eeGoWwbI.js → getChainIds-AaKb_MmO.js} +2 -2
- package/dist/getChainIds-DXEtLb1g.js +1888 -0
- package/dist/{getCosmosAddress-DlgoXFw9.js → getCosmosAddress-D-F7jz-d.js} +1876 -1925
- package/dist/getCosmosAddress-X_cfoAnv.js +9517 -0
- package/dist/{github-ZPlB-Utk.js → github-CJ8g1by7.js} +1 -1
- package/dist/github-d1vUfc1B.js +22 -0
- package/dist/{google-CCKsdggZ.js → google-DpIVCnNm.js} +1 -1
- package/dist/google-Dtcfyt4F.js +22 -0
- package/dist/{hamburger-DPe9Xfjf.js → hamburger-BylLGawu.js} +5 -5
- package/dist/hamburger-DezZOKRv.js +3915 -0
- package/dist/{help-circle-IpogiYkd.js → help-circle-BESCFGIa.js} +1 -1
- package/dist/help-circle-BTpSg7wr.js +16 -0
- package/dist/{id--1TM5fr0.js → id-CPX0IEMo.js} +1 -1
- package/dist/id-CV-pIIiZ.js +16 -0
- package/dist/{image-DUfvu2wM.js → image-DrFHyQOS.js} +1 -1
- package/dist/image-n7ODnWNp.js +8 -0
- package/dist/{index-DThyqr43.js → index-BDezoD7C.js} +1 -1
- package/dist/{index-BEzLzd5e.js → index-BOd8pd8c.js} +11 -11
- package/dist/index-BYmiFoJh.js +29495 -0
- package/dist/{index-BqAYNgz8.js → index-BheqnLKf.js} +78 -78
- package/dist/{index-CIxU6QQf.js → index-C7McnY5R.js} +2604 -2625
- package/dist/{index-C5XuDvkl.js → index-CI-V1HdQ.js} +587 -578
- package/dist/index-CSgWo9Cg.js +6713 -0
- package/dist/index-CViW2kjE.js +13547 -0
- package/dist/index-CoV9zQx1.js +992 -0
- package/dist/{index-BAuHi89Z.js → index-D0J1OD73.js} +3104 -3031
- package/dist/index-DO14DPs3.js +6713 -0
- package/dist/{index-BThpYFL-.js → index-D_8iklL2.js} +351 -372
- package/dist/{index-Bb3Owdat.js → index-DhZwdjPQ.js} +2 -2
- package/dist/index-DjHDqI7m.js +206 -0
- package/dist/{index-HXseE2Nv.js → index-DoNokw4Q.js} +1 -1
- package/dist/index-GlSAE8hE.js +472 -0
- package/dist/index-H7ThVJwV.js +3267 -0
- package/dist/index-Pni0gIii.js +206 -0
- package/dist/index-TEYMoNwP.js +9 -0
- package/dist/index-VS3sEqmI.js +330 -0
- package/dist/index-ePnYqYhf.js +1483 -0
- package/dist/index-eatshJSd.js +18509 -0
- package/dist/{index.es-D28h__ZD.js → index.es-B95K0DgG.js} +1 -1
- package/dist/index.es-BzyBckd_.js +366 -0
- package/dist/index.es-CMvE7ghR.js +14904 -0
- package/dist/index.es-gTtSa0r5.js +14904 -0
- package/dist/index.es.js +1 -1
- package/dist/{info-CRK9yM3q.js → info-DB9XS3BU.js} +1 -1
- package/dist/info-DWZmKXfC.js +7 -0
- package/dist/{info-circle-DroAdDav.js → info-circle-BVB8s9W_.js} +1 -1
- package/dist/info-circle-Bk9rpQzz.js +16 -0
- package/dist/{lightbulb-DGwzaoxs.js → lightbulb-C0eiLvuS.js} +1 -1
- package/dist/lightbulb-CUDopurR.js +7 -0
- package/dist/{mail-BQSCf__h.js → mail-CYcc9yZZ.js} +1 -1
- package/dist/mail-Df9wlUBz.js +12 -0
- package/dist/{mobile-4chCtN_4.js → mobile-Cvm9Skqq.js} +1 -1
- package/dist/mobile-DcoUJktC.js +13 -0
- package/dist/{more-uiMKzNjJ.js → more-B-UvO1Yo.js} +1 -1
- package/dist/more-DbsAB7Xx.js +15 -0
- package/dist/{network-placeholder-CVOcWHRh.js → network-placeholder-C8QNcwPf.js} +1 -1
- package/dist/network-placeholder-CnHZLxGT.js +18 -0
- package/dist/{nftPlaceholder-CakfkypA.js → nftPlaceholder-C_LU9tT5.js} +1 -1
- package/dist/nftPlaceholder-D7igGAAq.js +12 -0
- package/dist/{off-CoYWNQqe.js → off-BEQbMYBZ.js} +1 -1
- package/dist/off-Brms9nN7.js +12 -0
- package/dist/{play-store-q5l7DaBe.js → play-store-CEopCauM.js} +1 -1
- package/dist/play-store-z4z-boXn.js +36 -0
- package/dist/{plus-CR0bo3Ss.js → plus-CtEYHV2t.js} +1 -1
- package/dist/plus-LkrIZJEQ.js +17 -0
- package/dist/{qr-code-FNoqG2yJ.js → qr-code-BhmZxeo_.js} +1 -1
- package/dist/qr-code-CZnYaNoE.js +10 -0
- package/dist/{recycle-horizontal-BsU3dW8b.js → recycle-horizontal-CF9eqICi.js} +1 -1
- package/dist/recycle-horizontal-CeGotUdv.js +13 -0
- package/dist/{refresh-DyJzaQLK.js → refresh-Bm3plkBE.js} +1 -1
- package/dist/refresh-CKhWU1dQ.js +12 -0
- package/dist/{reown-logo-BFbpXVCB.js → reown-logo-8S9ZN_-T.js} +1 -1
- package/dist/reown-logo-CF2Qkyw1.js +16 -0
- package/dist/{search-CoIHCx8n.js → search-DNcA47oY.js} +1 -1
- package/dist/search-DyuAYb_-.js +12 -0
- package/dist/{send-CT0RLtYP.js → send-B0S9gHH6.js} +1 -1
- package/dist/send-BbBOjlsM.js +19 -0
- package/dist/{swapHorizontal-2UEy_VbL.js → swapHorizontal-BuTPPB8N.js} +1 -1
- package/dist/swapHorizontal-DA7yhPfV.js +12 -0
- package/dist/{swapHorizontalBold-BwLgMdQd.js → swapHorizontalBold-BnB-fpce.js} +1 -1
- package/dist/swapHorizontalBold-BujZxwgY.js +12 -0
- package/dist/{swapHorizontalMedium-Wwd3Subk.js → swapHorizontalMedium-9QnwwjJD.js} +1 -1
- package/dist/swapHorizontalMedium-hEBn_MJv.js +20 -0
- package/dist/{swapHorizontalRoundedBold-CbSALTi8.js → swapHorizontalRoundedBold-C83mxp3u.js} +1 -1
- package/dist/swapHorizontalRoundedBold-Cqg1Na-5.js +12 -0
- package/dist/{swapVertical-B5GizA1j.js → swapVertical-BAz7hmKO.js} +1 -1
- package/dist/swapVertical-D1CdGHJt.js +12 -0
- package/dist/{telegram-BtJEmiFh.js → telegram-BMT9bLfw.js} +1 -1
- package/dist/telegram-dDQ2sOw5.js +20 -0
- package/dist/{three-dots-Bel3OYRL.js → three-dots-DuhUrXKI.js} +1 -1
- package/dist/three-dots-ltDeu1Xu.js +9 -0
- package/dist/{twitch-iJUsxLGs.js → twitch-ClsoABSi.js} +1 -1
- package/dist/twitch-sBusnrAt.js +22 -0
- package/dist/{twitterIcon-5Bw6TNyI.js → twitterIcon-B9n98fnH.js} +1 -1
- package/dist/twitterIcon-BKMgaEZ4.js +10 -0
- package/dist/{unsupportedProp-CtBHkzVs.js → unsupportedProp-BXmR-9gT.js} +1 -1
- package/dist/unsupportedProp-P9y3_0om.js +10 -0
- package/dist/{useRegisterError-UVP98oC5.js → useRegisterError-DGMdKFc9.js} +1544 -1538
- package/dist/useRegisterError-DVG0sgLq.js +8918 -0
- package/dist/{verify-9NPblyAz.js → verify-BHTa1Niv.js} +1 -1
- package/dist/verify-DXzijLDZ.js +12 -0
- package/dist/{verify-filled-BNVhfPkW.js → verify-filled-CqobBYuI.js} +1 -1
- package/dist/verify-filled-DnKqj8X5.js +12 -0
- package/dist/{w3m-modal-BoPsPieM.js → w3m-modal-B7akV0Kp.js} +2 -2
- package/dist/w3m-modal-Cc1j8j_E.js +1471 -0
- package/dist/{wallet-DTIql0UA.js → wallet-ObJy7yZR.js} +1 -1
- package/dist/{wallet-placeholder-DXx_YU8N.js → wallet-placeholder-BxVrKpEz.js} +1 -1
- package/dist/wallet-placeholder-DEsjd5Nv.js +18 -0
- package/dist/wallet-zL6TDKIa.js +12 -0
- package/dist/{walletconnect-9eJmse3N.js → walletconnect-CYJbrPQQ.js} +1 -1
- package/dist/walletconnect-CZz6e0wy.js +36 -0
- package/dist/{warning-circle-B3zxM-8-.js → warning-circle-DOwgDOgL.js} +1 -1
- package/dist/warning-circle-DsGlg2MF.js +16 -0
- package/dist/widget.css +1 -1
- package/dist/{x-EqjvjF0s.js → x-B03u0kWD.js} +1 -1
- package/dist/x-MwPhq03Y.js +16 -0
- package/package.json +2 -1
- package/dist/EstGas-ZNdT7ZNT.js +0 -20281
- package/dist/index-Ds5cL5Tm.js +0 -160
- package/dist/index-Wj3B2hZ5.js +0 -206
- package/dist/index.es-DhjmbcLt.js +0 -13234
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as p, jsx as e, Fragment as
|
2
|
-
import
|
3
|
-
import { B as
|
4
|
-
import { u as
|
5
|
-
import { C as t1, M as
|
6
|
-
import { useQuery as
|
7
|
-
import { useAccount as
|
8
|
-
import { useDynamicContext as
|
9
|
-
import { S as
|
10
|
-
import { u as
|
11
|
-
import { useAccount as Oe, useStargateClient as
|
12
|
-
import { S as
|
13
|
-
import { R as
|
14
|
-
import { C as
|
1
|
+
import { jsxs as p, jsx as e, Fragment as J } from "react/jsx-runtime";
|
2
|
+
import de, { useState as v, useEffect as j, useRef as B1, Suspense as A1 } from "react";
|
3
|
+
import { B as j1, i as Ee, u as ke, F as e1, f as $e, C as Se, W as i1 } from "./useRegisterError-DVG0sgLq.js";
|
4
|
+
import { u as c, l as pe, a as Ve, c as _e, S as L1, M as P1 } from "./index-D0J1OD73.js";
|
5
|
+
import { C as t1, M as F1, g as n1 } from "./getChainIds-AaKb_MmO.js";
|
6
|
+
import { useQuery as c1 } from "@tanstack/react-query";
|
7
|
+
import { useAccount as ge, useConnect as M1, useConnections as E1, useBalance as O1 } from "wagmi";
|
8
|
+
import { useDynamicContext as Ne, useIsLoggedIn as R1 } from "@dynamic-labs/sdk-react-core";
|
9
|
+
import { S as $1 } from "./shareicon-CG3v7iKI.js";
|
10
|
+
import { u as S1, B as _1 } from "./index-GlSAE8hE.js";
|
11
|
+
import { useAccount as Oe, useStargateClient as l1, useSuggestChainAndConnect as V1, WalletType as z1 } from "graz";
|
12
|
+
import { S as Z1, D as H1 } from "./down-hvB7J3FG.js";
|
13
|
+
import { R as G1 } from "./index-CDq3vNnP.js";
|
14
|
+
import { C as ze, P as be, u as K1, g as r1 } from "./getCosmosAddress-X_cfoAnv.js";
|
15
15
|
function b1({ fill: t }) {
|
16
16
|
return /* @__PURE__ */ p(
|
17
17
|
"svg",
|
@@ -46,8 +46,8 @@ function b1({ fill: t }) {
|
|
46
46
|
}
|
47
47
|
);
|
48
48
|
}
|
49
|
-
function
|
50
|
-
const [r,
|
49
|
+
function J1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
50
|
+
const [r, l] = v(t), [b, d] = v(""), { tick: i, defaultCoin: g } = Ee;
|
51
51
|
return /* @__PURE__ */ p("div", { children: [
|
52
52
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
53
53
|
/* @__PURE__ */ e(
|
@@ -57,7 +57,7 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
57
57
|
n();
|
58
58
|
},
|
59
59
|
className: "bw-absolute bw-left-0 bw-top-[25%]",
|
60
|
-
children: /* @__PURE__ */ e(
|
60
|
+
children: /* @__PURE__ */ e(j1, { fill: "var(--tw-text-secondary)" })
|
61
61
|
}
|
62
62
|
),
|
63
63
|
/* @__PURE__ */ e("div", { className: "bw-text-base bw-font-normal bw-text-text-secondary", children: "Network" })
|
@@ -106,7 +106,7 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
106
106
|
/* @__PURE__ */ e("img", { src: (B = x.image) != null && B.length ? x.image : g, className: "bw-rounded-[50%] bw-border bw-border-border-primary", width: 25, height: 25, alt: "img" }),
|
107
107
|
" ",
|
108
108
|
/* @__PURE__ */ e("p", { children: x.name }),
|
109
|
-
o.chain === x.name ? /* @__PURE__ */ e("img", { src:
|
109
|
+
o.chain === x.name ? /* @__PURE__ */ e("img", { src: i, width: 10, height: 10, alt: "img" }) : /* @__PURE__ */ e(J, {})
|
110
110
|
] }),
|
111
111
|
/* @__PURE__ */ p("div", { className: "bw-pr-2", children: [
|
112
112
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal", children: "Tokens" }),
|
@@ -119,34 +119,32 @@ function X1({ data: t, handleBack: n, handleSetChainData: s, network: o }) {
|
|
119
119
|
}) })
|
120
120
|
] });
|
121
121
|
}
|
122
|
-
const
|
123
|
-
gradientbackground:
|
124
|
-
overlay:
|
122
|
+
const q1 = "_gradientbackground_7x8s8_1", X1 = "_overlay_7x8s8_5", s1 = {
|
123
|
+
gradientbackground: q1,
|
124
|
+
overlay: X1
|
125
125
|
};
|
126
|
-
function
|
126
|
+
function Q1(t) {
|
127
127
|
let n = t.match(/[1-9A-HJ-NP-Za-km-z]{32,44}/);
|
128
128
|
return t.slice(0, 2) === "0x" ? !0 : n ? t == n : !1;
|
129
129
|
}
|
130
|
-
function
|
131
|
-
const [n, s] = v({}), o =
|
130
|
+
function U1(t) {
|
131
|
+
const [n, s] = v({}), o = c((i) => i.cosmosChainIds), { data: r } = Oe({
|
132
132
|
chainId: o,
|
133
133
|
multiChain: !0
|
134
|
-
}),
|
135
|
-
chainId: [(t == null ? void 0 : t.chainId) ||
|
134
|
+
}), l = c((i) => i.fromChain), { data: b } = l1({
|
135
|
+
chainId: [(t == null ? void 0 : t.chainId) || l.chainId],
|
136
136
|
multiChain: !0
|
137
137
|
});
|
138
|
-
async function d(
|
138
|
+
async function d(i) {
|
139
139
|
var g, x;
|
140
|
-
if ((g = r == null ? void 0 : r[
|
141
|
-
let B = await (b[
|
142
|
-
(x = r == null ? void 0 : r[a]) == null ? void 0 : x.bech32Address
|
143
|
-
), M = ge.keyBy(B, "denom");
|
140
|
+
if ((g = r == null ? void 0 : r[i]) != null && g.bech32Address && b) {
|
141
|
+
let B = await (b[i] || b).getAllBalances((x = r == null ? void 0 : r[i]) == null ? void 0 : x.bech32Address), M = pe.keyBy(B, "denom");
|
144
142
|
s(M);
|
145
143
|
}
|
146
144
|
}
|
147
145
|
return j(() => {
|
148
|
-
((t == null ? void 0 : t.networkType) == "cosmos" || (
|
149
|
-
}, [b,
|
146
|
+
((t == null ? void 0 : t.networkType) == "cosmos" || (l == null ? void 0 : l.networkType) == "cosmos") && d((t == null ? void 0 : t.chainId) || (l == null ? void 0 : l.chainId));
|
147
|
+
}, [b, l, t]), { cosmosBalance: n };
|
150
148
|
}
|
151
149
|
function d1(t) {
|
152
150
|
let n = t.split("/");
|
@@ -156,7 +154,7 @@ function d1(t) {
|
|
156
154
|
} else
|
157
155
|
return t;
|
158
156
|
}
|
159
|
-
function
|
157
|
+
function Y1({ fill: t }) {
|
160
158
|
return /* @__PURE__ */ p(
|
161
159
|
"svg",
|
162
160
|
{
|
@@ -191,7 +189,7 @@ function D1({ fill: t }) {
|
|
191
189
|
}
|
192
190
|
);
|
193
191
|
}
|
194
|
-
function
|
192
|
+
function W1({ selectedChain: t }) {
|
195
193
|
return /* @__PURE__ */ p("div", { className: "bw-h-[100%] bw-flex bw-flex-col bw-justify-center bw-items-center", children: [
|
196
194
|
/* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center bw-items-center", children: /* @__PURE__ */ p("div", { className: "bw-relative", children: [
|
197
195
|
t != null && t.image ? /* @__PURE__ */ e(
|
@@ -201,8 +199,8 @@ function et({ selectedChain: t }) {
|
|
201
199
|
className: "bw-w-[80px] bw-h-[80px] bw-border-border-primary bw-border-2 bw-opacity-50 bw-rounded-[50%]",
|
202
200
|
alt: "chain"
|
203
201
|
}
|
204
|
-
) : /* @__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(
|
202
|
+
) : /* @__PURE__ */ e(J, {}),
|
203
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-bg-background-container -bw-bottom-2 -bw-right-2 bw-flex bw-items-center bw-justify-center bw-rounded-full bw-border bw-border-border-primary bw-w-[44px] bw-h-[44px]", children: /* @__PURE__ */ e(Y1, { fill: "var(--tw-text-secondary)" }) })
|
206
204
|
] }) }),
|
207
205
|
/* @__PURE__ */ p("h2", { className: "bw-text-base bw-text-center bw-mt-3 bw-font-bold bw-text-text-primary", children: [
|
208
206
|
"No Tokens found on ",
|
@@ -216,84 +214,84 @@ function et({ selectedChain: t }) {
|
|
216
214
|
] })
|
217
215
|
] });
|
218
216
|
}
|
219
|
-
const
|
220
|
-
var
|
221
|
-
|
222
|
-
const d =
|
217
|
+
const D1 = de.memo(function({ selectChainState: n, value: s, handleClosePopup: o, showExchangeList: r, setCoinData: l, setChainData: b }) {
|
218
|
+
var Be, Ae;
|
219
|
+
c((u) => u.searchCustomCoin);
|
220
|
+
const d = c((u) => u.setSearchCustomCoin), { ref: i, inView: g } = S1(), { getWallet: x } = ke({}), { connected: k, address: B } = Ve(), { isConnected: M, address: F } = ge(), { primaryWallet: h } = Ne();
|
223
221
|
R1();
|
224
|
-
const m = x(n), I =
|
222
|
+
const m = x(n), I = c((u) => u.fromChain), y = c((u) => u.fromCoin), S = c((u) => u.toChain), _ = c((u) => u.toCoin), [ne, E] = v(!1), { cosmosBalance: K } = U1(n), { defaultCoin: O } = Ee, [V, f] = v(0), C = B1(null), { data: P } = Oe({
|
225
223
|
chainId: [n.chainId],
|
226
224
|
multiChain: !0
|
227
|
-
}),
|
228
|
-
|
229
|
-
const w =
|
225
|
+
}), H = (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" && B || (n == null ? void 0 : n.networkType) === "cosmos" && ((Be = P == null ? void 0 : P[n == null ? void 0 : n.chainId]) == null ? void 0 : Be.bech32Address), $ = c((u) => u.toDisconnect);
|
226
|
+
c((u) => u.setToDisconnect);
|
227
|
+
const w = c((u) => u.customWallet), T = c((u) => u.setCustomWallet), A = c((u) => u.tokens), [L, N] = v([]), [R, ae] = v([]), [Te, W] = v([]), G = A, Q = c1({
|
230
228
|
queryKey: ["balance", m == null ? void 0 : m.address, n],
|
231
|
-
queryFn: async () => await (await
|
232
|
-
enabled: !!((
|
229
|
+
queryFn: async () => await (await _e.fetchBalance(m.address, n.chainId)).json(),
|
230
|
+
enabled: !!((Ae = m == null ? void 0 : m.address) != null && Ae.length && n.chainId),
|
233
231
|
refetchOnWindowFocus: !1
|
234
232
|
});
|
235
233
|
function z(u) {
|
236
|
-
var
|
234
|
+
var re, ce, se, oe, q, U, Y, ee, Z, X, le, te;
|
237
235
|
let D = d1(u.address);
|
238
|
-
return u.networkType == "cosmos" ?
|
236
|
+
return u.networkType == "cosmos" ? $e(((re = K == null ? void 0 : K[D]) == null ? void 0 : re.amount) / Math.pow(10, u.decimals) || 0) || "" : $e((((U = (q = (oe = (se = (ce = Q.data) == null ? void 0 : ce.data) == null ? void 0 : se[n == null ? void 0 : n.networkType]) == null ? void 0 : oe[n.chainId]) == null ? void 0 : q[u.address]) == null ? void 0 : U.balance) || 0) / Math.pow(10, ((te = (le = (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[u.address]) == null ? void 0 : le.asset) == null ? void 0 : te.decimals) || 0) || 0) || "";
|
239
237
|
}
|
240
238
|
j(() => {
|
241
|
-
s.length > 40 &&
|
239
|
+
s.length > 40 && Q1(s) && !R.length ? (E(!0), d({
|
242
240
|
chainId: n.chainId,
|
243
241
|
address: s
|
244
242
|
})) : s.length || (E(!1), d({ chainId: "", address: "" }));
|
245
|
-
}, [s,
|
243
|
+
}, [s, R]), j(() => {
|
246
244
|
f(0);
|
247
245
|
}, [s]);
|
248
|
-
function
|
249
|
-
f(0),
|
246
|
+
function Ie() {
|
247
|
+
f(0), ae([]), C.current.scrollTo(0, 0);
|
250
248
|
}
|
251
249
|
j(() => {
|
252
250
|
var u, D;
|
253
|
-
|
254
|
-
}, [
|
255
|
-
|
251
|
+
G != null && G.isSuccess && (n != null && n.chainId) && N(((D = (u = G == null ? void 0 : G.data) == null ? void 0 : u.data) == null ? void 0 : D[n == null ? void 0 : n.chainId]) || []);
|
252
|
+
}, [G, n.chainId]), j(() => {
|
253
|
+
Ie();
|
256
254
|
}, [n.chainId]);
|
257
|
-
function
|
258
|
-
var
|
259
|
-
let u = (
|
260
|
-
var
|
261
|
-
return ((
|
262
|
-
})) == null ? void 0 :
|
263
|
-
if (
|
264
|
-
}), D = 20,
|
265
|
-
V == 0 ?
|
255
|
+
function ye() {
|
256
|
+
var oe;
|
257
|
+
let u = (oe = L == null ? void 0 : L.filter((q) => {
|
258
|
+
var U, Y, ee, Z;
|
259
|
+
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()));
|
260
|
+
})) == null ? void 0 : oe.sort((q, U) => {
|
261
|
+
if (H) return z(U) * U.lastPrice - z(q) * q.lastPrice;
|
262
|
+
}), D = 20, re = V * D, ce = re + D, se = u.slice(re, ce);
|
263
|
+
V == 0 ? ae([...se]) : ae([...R, ...se]);
|
266
264
|
}
|
267
265
|
return j(() => {
|
268
|
-
|
269
|
-
}, [
|
266
|
+
L != null && L.length && ye();
|
267
|
+
}, [L, s, V, H, K, Q.data]), j(() => {
|
270
268
|
g && f((u) => u + 1);
|
271
|
-
}, [g]), /* @__PURE__ */ e("div", { ref: C, className: " bw-pr-2 bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children:
|
272
|
-
var
|
269
|
+
}, [g]), /* @__PURE__ */ e("div", { ref: C, className: " bw-pr-2 bw-h-[380px] bw-mt-2 bw-overflow-y-auto", children: R && (R == null ? void 0 : R.length) > 0 ? R == null ? void 0 : R.map((u, D, re) => {
|
270
|
+
var ce, se, oe, q, U, Y;
|
273
271
|
return /* @__PURE__ */ p(
|
274
272
|
"div",
|
275
273
|
{
|
276
|
-
ref:
|
274
|
+
ref: re.length >= 20 && re.length - 1 === D ? i : null,
|
277
275
|
className: `bw-py-2
|
278
276
|
${r == "from" && _._id !== u._id || r == "to" && y._id !== u._id, ""}
|
279
277
|
bw-flex bw-items-center bw-justify-between bw-cursor-pointer bw-border-b bw-border-border-primary
|
280
278
|
|
281
279
|
}`,
|
282
280
|
onClick: async () => {
|
283
|
-
var
|
284
|
-
let
|
281
|
+
var Z, X, le, te, Ce, ie, we, je, ve, Le, Pe;
|
282
|
+
let ee = {
|
285
283
|
// ...coinData,
|
286
284
|
coin: u.symbol,
|
287
285
|
...u,
|
288
|
-
availBal: ((
|
286
|
+
availBal: ((Ce = (te = (le = (X = (Z = Q.data) == null ? void 0 : Z.data) == null ? void 0 : X[n == null ? void 0 : n.networkType]) == null ? void 0 : le[n.chainId]) == null ? void 0 : te[u.address.toLowerCase()]) == null ? void 0 : Ce.balance) / Math.pow(10, ((Pe = (Le = (ve = (je = (we = (ie = Q.data) == null ? void 0 : ie.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[u.address.toLowerCase()]) == null ? void 0 : Le.asset) == null ? void 0 : Pe.decimals) || 0)
|
289
287
|
};
|
290
|
-
|
288
|
+
l(ee), b(n), o(n, ee), (n == null ? void 0 : n.networkType) === (S == null ? void 0 : S.networkType) || (n == null || n.networkType, I == null || I.networkType, T(""));
|
291
289
|
},
|
292
290
|
children: [
|
293
291
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-items-center bw-justify-center bw-w-max bw-gap-x-2", children: [
|
294
|
-
/* @__PURE__ */ p("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(
|
295
|
-
(
|
296
|
-
(
|
292
|
+
/* @__PURE__ */ p("div", { className: `bw-relative bw-rounded-[50%] bw-w-[30px] bw-h-[30px] ${(ce = u.image) != null && ce.length ? "bw-bg-background-secondary" : ""}`, children: [
|
293
|
+
(se = u.image) != null && se.length ? /* @__PURE__ */ e("img", { src: u.image, className: "bw-rounded-[50%] bw-max-w-[30px] bw-max-h-[30px] bw-object-contain", width: 30, height: 30, alt: "img" }) : /* @__PURE__ */ e("img", { src: O, className: "bw-rounded-[50%]", width: 30, height: 30, alt: "img" }),
|
294
|
+
(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: O, className: "bw-absolute bw-bg-background-secondary bw-right-0 bw-bottom-[-4px] bw-border bw-border-border-primary bw-rounded-[50%]", width: 16, height: 16, alt: "img" })
|
297
295
|
] }),
|
298
296
|
/* @__PURE__ */ p("div", { children: [
|
299
297
|
/* @__PURE__ */ p("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
@@ -310,20 +308,20 @@ const tt = we.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
310
308
|
/* @__PURE__ */ e(
|
311
309
|
"a",
|
312
310
|
{
|
313
|
-
href: (
|
311
|
+
href: (Y = (U = n.explorer) == null ? void 0 : U.token) == null ? void 0 : Y.replace("{tokenAddress}", u.address),
|
314
312
|
target: "_blank",
|
315
|
-
onClick: (
|
316
|
-
|
313
|
+
onClick: (ee) => {
|
314
|
+
ee.stopPropagation();
|
317
315
|
},
|
318
316
|
className: "hover:bw-opacity-70",
|
319
|
-
children: /* @__PURE__ */ e(
|
317
|
+
children: /* @__PURE__ */ e($1, { fill: "var(--tw-text-secondary)" })
|
320
318
|
}
|
321
319
|
)
|
322
320
|
] })
|
323
321
|
] })
|
324
322
|
] })
|
325
323
|
] }),
|
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" && w && ((w == null ? void 0 : w.length) > 30 ||
|
324
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-right bw-font-medium bw-text-text-primary", children: r === "to" && w && ((w == null ? void 0 : w.length) > 30 || $) ? /* @__PURE__ */ e(J, {}) : Q.isFetching ? /* @__PURE__ */ e(Se, { size: 12, thickness: 4, color: "inherit" }) : H ? z(u) > 0 ? /* @__PURE__ */ p(J, { children: [
|
327
325
|
/* @__PURE__ */ e(
|
328
326
|
e1,
|
329
327
|
{
|
@@ -333,55 +331,55 @@ const tt = we.memo(function({ selectChainState: n, value: s, handleClosePopup: o
|
|
333
331
|
}
|
334
332
|
}
|
335
333
|
),
|
336
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: z(u) * u.lastPrice > 0 ? /* @__PURE__ */ p(
|
334
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-secondary bw-font-normal bw-text-xs", children: z(u) * u.lastPrice > 0 ? /* @__PURE__ */ p(J, { children: [
|
337
335
|
"$",
|
338
336
|
/* @__PURE__ */ e(
|
339
337
|
e1,
|
340
338
|
{
|
341
|
-
value:
|
339
|
+
value: $e(z(u) * u.lastPrice),
|
342
340
|
options: {
|
343
341
|
maxDecimals: 10
|
344
342
|
}
|
345
343
|
}
|
346
344
|
)
|
347
345
|
] }) : "" })
|
348
|
-
] }) : /* @__PURE__ */ e(
|
346
|
+
] }) : /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ e(J, {}) }) })
|
349
347
|
]
|
350
348
|
},
|
351
349
|
D
|
352
350
|
);
|
353
|
-
}) :
|
351
|
+
}) : ne && !(A.isLoading && A.isFetching) ? /* @__PURE__ */ e(W1, { selectedChain: n }) : !s.length && /* @__PURE__ */ e("div", { className: "bw-w-full bw-flex bw-justify-center bw-mt-4 bw-text-text-primary", children: /* @__PURE__ */ e(Se, { color: "inherit", size: 30 }) }) });
|
354
352
|
});
|
355
|
-
function
|
356
|
-
var f, C,
|
357
|
-
const [d,
|
353
|
+
function et({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coinData: r, showExchangeList: l, fetchChains: b }) {
|
354
|
+
var f, C, P, H, $;
|
355
|
+
const [d, i] = v(!1), [g, x] = v(""), k = c((w) => w.tokens), [B, M] = v([]), [F, h] = v(0), [m, I] = v({ chain: "" }), y = c((w) => w.gradient), S = c((w) => w.configuration), _ = c((w) => w.chainObj);
|
358
356
|
j(() => {
|
359
|
-
var w, T, A,
|
357
|
+
var w, T, A, L;
|
360
358
|
if ((T = (w = b.data) == null ? void 0 : w.data) != null && T.length) {
|
361
|
-
let N = [...(
|
362
|
-
N.splice(
|
359
|
+
let N = [...(L = (A = b.data) == null ? void 0 : A.data) == null ? void 0 : L.slice(0, 9)], R = N.findIndex((z) => z.chainId === "137"), ae = N.findIndex((z) => z.chainId === "324"), Te = N.findIndex((z) => z.chainId === "10"), W = N.findIndex((z) => z.chainId === "43114");
|
360
|
+
N.splice(R, 1, _[80094] || {}), N.splice(ae, 1, _[2741] || {}), N.splice(Te, 1, _["eclipse-svm"] || {}), N.splice(W, 1, _[999] || {}), !!pe.keyBy(N, "chainId")[m.chainId] || (N.pop(), N.push(m)), M(N);
|
363
361
|
}
|
364
362
|
}, [_, (f = b.data) == null ? void 0 : f.data, o, m]), j(() => {
|
365
363
|
I(o);
|
366
364
|
}, [o]), j(() => {
|
367
365
|
var w, T, A;
|
368
366
|
if ((T = (w = b.data) == null ? void 0 : w.data) != null && T.length) {
|
369
|
-
let
|
370
|
-
h(
|
367
|
+
let L = (A = b.data) == null ? void 0 : A.data.filter((N) => !0);
|
368
|
+
h(L.length);
|
371
369
|
}
|
372
370
|
}, [(C = b.data) == null ? void 0 : C.data]);
|
373
|
-
function
|
374
|
-
var A,
|
375
|
-
(A = w.chain) != null && A.length && ((
|
371
|
+
function ne(w, T) {
|
372
|
+
var A, L;
|
373
|
+
(A = w.chain) != null && A.length && ((L = T == null ? void 0 : T.coin) != null && L.length) && s();
|
376
374
|
}
|
377
375
|
function E() {
|
378
|
-
|
376
|
+
i(!1);
|
379
377
|
}
|
380
378
|
function K(w) {
|
381
379
|
I(w), x("");
|
382
380
|
}
|
383
381
|
const { tick: O, defaultCoin: V } = Ee;
|
384
|
-
return d ? /* @__PURE__ */ e(
|
382
|
+
return d ? /* @__PURE__ */ e(J1, { handleSetChainData: K, data: (P = b.data) == null ? void 0 : P.data, handleBack: E, network: m }) : /* @__PURE__ */ p(J, { children: [
|
385
383
|
/* @__PURE__ */ p("div", { children: [
|
386
384
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-justify-center bw-mb-2", children: [
|
387
385
|
/* @__PURE__ */ e(
|
@@ -395,13 +393,13 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
395
393
|
}
|
396
394
|
),
|
397
395
|
/* @__PURE__ */ p("div", { className: "bw-text-base bw-font-normal bw-text-text-secondary", children: [
|
398
|
-
|
396
|
+
l.charAt(0).toUpperCase() + l.slice(1),
|
399
397
|
" Network"
|
400
398
|
] })
|
401
399
|
] }),
|
402
400
|
b.isLoading ? /* @__PURE__ */ e(L1, { animation: "wave", variant: "rectangular", width: "100%", height: 134, className: "bw-rounded-md bw-flex bw-justify-center bw-bg-transparent bw-opacity-0 bw-items-center bw-text-text-primary" }) : /* @__PURE__ */ p("div", { className: "bw-grid bw-grid-cols-5 bw-gap-1 bw-overflow-y-auto bw-w-full", children: [
|
403
401
|
b.isSuccess && B.map((w, T) => {
|
404
|
-
var A,
|
402
|
+
var A, L;
|
405
403
|
return /* @__PURE__ */ e(
|
406
404
|
"div",
|
407
405
|
{
|
@@ -425,8 +423,8 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
425
423
|
children: [
|
426
424
|
/* @__PURE__ */ e("img", { src: (A = w.image) != null && A.length ? w.image : V, width: 25, className: "bw-rounded-[50%] bw-border bw-border-border-primary", height: 25, alt: "img" }),
|
427
425
|
" ",
|
428
|
-
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${m.name == w.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((
|
429
|
-
(m == null ? void 0 : m.chain) == w ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: O }) : /* @__PURE__ */ e(
|
426
|
+
/* @__PURE__ */ e("p", { className: `bw-text-xs bw-text-center ${m.name == w.name ? "bw-text-text-primary bw-font-semibold" : "bw-text-text-primary bw-font-normal"}`, children: ((L = w.name) == null ? void 0 : L.length) > 7 ? w.name.substring(0, 7) + ".." : w.name }),
|
427
|
+
(m == null ? void 0 : m.chain) == w ? /* @__PURE__ */ e("img", { width: 10, height: 10, src: O }) : /* @__PURE__ */ e(J, {})
|
430
428
|
]
|
431
429
|
},
|
432
430
|
T
|
@@ -439,16 +437,16 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
439
437
|
"div",
|
440
438
|
{
|
441
439
|
onClick: () => {
|
442
|
-
|
440
|
+
i(!0);
|
443
441
|
},
|
444
442
|
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
443
|
style: { cursor: "pointer" },
|
446
444
|
children: [
|
447
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-medium bw-text-text-primary", children: (
|
445
|
+
/* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-medium bw-text-text-primary", children: ($ = (H = b.data) == null ? void 0 : H.data) != null && $.length ? `+${F - 9}` : "0" }),
|
448
446
|
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-text-text-primary", children: "Networks" })
|
449
447
|
]
|
450
448
|
}
|
451
|
-
) }) : /* @__PURE__ */ e(
|
449
|
+
) }) : /* @__PURE__ */ e(J, {})
|
452
450
|
] })
|
453
451
|
] }),
|
454
452
|
/* @__PURE__ */ p("div", { children: [
|
@@ -474,7 +472,7 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
474
472
|
placeholder: "Search Token Name or Contract Address"
|
475
473
|
}
|
476
474
|
),
|
477
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (k.isLoading || k.isFetching) && g.length ? /* @__PURE__ */ e("div", { className: " bw-bg-background-container bw-mt-1 bw-mr-1 bw-flex bw-items-center bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(
|
475
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2 bw-bg-background-container bw-top-[6px]", children: (k.isLoading || k.isFetching) && g.length ? /* @__PURE__ */ e("div", { className: " bw-bg-background-container bw-mt-1 bw-mr-1 bw-flex bw-items-center bw-w-[16px] bw-h-[16px]", children: /* @__PURE__ */ e(Z1, {}) }) : g.length ? /* @__PURE__ */ e(
|
478
476
|
"button",
|
479
477
|
{
|
480
478
|
onClick: () => {
|
@@ -487,30 +485,30 @@ function nt({ setChainData: t, setCoinData: n, handleReset: s, chainData: o, coi
|
|
487
485
|
]
|
488
486
|
}
|
489
487
|
),
|
490
|
-
/* @__PURE__ */ e(
|
488
|
+
/* @__PURE__ */ e(D1, { value: g, handleClosePopup: ne, showExchangeList: l, setChainData: t, setCoinData: n, selectChainState: m })
|
491
489
|
] })
|
492
490
|
] });
|
493
491
|
}
|
494
|
-
function
|
492
|
+
function tt({
|
495
493
|
walletDetails: t,
|
496
494
|
handleToDisconnect: n,
|
497
495
|
show: s,
|
498
496
|
networkType: o,
|
499
497
|
handleShowWallet: r,
|
500
|
-
setConnectWalletField:
|
498
|
+
setConnectWalletField: l
|
501
499
|
}) {
|
502
|
-
const [b, d] = v(null), { address:
|
503
|
-
|
500
|
+
const [b, d] = v(null), { address: i, chain: g, data: x, disconnect: k, ...B } = t, [M, F] = v(), { connector: h } = ge(), { connectors: m } = M1(), I = () => {
|
501
|
+
l(s), s == "to" ? (y(), n(!0)) : y();
|
504
502
|
};
|
505
|
-
|
503
|
+
E1(), j(() => {
|
506
504
|
m.length && F(
|
507
|
-
|
505
|
+
pe.keyBy(m, (S) => S.uid)
|
508
506
|
);
|
509
507
|
}, [m]);
|
510
508
|
async function y() {
|
511
509
|
o === "evm" && (g == null ? void 0 : g.network) !== "custom" && (M != null && M[h == null ? void 0 : h.uid]), r();
|
512
510
|
}
|
513
|
-
return /* @__PURE__ */ e(
|
511
|
+
return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
|
514
512
|
"button",
|
515
513
|
{
|
516
514
|
"aria-haspopup": "true",
|
@@ -518,32 +516,32 @@ function rt({
|
|
518
516
|
id: "basic-button",
|
519
517
|
style: { fontSize: "12px" },
|
520
518
|
className: "bw-bg-background-container bw-flex bw-items-center bw-justify-center bw-gap-x-2 bw-mb-[4px] bw-w-[100px] bw-h-[25px] bw-rounded-xl bw-border bw-border-border-primary",
|
521
|
-
children:
|
522
|
-
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((
|
519
|
+
children: i ? /* @__PURE__ */ p(J, { children: [
|
520
|
+
/* @__PURE__ */ e("p", { className: "bw-text-text-primary bw-text-xs bw-font-normal", children: ((i == null ? void 0 : i.substring(0, 4)) || "") + "..." + ((i == null ? void 0 : i.substring(i.length - 4, i.length)) || "") }),
|
523
521
|
/* @__PURE__ */ e(
|
524
522
|
"div",
|
525
523
|
{
|
526
|
-
children: /* @__PURE__ */ e(
|
524
|
+
children: /* @__PURE__ */ e(i1, { fill: "var(--tw-text-secondary)" })
|
527
525
|
}
|
528
526
|
)
|
529
|
-
] }) : /* @__PURE__ */ e("div", { className: "bw-w-[10px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[10px]", children: /* @__PURE__ */ e(
|
527
|
+
] }) : /* @__PURE__ */ e("div", { className: "bw-w-[10px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[10px]", children: /* @__PURE__ */ e(Se, { size: 10, thickness: 5, color: "inherit" }) })
|
530
528
|
}
|
531
529
|
) });
|
532
530
|
}
|
533
|
-
function o1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show:
|
534
|
-
var I, y, S, _,
|
535
|
-
const b =
|
536
|
-
|
537
|
-
const { defaultCoin: k } = Ee, { isAnyWalletConnected: B, getWallet: M } =
|
531
|
+
function o1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConnectWalletField: o, coinData: r, show: l }) {
|
532
|
+
var I, y, S, _, ne, E, K, O, V;
|
533
|
+
const b = c((f) => f.configuration), d = c((f) => f.customWallet), { isConnected: i, isConnecting: g, isReconnecting: x } = ge();
|
534
|
+
Ne();
|
535
|
+
const { defaultCoin: k } = Ee, { isAnyWalletConnected: B, getWallet: M } = ke({
|
538
536
|
chainData: t,
|
539
|
-
show:
|
537
|
+
show: l
|
540
538
|
});
|
541
|
-
|
542
|
-
const F =
|
539
|
+
c((f) => f.toDisconnect), c((f) => f.setToDisconnect);
|
540
|
+
const F = c((f) => f.fromChain), h = c((f) => f.toChain);
|
543
541
|
function m(f) {
|
544
542
|
}
|
545
543
|
return /* @__PURE__ */ p("div", { className: "bw-w-[50%] ", children: [
|
546
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children:
|
544
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children: l == "from" ? "Give" : "Get" }),
|
547
545
|
/* @__PURE__ */ p(
|
548
546
|
"div",
|
549
547
|
{
|
@@ -560,38 +558,38 @@ function o1({ chainData: t, setShowExchangeList: n, handleShowWallet: s, setConn
|
|
560
558
|
"div",
|
561
559
|
{
|
562
560
|
onClick: () => {
|
563
|
-
n(
|
561
|
+
n(l);
|
564
562
|
},
|
565
563
|
className: "bw-cursor-pointer",
|
566
564
|
children: [
|
567
565
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-min-w-[78px] bw-min-h-[28px] bw-items-center bw-gap-x-2", children: [
|
568
566
|
(S = r == null ? void 0 : r.coin) != null && S.length ? /* @__PURE__ */ e("p", { className: "bw-text-xl bw-font-bold bw-text-text-primary", children: r.coin }) : /* @__PURE__ */ e("p", { className: "bw-text-sm bw-text-text-primary bw-font-bold", children: "Select Token" }),
|
569
|
-
/* @__PURE__ */ e(
|
567
|
+
/* @__PURE__ */ e(H1, { fill: (_ = r == null ? void 0 : r.coin) != null && _.length ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" })
|
570
568
|
] }),
|
571
|
-
(
|
569
|
+
(ne = t == null ? void 0 : t.chain) != null && ne.length ? /* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: `on ${t.chain}`.length > 12 ? `on ${t.chain.substring(0, 12)}..` : `on ${t.chain}` }) : /* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-bold bw-text-text-primary", children: "& Chain" })
|
572
570
|
]
|
573
571
|
}
|
574
572
|
)
|
575
573
|
]
|
576
574
|
}
|
577
575
|
),
|
578
|
-
/* @__PURE__ */ e(
|
576
|
+
/* @__PURE__ */ e(nt, { isConnected: l == "to" ? (F == null ? void 0 : F.networkType) === (h == null ? void 0 : h.networkType) ? !!((K = (E = M(F)) == null ? void 0 : E.address) != null && K.length || (d == null ? void 0 : d.length) > 30) : !!((V = (O = M(h)) == null ? void 0 : O.address) != null && V.length || (d == null ? void 0 : d.length) > 30) : B, setConnectWalletField: o, handleShowWallet: s, show: l, chainData: t, handleToDisconnect: m })
|
579
577
|
] });
|
580
578
|
}
|
581
|
-
function
|
579
|
+
function nt({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, show: o, chainData: r, handleToDisconnect: l }) {
|
582
580
|
var x;
|
583
|
-
const b =
|
581
|
+
const b = c((k) => k.customWallet), d = c((k) => k.fromChain), i = c((k) => k.toChain), { getWallet: g } = ke({
|
584
582
|
chainData: r,
|
585
583
|
show: o
|
586
584
|
});
|
587
585
|
return /* @__PURE__ */ e("div", { className: "bw-mt-2 bw-flex bw-justify-end", children: t ? /* @__PURE__ */ e(
|
588
|
-
|
586
|
+
tt,
|
589
587
|
{
|
590
|
-
walletDetails: (b == null ? void 0 : b.length) > 30 && o == "to" ? g({}) : (d == null ? void 0 : d.networkType) == (
|
591
|
-
disconnect:
|
588
|
+
walletDetails: (b == null ? void 0 : b.length) > 30 && o == "to" ? g({}) : (d == null ? void 0 : d.networkType) == (i == null ? void 0 : i.networkType) && o == "to" ? {
|
589
|
+
disconnect: l,
|
592
590
|
address: (x = g(d)) == null ? void 0 : x.address
|
593
591
|
} : g(r),
|
594
|
-
handleToDisconnect:
|
592
|
+
handleToDisconnect: l,
|
595
593
|
show: o,
|
596
594
|
networkType: r == null ? void 0 : r.networkType,
|
597
595
|
setConnectWalletField: n,
|
@@ -606,17 +604,17 @@ function st({ isConnected: t, setConnectWalletField: n, handleShowWallet: s, sho
|
|
606
604
|
className: "bw-mb-1 bw-relative bw-min-w-[100px] bw-flex bw-justify-center bw-items-center bw-gap-x-1 bw-w-[84px] bw-h-[25px] bw-text-xs bw-font-medium bw-px-2 bw-rounded-xl bw-border bw-border-border-primary bw-bg-background-container bw-text-text-primary",
|
607
605
|
children: [
|
608
606
|
/* @__PURE__ */ e("p", { className: "bw-mr-3", children: "Connect" }),
|
609
|
-
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2", children: /* @__PURE__ */ e(
|
607
|
+
/* @__PURE__ */ e("div", { className: "bw-absolute bw-right-2", children: /* @__PURE__ */ e(i1, { fill: "var(--tw-text-secondary)" }) })
|
610
608
|
]
|
611
609
|
}
|
612
610
|
) });
|
613
611
|
}
|
614
|
-
const
|
615
|
-
gradient:
|
612
|
+
const rt = "_gradient_15zwe_1", Ze = {
|
613
|
+
gradient: rt
|
616
614
|
};
|
617
|
-
function
|
615
|
+
function st({ mode: t, handleMode: n }) {
|
618
616
|
var o, r;
|
619
|
-
const s =
|
617
|
+
const s = c((l) => l.configuration);
|
620
618
|
return /* @__PURE__ */ e("div", { className: "bw-flex bw-justify-center", children: /* @__PURE__ */ p(
|
621
619
|
"div",
|
622
620
|
{
|
@@ -646,10 +644,10 @@ function it({ mode: t, handleMode: n }) {
|
|
646
644
|
{
|
647
645
|
style: {
|
648
646
|
transition: "left 0.5s",
|
649
|
-
width: "calc(100% /
|
647
|
+
width: "calc(100% / 3)",
|
650
648
|
...s == null ? void 0 : s.gradientStyle
|
651
649
|
},
|
652
|
-
className: `${!(s != null && s.gradientStyle) &&
|
650
|
+
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
651
|
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
652
|
}
|
655
653
|
),
|
@@ -666,19 +664,6 @@ function it({ mode: t, handleMode: n }) {
|
|
666
664
|
]
|
667
665
|
}
|
668
666
|
),
|
669
|
-
/* @__PURE__ */ p(
|
670
|
-
"button",
|
671
|
-
{
|
672
|
-
onClick: () => {
|
673
|
-
n("Helius Tip");
|
674
|
-
},
|
675
|
-
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] ",
|
676
|
-
children: [
|
677
|
-
/* @__PURE__ */ e("p", { className: `${t === "Helius Tip" ? "bw-opacity-0" : "bw-opacity-100"}`, style: { transition: "opacity 0.1s ease" }, children: "Helius Tip" }),
|
678
|
-
/* @__PURE__ */ e("div", { className: "bw-h-[70%] bw-right-0 bw-absolute bw-w-[1px] bw-bg-border-primary" })
|
679
|
-
]
|
680
|
-
}
|
681
|
-
),
|
682
667
|
/* @__PURE__ */ e(
|
683
668
|
"button",
|
684
669
|
{
|
@@ -696,7 +681,7 @@ function it({ mode: t, handleMode: n }) {
|
|
696
681
|
}
|
697
682
|
) });
|
698
683
|
}
|
699
|
-
function
|
684
|
+
function ot({ fill: t }) {
|
700
685
|
return /* @__PURE__ */ e(
|
701
686
|
"svg",
|
702
687
|
{
|
@@ -718,22 +703,22 @@ function at({ fill: t }) {
|
|
718
703
|
);
|
719
704
|
}
|
720
705
|
function w1({ options: t, handleOptions: n }) {
|
721
|
-
var r,
|
706
|
+
var r, l;
|
722
707
|
const s = [
|
723
708
|
{ name: "Medium", value: "medium" },
|
724
709
|
{ name: "High", value: "high" },
|
725
710
|
{ name: "Degen", value: "ultra" }
|
726
|
-
], o =
|
711
|
+
], o = c((b) => b.configuration);
|
727
712
|
return /* @__PURE__ */ p("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between", children: [
|
728
713
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal bw-text-text-secondary", children: "Speed" }),
|
729
714
|
/* @__PURE__ */ e(
|
730
715
|
"div",
|
731
716
|
{
|
732
717
|
style: {
|
733
|
-
boxShadow: o && o.customTheme && ((
|
718
|
+
boxShadow: o && o.customTheme && ((l = (r = o.customTheme) == null ? void 0 : r.shadow) == null ? void 0 : l.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
734
719
|
},
|
735
720
|
className: "bw-flex bw-border bw-bg-background-container bw-w-[70%] md:bw-w-[60%] bw-h-[40px] bw-rounded-md bw-border-border-primary bw-items-center bw-justify-between",
|
736
|
-
children: s.map((b, d,
|
721
|
+
children: s.map((b, d, i) => /* @__PURE__ */ p(
|
737
722
|
"button",
|
738
723
|
{
|
739
724
|
onClick: () => {
|
@@ -748,7 +733,7 @@ function w1({ options: t, handleOptions: n }) {
|
|
748
733
|
className: `
|
749
734
|
bw-flex bw-flex-1 bw-relative bw-h-full bw-rounded-md bw-gap-x-1 bw-justify-center bw-items-center `,
|
750
735
|
children: [
|
751
|
-
b.value === "ultra" ? /* @__PURE__ */ e(
|
736
|
+
b.value === "ultra" ? /* @__PURE__ */ e(ot, { fill: b.value === t.value ? "var(--tw-text-primary)" : "var(--tw-text-secondary)" }) : /* @__PURE__ */ e(J, {}),
|
752
737
|
/* @__PURE__ */ e(
|
753
738
|
"p",
|
754
739
|
{
|
@@ -756,7 +741,7 @@ function w1({ options: t, handleOptions: n }) {
|
|
756
741
|
children: b.name
|
757
742
|
}
|
758
743
|
),
|
759
|
-
|
744
|
+
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" }),
|
760
745
|
/* @__PURE__ */ e(
|
761
746
|
"div",
|
762
747
|
{
|
@@ -766,7 +751,7 @@ function w1({ options: t, handleOptions: n }) {
|
|
766
751
|
},
|
767
752
|
className: `bw-w-full
|
768
753
|
|
769
|
-
${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) &&
|
754
|
+
${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}`
|
770
755
|
}
|
771
756
|
)
|
772
757
|
]
|
@@ -791,15 +776,15 @@ function u1(t) {
|
|
791
776
|
/^\d$/.test(t.key) || n.includes(t.key) || t.preventDefault();
|
792
777
|
}
|
793
778
|
function m1({ inputVal: t, handleCustomVal: n, title: s, inputSideText: o }) {
|
794
|
-
var
|
795
|
-
const r =
|
779
|
+
var l, b;
|
780
|
+
const r = c((d) => d.configuration);
|
796
781
|
return /* @__PURE__ */ p("div", { className: "bw-mt-5 bw-flex bw-items-center bw-justify-between bw-gap-x-3 bw-text-sm bw-font-normal bw-text-text-secondary", children: [
|
797
782
|
/* @__PURE__ */ e("h2", { className: "bw-text-sm bw-font-normal", children: s }),
|
798
783
|
/* @__PURE__ */ p(
|
799
784
|
"div",
|
800
785
|
{
|
801
786
|
style: {
|
802
|
-
boxShadow: r && r.customTheme && ((b = (
|
787
|
+
boxShadow: r && r.customTheme && ((b = (l = r.customTheme) == null ? void 0 : l.shadow) == null ? void 0 : b.boxShadow) || "0px 0px 12.5px 0px #0000001A"
|
803
788
|
},
|
804
789
|
className: "bw-h-[40px] bw-w-[70%] md:bw-w-[60%] bw-flex bw-rounded-md bw-border bw-border-border-primary bw-bg-background-container bw-p-1 bw-text-text-primary",
|
805
790
|
children: [
|
@@ -825,12 +810,12 @@ function m1({ inputVal: t, handleCustomVal: n, title: s, inputSideText: o }) {
|
|
825
810
|
] });
|
826
811
|
}
|
827
812
|
function p1({ handleSave: t, isSaveButtonDisabled: n }) {
|
828
|
-
const s =
|
829
|
-
return
|
813
|
+
const s = c((o) => o.configuration);
|
814
|
+
return c((o) => o.slippage), /* @__PURE__ */ e(
|
830
815
|
"div",
|
831
816
|
{
|
832
817
|
style: { ...s == null ? void 0 : s.gradientStyle },
|
833
|
-
className: `${n ? "bw-bg-border-primary" : !(s != null && s.gradientStyle) &&
|
818
|
+
className: `${n ? "bw-bg-border-primary" : !(s != null && s.gradientStyle) && Ze.gradient} bw-rounded-sm bw-p-[2px] bw-mt-10`,
|
834
819
|
children: /* @__PURE__ */ e(
|
835
820
|
"button",
|
836
821
|
{
|
@@ -846,7 +831,7 @@ function g1({ handleClose: t }) {
|
|
846
831
|
return /* @__PURE__ */ p("div", { className: "bw-w-full bw-relative bw-flex bw-items-center bw-justify-center", children: [
|
847
832
|
/* @__PURE__ */ e("h2", { className: "bw-text-2xl bw-font-bold bw-text-text-primary", children: "Config" }),
|
848
833
|
/* @__PURE__ */ e(
|
849
|
-
|
834
|
+
_1,
|
850
835
|
{
|
851
836
|
disableRipple: !0,
|
852
837
|
onClick: t,
|
@@ -858,7 +843,7 @@ function g1({ handleClose: t }) {
|
|
858
843
|
}
|
859
844
|
function f1({ slippage: t, handleSlippage: n }) {
|
860
845
|
var o, r;
|
861
|
-
const s =
|
846
|
+
const s = c((l) => l.configuration);
|
862
847
|
return /* @__PURE__ */ p("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
863
848
|
/* @__PURE__ */ e("p", { className: "bw-text-lg bw-font-normal bw-text-text-primary", children: "Max Slippage" }),
|
864
849
|
/* @__PURE__ */ p(
|
@@ -873,20 +858,20 @@ function f1({ slippage: t, handleSlippage: n }) {
|
|
873
858
|
/* @__PURE__ */ e(
|
874
859
|
"input",
|
875
860
|
{
|
876
|
-
onKeyUp: (
|
877
|
-
|
861
|
+
onKeyUp: (l) => {
|
862
|
+
l.key === "Enter" && l.target.blur();
|
878
863
|
},
|
879
|
-
onFocus: (
|
880
|
-
|
864
|
+
onFocus: (l) => {
|
865
|
+
l.target.parentElement.style.border = "1px solid var(--tw-text-primary)", l.target.parentElement.style.fontWeight = 600;
|
881
866
|
},
|
882
|
-
onBlur: (
|
883
|
-
|
867
|
+
onBlur: (l) => {
|
868
|
+
l.target.parentElement.style.border = "1px solid var(--tw-border-primary)", l.target.parentElement.style.fontWeight = 400;
|
884
869
|
},
|
885
870
|
value: t,
|
886
871
|
onChange: n,
|
887
872
|
type: "number",
|
888
|
-
onKeyDown: (
|
889
|
-
u1(
|
873
|
+
onKeyDown: (l) => {
|
874
|
+
u1(l);
|
890
875
|
},
|
891
876
|
className: "bw-bg-transparent bw-border-none bw-text-text-primary bw-pl-2 bw-text-right bw-w-[80%]"
|
892
877
|
}
|
@@ -903,12 +888,12 @@ function x1() {
|
|
903
888
|
/* @__PURE__ */ e("div", { className: "bw-h-[1px] bw-flex-1 bw-bg-border-primary " })
|
904
889
|
] });
|
905
890
|
}
|
906
|
-
function
|
907
|
-
const [n, s] = v(""), [o, r] = v({ name: "Low", value: "low" }), [
|
891
|
+
function at({ handleClose: t }) {
|
892
|
+
const [n, s] = v(""), [o, r] = v({ name: "Low", value: "low" }), [l, b] = v(""), [d, i] = v(""), [g, x] = v(""), k = c((f) => f.broadCastMode), B = c((f) => f.customFee), M = c((f) => f.setCustomFee), F = c((f) => f.slippage), h = c((f) => f.setSlippage), m = c((f) => f.setBroadCastMode), I = c((f) => f.option), y = c((f) => f.setOption), S = n == B && I.name == o.name && F == g && (d === k && d !== "" || !n.length && !I.name.length);
|
908
893
|
function _(f) {
|
909
894
|
b(""), s(f.target.value);
|
910
895
|
}
|
911
|
-
function
|
896
|
+
function ne(f, C) {
|
912
897
|
b(""), r(f);
|
913
898
|
}
|
914
899
|
j(() => {
|
@@ -926,7 +911,7 @@ function lt({ handleClose: t }) {
|
|
926
911
|
x(f.target.value);
|
927
912
|
}
|
928
913
|
j(() => {
|
929
|
-
|
914
|
+
i(k);
|
930
915
|
}, [k]);
|
931
916
|
function O() {
|
932
917
|
if (d == "" && (n.length || o.name.length)) {
|
@@ -936,16 +921,16 @@ function lt({ handleClose: t }) {
|
|
936
921
|
n.length ? (M(n), y(o)) : (M(""), E()), m(d), h(g), t();
|
937
922
|
}
|
938
923
|
function V(f) {
|
939
|
-
b(""),
|
924
|
+
b(""), i(f);
|
940
925
|
}
|
941
926
|
return j(() => {
|
942
|
-
!B && !I.name.length && (m(""),
|
927
|
+
!B && !I.name.length && (m(""), i(""));
|
943
928
|
}, [B, I.name]), /* @__PURE__ */ p("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[447px] bw-rounded-lg bw-border bw-p-3 px-4 md:bw-px-6 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
944
929
|
/* @__PURE__ */ e(g1, { handleClose: t }),
|
945
930
|
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(f1, { slippage: g, handleSlippage: K }) }),
|
946
931
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(x1, {}) }),
|
947
|
-
/* @__PURE__ */ e(
|
948
|
-
/* @__PURE__ */ e(w1, { options: o, handleOptions:
|
932
|
+
/* @__PURE__ */ e(st, { mode: d, handleMode: V }),
|
933
|
+
/* @__PURE__ */ e(w1, { options: o, handleOptions: ne }),
|
949
934
|
/* @__PURE__ */ e(
|
950
935
|
m1,
|
951
936
|
{
|
@@ -956,7 +941,7 @@ function lt({ handleClose: t }) {
|
|
956
941
|
}
|
957
942
|
),
|
958
943
|
/* @__PURE__ */ p("div", { className: "bw-relative", children: [
|
959
|
-
/* @__PURE__ */ e("p", { className: "bw-w-full bw-absolute bw-text-center -bw-top-5 bw-text-xs bw-text-text-redtext", children:
|
944
|
+
/* @__PURE__ */ e("p", { className: "bw-w-full bw-absolute bw-text-center -bw-top-5 bw-text-xs bw-text-text-redtext", children: l }),
|
960
945
|
/* @__PURE__ */ e(
|
961
946
|
p1,
|
962
947
|
{
|
@@ -967,8 +952,8 @@ function lt({ handleClose: t }) {
|
|
967
952
|
] })
|
968
953
|
] });
|
969
954
|
}
|
970
|
-
function
|
971
|
-
const [n, s] = v({ name: "Low", value: "low" }), [o, r] = v(""), [
|
955
|
+
function it({ handleClose: t }) {
|
956
|
+
const [n, s] = v({ name: "Low", value: "low" }), [o, r] = v(""), [l, b] = v(""), d = c((y) => y.setEvmGas), i = c((y) => y.setEvmSpeed), g = c((y) => y.evmSpeed), x = c((y) => y.evmGas), k = c((y) => y.slippage), B = c((y) => y.setSlippage), M = o == x && g.name == n.name && k == l;
|
972
957
|
function F(y, S) {
|
973
958
|
s(y);
|
974
959
|
}
|
@@ -981,7 +966,7 @@ function ct({ handleClose: t }) {
|
|
981
966
|
x != null && x.length ? r(x) : r("");
|
982
967
|
}, [x]);
|
983
968
|
function m() {
|
984
|
-
o.length ? (d(o),
|
969
|
+
o.length ? (d(o), i(n)) : (d(""), i(n)), B(l), t();
|
985
970
|
}
|
986
971
|
j(() => {
|
987
972
|
b(k);
|
@@ -991,7 +976,7 @@ function ct({ handleClose: t }) {
|
|
991
976
|
}
|
992
977
|
return /* @__PURE__ */ p("div", { className: "bw-w-full md:bw-w-[443px] bw-h-[396px] bw-rounded-md bw-border bw-p-3 bw-border-border-primary bw-text-white bw-bg-background-container", children: [
|
993
978
|
/* @__PURE__ */ e(g1, { handleClose: t }),
|
994
|
-
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(f1, { slippage:
|
979
|
+
/* @__PURE__ */ e("div", { className: "bw-mt-5 bw-mb-5", children: /* @__PURE__ */ e(f1, { slippage: l, handleSlippage: I }) }),
|
995
980
|
/* @__PURE__ */ e("div", { className: "bw-mb-5", children: /* @__PURE__ */ e(x1, {}) }),
|
996
981
|
/* @__PURE__ */ e(w1, { options: n, handleOptions: F }),
|
997
982
|
/* @__PURE__ */ e(
|
@@ -1012,10 +997,10 @@ function ct({ handleClose: t }) {
|
|
1012
997
|
)
|
1013
998
|
] });
|
1014
999
|
}
|
1015
|
-
function
|
1016
|
-
const s =
|
1000
|
+
function ct({ open: t, handleClose: n }) {
|
1001
|
+
const s = c((r) => r.fromChain);
|
1017
1002
|
return /* @__PURE__ */ e(
|
1018
|
-
|
1003
|
+
F1,
|
1019
1004
|
{
|
1020
1005
|
open: t,
|
1021
1006
|
disablePortal: !0,
|
@@ -1030,11 +1015,11 @@ function bt({ open: t, handleClose: n }) {
|
|
1030
1015
|
// left: "47%",
|
1031
1016
|
// transform: "translate(-50%, -50%)",
|
1032
1017
|
bgcolor: "var(--tw-bg-container)"
|
1033
|
-
}, children: s.networkType == "sol" ? /* @__PURE__ */ e(
|
1018
|
+
}, children: s.networkType == "sol" ? /* @__PURE__ */ e(at, { handleClose: n }) : /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(it, { handleClose: n }) }) })
|
1034
1019
|
}
|
1035
1020
|
);
|
1036
1021
|
}
|
1037
|
-
function
|
1022
|
+
function lt({ fill: t }) {
|
1038
1023
|
return /* @__PURE__ */ p(
|
1039
1024
|
"svg",
|
1040
1025
|
{
|
@@ -1073,8 +1058,8 @@ function dt({ fill: t }) {
|
|
1073
1058
|
}
|
1074
1059
|
);
|
1075
1060
|
}
|
1076
|
-
function
|
1077
|
-
const t =
|
1061
|
+
function bt() {
|
1062
|
+
const t = c((o) => o.configuration), n = t == null ? void 0 : t.headingStyles, s = (t == null ? void 0 : t.headingText) || "";
|
1078
1063
|
return s.length ? /* @__PURE__ */ e(
|
1079
1064
|
"span",
|
1080
1065
|
{
|
@@ -1091,8 +1076,8 @@ function wt() {
|
|
1091
1076
|
"Y.exchange"
|
1092
1077
|
] });
|
1093
1078
|
}
|
1094
|
-
function
|
1095
|
-
const t =
|
1079
|
+
function dt() {
|
1080
|
+
const t = c((s) => s.configuration), n = t == null ? void 0 : t.headingContainerStyles;
|
1096
1081
|
return /* @__PURE__ */ e(
|
1097
1082
|
"div",
|
1098
1083
|
{
|
@@ -1120,82 +1105,82 @@ function ut() {
|
|
1120
1105
|
paddingLeft: "10px",
|
1121
1106
|
...n
|
1122
1107
|
},
|
1123
|
-
children: /* @__PURE__ */ e(
|
1108
|
+
children: /* @__PURE__ */ e(bt, {})
|
1124
1109
|
}
|
1125
1110
|
);
|
1126
1111
|
}
|
1127
|
-
function
|
1128
|
-
const [t, n] = v(!1), s =
|
1112
|
+
function wt() {
|
1113
|
+
const [t, n] = v(!1), s = c((r) => r.fromChain);
|
1129
1114
|
function o() {
|
1130
1115
|
n(!1);
|
1131
1116
|
}
|
1132
|
-
return /* @__PURE__ */ p(
|
1117
|
+
return /* @__PURE__ */ p(J, { children: [
|
1133
1118
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-w-full -bw-mt-2 bw-mb-3 bw-items-center bw-justify-end", children: [
|
1134
|
-
/* @__PURE__ */ e(
|
1119
|
+
/* @__PURE__ */ e(dt, {}),
|
1135
1120
|
/* @__PURE__ */ e(
|
1136
1121
|
"div",
|
1137
1122
|
{
|
1138
1123
|
onClick: () => (s == null ? void 0 : s.networkType) !== "cosmos" && n(!0),
|
1139
1124
|
className: "bw-flex bw-relative bw-right-0 bw-items-center bw-gap-x-2",
|
1140
|
-
children: /* @__PURE__ */ e(
|
1125
|
+
children: /* @__PURE__ */ e(G1, { classnames: " ", children: /* @__PURE__ */ e(lt, { fill: "var(--tw-text-secondary)" }) })
|
1141
1126
|
}
|
1142
1127
|
)
|
1143
1128
|
] }),
|
1144
|
-
/* @__PURE__ */ e(
|
1129
|
+
/* @__PURE__ */ e(ct, { open: t, handleClose: o })
|
1145
1130
|
] });
|
1146
1131
|
}
|
1147
|
-
let
|
1148
|
-
function
|
1149
|
-
const [b, d] = v(0), { getWallet:
|
1132
|
+
let a1, Fe, he, Me = 0;
|
1133
|
+
function ut({ confirmRoute: t, setConfirmRoute: n, routes: s, routesData: o, isRoutesEnabled: r, fetchBalance: l }) {
|
1134
|
+
const [b, d] = v(0), { getWallet: i } = ke({}), g = c((h) => h.fromChain), x = i(g), { isConnected: k } = ge();
|
1150
1135
|
j(() => {
|
1151
|
-
t && clearInterval(
|
1136
|
+
t && clearInterval(he);
|
1152
1137
|
}, [t]), j(() => {
|
1153
1138
|
var h;
|
1154
|
-
b === 0 && document.visibilityState === "visible" && !t && r && ((h = x.address) != null && h.length &&
|
1139
|
+
b === 0 && document.visibilityState === "visible" && !t && r && ((h = x.address) != null && h.length && l.refetch(), s.refetch());
|
1155
1140
|
}, [b, t, r]), j(() => {
|
1156
1141
|
s.isFetching && (Me = 0);
|
1157
1142
|
}, [s.isFetching]), j(() => {
|
1158
|
-
if (!
|
1143
|
+
if (!pe.isEmpty(o)) {
|
1159
1144
|
const h = Math.max(0, o.deadline - Me);
|
1160
1145
|
d(h);
|
1161
1146
|
}
|
1162
1147
|
return () => {
|
1163
1148
|
d(0);
|
1164
1149
|
};
|
1165
|
-
}, [o]), j(() => (
|
1150
|
+
}, [o]), j(() => (pe.isEmpty(o) || document.addEventListener("visibilitychange", F), () => {
|
1166
1151
|
document.removeEventListener("visibilitychange", F);
|
1167
1152
|
}), [o]);
|
1168
1153
|
function B() {
|
1169
|
-
|
1154
|
+
a1 = Date.now(), d((h) => (Fe = h, h));
|
1170
1155
|
}
|
1171
1156
|
function M() {
|
1172
|
-
let h = Date.now(), m = Math.round((h -
|
1157
|
+
let h = Date.now(), m = Math.round((h - a1) / 1e3);
|
1173
1158
|
o.deadline - Fe + m > o.deadline ? n((I) => {
|
1174
1159
|
var y;
|
1175
|
-
return I || ((y = x.address) != null && y.length &&
|
1160
|
+
return I || ((y = x.address) != null && y.length && l.refetch(), s.refetch(), d(o.deadline)), I;
|
1176
1161
|
}) : Fe && m && d(Fe - m);
|
1177
1162
|
}
|
1178
1163
|
function F() {
|
1179
1164
|
document.visibilityState === "visible" ? M() : B();
|
1180
1165
|
}
|
1181
|
-
return j(() => (
|
1166
|
+
return j(() => (pe.isEmpty(o) ? he && clearInterval(he) : he = setInterval(() => {
|
1182
1167
|
d((h) => h <= 0 ? (Me = 0, o.deadline) : (Me++, h - 1));
|
1183
1168
|
}, 1e3), () => {
|
1184
|
-
|
1185
|
-
}), [o]),
|
1169
|
+
he && clearInterval(he);
|
1170
|
+
}), [o]), c((h) => h.timerValue), { quoteTimer: b, setQuoteTimer: d };
|
1186
1171
|
}
|
1187
|
-
function
|
1188
|
-
const { primaryWallet: o } =
|
1172
|
+
function mt(t, n, s) {
|
1173
|
+
const { primaryWallet: o } = Ne(), [r, l] = v(0), b = async (d) => {
|
1189
1174
|
if (!o) return;
|
1190
|
-
const
|
1191
|
-
if (
|
1175
|
+
const i = new ze(d || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed");
|
1176
|
+
if (i)
|
1192
1177
|
try {
|
1193
|
-
const g = new
|
1194
|
-
|
1195
|
-
|
1178
|
+
const g = new be(o.address);
|
1179
|
+
i.onAccountChange(g, (B) => {
|
1180
|
+
l(B.lamports / 1e9);
|
1196
1181
|
});
|
1197
|
-
const k = await
|
1198
|
-
|
1182
|
+
const k = await i.getBalance(g) / 1e9;
|
1183
|
+
l(k), s(!1);
|
1199
1184
|
} catch {
|
1200
1185
|
s(!1);
|
1201
1186
|
}
|
@@ -1204,26 +1189,26 @@ function gt(t, n, s) {
|
|
1204
1189
|
(t == null ? void 0 : t.networkType) === "sol" && b((t == null ? void 0 : t.chainId) === "eclipse-svm" ? "https://eclipse.lgns.net/" : null);
|
1205
1190
|
}, [t == null ? void 0 : t.networkType, o, t == null ? void 0 : t.chainId, o == null ? void 0 : o.address]), { balanceSol: r, getBalanceSol: b };
|
1206
1191
|
}
|
1207
|
-
function
|
1192
|
+
function pt(t) {
|
1208
1193
|
return t == "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ? "" : t;
|
1209
1194
|
}
|
1210
|
-
const
|
1211
|
-
new
|
1212
|
-
new
|
1213
|
-
new
|
1214
|
-
async function
|
1195
|
+
const gt = new be("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"), ft = new be("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
1196
|
+
new be("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
1197
|
+
new be("So11111111111111111111111111111111111111112");
|
1198
|
+
new be("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
|
1199
|
+
async function xt(t, n) {
|
1215
1200
|
if (!t) return;
|
1216
|
-
const s = new
|
1217
|
-
programId: n ?
|
1201
|
+
const s = new ze(n || "https://tammi-n3hltb-fast-mainnet.helius-rpc.com/", "confirmed"), o = new be(t), r = await s.getParsedTokenAccountsByOwner(o, {
|
1202
|
+
programId: n ? ft : gt
|
1218
1203
|
});
|
1219
|
-
let
|
1204
|
+
let l = {};
|
1220
1205
|
for (const { account: b } of r.value) {
|
1221
|
-
const d = b.data.parsed.info.mint,
|
1222
|
-
|
1206
|
+
const d = b.data.parsed.info.mint, i = b.data.parsed.info.tokenAmount.uiAmount;
|
1207
|
+
l[d] = i;
|
1223
1208
|
}
|
1224
|
-
return
|
1209
|
+
return l;
|
1225
1210
|
}
|
1226
|
-
const
|
1211
|
+
const ht = "0000000000000000000000000000000000", yt = async (t) => {
|
1227
1212
|
try {
|
1228
1213
|
const n = await tronWeb.trx.getBalance(t);
|
1229
1214
|
return { balance: tronWeb.fromSun(n) };
|
@@ -1231,10 +1216,10 @@ const Ct = "0000000000000000000000000000000000", vt = async (t) => {
|
|
1231
1216
|
throw n;
|
1232
1217
|
}
|
1233
1218
|
};
|
1234
|
-
async function
|
1219
|
+
async function Ct(t, n) {
|
1235
1220
|
try {
|
1236
|
-
if (n ===
|
1237
|
-
return
|
1221
|
+
if (n === ht)
|
1222
|
+
return yt(t);
|
1238
1223
|
const s = await tronWeb.contract().at(n), o = await s.balanceOf(t).call(), r = await s.decimals().call();
|
1239
1224
|
return {
|
1240
1225
|
balance: Number(o) / Math.pow(10, Number(r)),
|
@@ -1245,31 +1230,31 @@ async function kt(t, n) {
|
|
1245
1230
|
throw s;
|
1246
1231
|
}
|
1247
1232
|
}
|
1248
|
-
function
|
1249
|
-
const [s, o] = v(0), { primaryWallet: r, setPrimaryWallet:
|
1233
|
+
function vt(t, n) {
|
1234
|
+
const [s, o] = v(0), { primaryWallet: r, setPrimaryWallet: l } = Ne(), [b, d] = v(!1), i = c((w) => w.fromChain), { address: g, isConnected: x } = ge(), { address: k, isConnected: B } = Ve(), M = c((w) => w.cosmosChainIds), { data: F, isConnected: h } = Oe({
|
1250
1235
|
chainId: M,
|
1251
1236
|
multiChain: !0
|
1252
|
-
}), m =
|
1237
|
+
}), m = c((w) => w.fromCoin), { data: I, isLoading: y } = O1({
|
1253
1238
|
address: g,
|
1254
|
-
token:
|
1255
|
-
chainId: Number((
|
1256
|
-
enabled: !!((
|
1239
|
+
token: pt((m == null ? void 0 : m.address) || ""),
|
1240
|
+
chainId: Number((i == null ? void 0 : i.chainId) || 0),
|
1241
|
+
enabled: !!((i.networkType == "evm" || n) && g && (g != null && g.length))
|
1257
1242
|
}), {
|
1258
1243
|
data: S,
|
1259
1244
|
isLoading: _,
|
1260
|
-
isFetching:
|
1245
|
+
isFetching: ne,
|
1261
1246
|
isInitialLoading: E,
|
1262
1247
|
isRefetching: K
|
1263
|
-
} =
|
1264
|
-
chainId: [
|
1248
|
+
} = l1({
|
1249
|
+
chainId: [i.chainId],
|
1265
1250
|
multiChain: !0
|
1266
1251
|
});
|
1267
1252
|
async function O(w) {
|
1268
1253
|
if (!r) return;
|
1269
|
-
const T = new
|
1254
|
+
const T = new ze(w || "https://solana-rpc.publicnode.com");
|
1270
1255
|
if (T)
|
1271
1256
|
try {
|
1272
|
-
const A = new
|
1257
|
+
const A = new be(r.address);
|
1273
1258
|
d(!0);
|
1274
1259
|
const N = await T.getBalance(A) / 1e9;
|
1275
1260
|
o(N), d(!1);
|
@@ -1280,7 +1265,7 @@ function Nt(t, n) {
|
|
1280
1265
|
async function V(w) {
|
1281
1266
|
try {
|
1282
1267
|
d(!0);
|
1283
|
-
let T = await
|
1268
|
+
let T = await xt(r.address, w);
|
1284
1269
|
d(!1), o(T == null ? void 0 : T[m == null ? void 0 : m.address]);
|
1285
1270
|
} catch {
|
1286
1271
|
d(!1);
|
@@ -1291,47 +1276,47 @@ function Nt(t, n) {
|
|
1291
1276
|
if (!r) return;
|
1292
1277
|
const w = await r.connector.getPublicClient();
|
1293
1278
|
if (!w) return;
|
1294
|
-
const T = new
|
1279
|
+
const T = new be(r.address);
|
1295
1280
|
T && (f = w.onAccountChange(T, (A) => {
|
1296
|
-
var
|
1297
|
-
if (
|
1298
|
-
if (((
|
1281
|
+
var L;
|
1282
|
+
if (i.networkType == "sol" && (r != null && r.address))
|
1283
|
+
if (((L = m == null ? void 0 : m.symbol) == null ? void 0 : L.toLowerCase()) === "sol")
|
1299
1284
|
O();
|
1300
|
-
else if (
|
1285
|
+
else if (i.chainId === "eclipse-svm")
|
1301
1286
|
m.symbol == "ETH" ? O("https://eclipse.lgns.net/") : V("https://eclipse.lgns.net/");
|
1302
1287
|
else {
|
1303
|
-
if (
|
1288
|
+
if (i.networkType === "btc" || i.networkType === "sui")
|
1304
1289
|
return;
|
1305
1290
|
V();
|
1306
1291
|
}
|
1307
1292
|
}));
|
1308
1293
|
}
|
1309
|
-
async function
|
1294
|
+
async function P() {
|
1310
1295
|
d(!0);
|
1311
1296
|
const w = await r.getBalance();
|
1312
1297
|
o(w), d(!1);
|
1313
1298
|
}
|
1314
|
-
j(() => ((
|
1299
|
+
j(() => ((i == null ? void 0 : i.networkType) === "sol" && C(), async () => {
|
1315
1300
|
if (!r) return;
|
1316
1301
|
const w = await r.connector.getPublicClient();
|
1317
1302
|
w && w.removeAccountChangeListener(f);
|
1318
|
-
}), [r == null ? void 0 : r.address,
|
1319
|
-
async function
|
1320
|
-
var A,
|
1303
|
+
}), [r == null ? void 0 : r.address, i == null ? void 0 : i.networkType, m]);
|
1304
|
+
async function H(w) {
|
1305
|
+
var A, L;
|
1321
1306
|
let T = S[w] || S;
|
1322
1307
|
try {
|
1323
1308
|
d(!0);
|
1324
|
-
let N = await T.getAllBalances((A = F == null ? void 0 : F[w]) == null ? void 0 : A.bech32Address),
|
1325
|
-
o(((
|
1309
|
+
let N = await T.getAllBalances((A = F == null ? void 0 : F[w]) == null ? void 0 : A.bech32Address), R = pe.keyBy(N, "denom");
|
1310
|
+
o(((L = R[d1(m.address)]) == null ? void 0 : L.amount) / Math.pow(10, m.decimals) || 0), d(!1);
|
1326
1311
|
} catch {
|
1327
1312
|
d(!1);
|
1328
1313
|
}
|
1329
1314
|
}
|
1330
|
-
async function
|
1315
|
+
async function $(w, T) {
|
1331
1316
|
o(0);
|
1332
1317
|
try {
|
1333
1318
|
d(!0);
|
1334
|
-
let A = await
|
1319
|
+
let A = await Ct(w, T);
|
1335
1320
|
o((A == null ? void 0 : A.balance) || 0), d(!1);
|
1336
1321
|
} catch {
|
1337
1322
|
d(!1);
|
@@ -1339,105 +1324,99 @@ function Nt(t, n) {
|
|
1339
1324
|
}
|
1340
1325
|
return j(() => {
|
1341
1326
|
var w;
|
1342
|
-
|
1343
|
-
}, [
|
1327
|
+
o(0), i.networkType == "sol" && (r != null && r.address) ? ((w = m == null ? void 0 : m.symbol) == null ? void 0 : w.toLowerCase()) === "sol" ? O() : i.chainId == "eclipse-svm" ? m.symbol == "ETH" ? O("https://eclipse.lgns.net/") : V("https://eclipse.lgns.net/") : V() : i.networkType == "sui" && (r == null ? void 0 : r.chain) == "SUI" || i.networkType == "btc" && (r == null ? void 0 : r.chain) == "BTC" ? P() : i.networkType == "evm" && g && (g != null && g.length) ? o(Number((I == null ? void 0 : I.formatted) || 0)) : i.networkType == "cosmos" && h && !_ ? H(i == null ? void 0 : i.chainId) : i.networkType == "tron" && k && $(k, m == null ? void 0 : m.address);
|
1328
|
+
}, [i.networkType, i == null ? void 0 : i.chainId, m.symbol, m == null ? void 0 : m.address, I, g, r == null ? void 0 : r.address, g, h, _, r == null ? void 0 : r.chain, t, k]), {
|
1344
1329
|
getbal: s,
|
1345
|
-
isBalanceLoading: (
|
1330
|
+
isBalanceLoading: (i == null ? void 0 : i.networkType) == "evm" ? y : b
|
1346
1331
|
};
|
1347
1332
|
}
|
1348
|
-
const
|
1349
|
-
function
|
1333
|
+
const kt = de.lazy(() => import("./SwapAsset-CkRat7Ok.js")), Nt = de.lazy(() => import("./InputComp-Dl4M7E5v.js")), Tt = de.lazy(() => import("./QuotesProgress-Covy7wmW.js")), It = de.lazy(() => import("./TxnButton-CPMFPFA_.js")), Bt = de.lazy(() => import("./index-CI-V1HdQ.js").then((t) => t.i)), At = de.lazy(() => import("./index-DjHDqI7m.js")), jt = de.lazy(() => import("./LoadRoute-cBSl34Bs.js")), Lt = de.lazy(() => import("./AllRoutes-CIe7ZLbW.js"));
|
1334
|
+
function Pt({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
1350
1335
|
var Ke, Je, qe, Xe, Qe, Ue, Ye;
|
1351
|
-
const [o, r] = v(), [
|
1352
|
-
|
1353
|
-
const {
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
enabled:
|
1361
|
-
dependency: le,
|
1362
|
-
payload: [(C == null ? void 0 : C.networkType) === "cosmos" ? r1(E == null ? void 0 : E.bech32Address, (Ke = C == null ? void 0 : C.chainInfo) == null ? void 0 : Ke.bech32Config.bech32PrefixAccAddr) : ((Je = q(C)) == null ? void 0 : Je.address) || "", C, L, Z, R, N, Number(Be) * 100, (se == null ? void 0 : se.length) > 30 ? ((qe = q({})) == null ? void 0 : qe.address) || "" : (L == null ? void 0 : L.networkType) === "cosmos" ? r1(E == null ? void 0 : E.bech32Address, (Xe = L == null ? void 0 : L.chainInfo) == null ? void 0 : Xe.bech32Config.bech32PrefixAccAddr) : ((Qe = q(L)) == null ? void 0 : Qe.address) || "", oe]
|
1363
|
-
}), ae = q(C), ue = l1({
|
1364
|
-
queryKey: ["balance", ae == null ? void 0 : ae.address, C],
|
1365
|
-
queryFn: async () => await (await Se.fetchBalance(ae.address, C.chainId)).json(),
|
1366
|
-
enabled: !!((Ue = ae == null ? void 0 : ae.address) != null && Ue.length && C.chainId),
|
1336
|
+
const [o, r] = v(), [l, b] = v(!1), [d, i] = v(!1), [g, x] = v(!1), [k, B] = v(!1), [M, F] = v("all"), [h, m] = v(!1), { primaryWallet: I } = Ne(), { address: y } = ge(), { address: S } = Ve(), { getbal: _, isBalanceLoading: ne } = vt(h), { data: E, isConnected: K } = Oe({ chainId: "cosmoshub-4" }), O = c((a) => a.persist), V = c((a) => a.setPersist), f = c((a) => a.route), C = c((a) => a.fromChain), P = c((a) => a.toChain), H = c((a) => a.fromCoin), $ = c((a) => a.toCoin), w = c((a) => a.setFromChain), T = c((a) => a.setToChain), A = c((a) => a.setFromCoin), L = c((a) => a.setToCoin), N = c((a) => a.amount), R = c((a) => a.setAmount), ae = c((a) => a.customWallet), Te = c((a) => a.setCosmosChainIds), W = c((a) => a.customFee), G = c((a) => a.broadCastMode), Q = c((a) => a.evmGas), z = c((a) => a.evmSpeed), Ie = c((a) => a.slippage), ye = c((a) => a.option), Be = c((a) => a.setCustomWallet), Ae = c((a) => a.setSelectedProvider), { balanceSol: u } = mt(C, h, Re), { suggestAndConnectAsync: D } = V1(), re = !!(N.length && C.chain.length && H.coin.length && P.chain.length && $.coin.length && !g && k), ce = ["routes", y, C, P, H, $, N, I == null ? void 0 : I.address, S, ae, E == null ? void 0 : E.bech32Address, W, Q, z, Ie, G, ye.value];
|
1337
|
+
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 : z.value;
|
1338
|
+
const U = (C == null ? void 0 : C.networkType) === "sol" ? G === "Priority Fee" ? `&solanaPriorityFee=${se}` : G === "Jito Tip" ? { solanaJitoTip: oe } : { solanaPriorityFee: se, solanaJitoTip: oe } : (C == null ? void 0 : C.networkType) === "evm" ? { evmPriorityFee: q } : "", { getWallet: Y, refetch: ee } = ke({}), { routes: Z, routesData: X, setRoutesData: le, errorMessage: te, setErrorMessage: Ce } = K1({
|
1339
|
+
enabled: re,
|
1340
|
+
dependency: ce,
|
1341
|
+
payload: [(C == null ? void 0 : C.networkType) === "cosmos" ? r1(E == null ? void 0 : E.bech32Address, (Ke = C == null ? void 0 : C.chainInfo) == null ? void 0 : Ke.bech32Config.bech32PrefixAccAddr) : ((Je = Y(C)) == null ? void 0 : Je.address) || "", C, P, H, $, N, Number(Ie) * 100, (ae == null ? void 0 : ae.length) > 30 ? ((qe = Y({})) == null ? void 0 : qe.address) || "" : (P == null ? void 0 : P.networkType) === "cosmos" ? r1(E == null ? void 0 : E.bech32Address, (Xe = P == null ? void 0 : P.chainInfo) == null ? void 0 : Xe.bech32Config.bech32PrefixAccAddr) : ((Qe = Y(P)) == null ? void 0 : Qe.address) || "", U]
|
1342
|
+
}), ie = Y(C), we = c1({
|
1343
|
+
queryKey: ["balance", ie == null ? void 0 : ie.address, C],
|
1344
|
+
queryFn: async () => await (await _e.fetchBalance(ie.address, C.chainId)).json(),
|
1345
|
+
enabled: !!((Ue = ie == null ? void 0 : ie.address) != null && Ue.length && C.chainId),
|
1367
1346
|
refetchOnWindowFocus: !1
|
1368
|
-
}), { quoteTimer:
|
1369
|
-
routes:
|
1370
|
-
routesData:
|
1347
|
+
}), { quoteTimer: je } = ut({
|
1348
|
+
routes: Z,
|
1349
|
+
routesData: X,
|
1371
1350
|
confirmRoute: d,
|
1372
|
-
setConfirmRoute:
|
1373
|
-
isRoutesEnabled:
|
1374
|
-
fetchBalance:
|
1351
|
+
setConfirmRoute: i,
|
1352
|
+
isRoutesEnabled: re,
|
1353
|
+
fetchBalance: we
|
1375
1354
|
});
|
1376
1355
|
j(() => {
|
1377
|
-
N ||
|
1378
|
-
let
|
1379
|
-
return Number(N) > 0 && (
|
1356
|
+
N || le({});
|
1357
|
+
let a;
|
1358
|
+
return Number(N) > 0 && (a = setTimeout(() => {
|
1380
1359
|
B(!0);
|
1381
1360
|
}, 500)), () => {
|
1382
|
-
clearTimeout(
|
1361
|
+
clearTimeout(a), B(!1);
|
1383
1362
|
};
|
1384
1363
|
}, [N]), j(() => {
|
1385
|
-
|
1386
|
-
}, [
|
1387
|
-
function
|
1388
|
-
x(
|
1364
|
+
Z.isFetching && le({});
|
1365
|
+
}, [Z.isFetching]);
|
1366
|
+
function ve(a) {
|
1367
|
+
x(a);
|
1389
1368
|
}
|
1390
1369
|
function Le() {
|
1391
1370
|
r();
|
1392
1371
|
}
|
1393
|
-
async function
|
1372
|
+
async function Pe(a) {
|
1394
1373
|
if (K)
|
1395
1374
|
try {
|
1396
|
-
let
|
1397
|
-
if (
|
1398
|
-
let
|
1399
|
-
chainInfo:
|
1400
|
-
walletType:
|
1401
|
-
}),
|
1402
|
-
|
1375
|
+
let ue = await n1();
|
1376
|
+
if (ue.length && !ue.includes(a.chainId)) {
|
1377
|
+
let fe = await D({
|
1378
|
+
chainInfo: a,
|
1379
|
+
walletType: z1.KEPLR
|
1380
|
+
}), me = await ee(), xe = await n1();
|
1381
|
+
Te(xe);
|
1403
1382
|
}
|
1404
1383
|
} catch {
|
1405
1384
|
}
|
1406
1385
|
else
|
1407
1386
|
return;
|
1408
1387
|
}
|
1409
|
-
function
|
1410
|
-
(
|
1388
|
+
function h1(a) {
|
1389
|
+
(a == null ? void 0 : a.networkType) == "cosmos" && Pe(a.chainInfo), R(""), Ce({ error: "" }), o == "from" ? w({ ...a }) : o == "to" && T({ ...a });
|
1411
1390
|
}
|
1412
|
-
function
|
1413
|
-
|
1391
|
+
function y1(a) {
|
1392
|
+
Ce({ error: "" }), R(""), o == "from" ? A({ ...a }) : o == "to" && L({ ...a });
|
1414
1393
|
}
|
1415
|
-
function
|
1416
|
-
b(!
|
1394
|
+
function He() {
|
1395
|
+
b(!l);
|
1417
1396
|
}
|
1418
|
-
function Ge(
|
1419
|
-
|
1397
|
+
function Ge(a) {
|
1398
|
+
i(typeof a < "u" ? a : !d);
|
1420
1399
|
}
|
1421
|
-
function
|
1422
|
-
m(
|
1400
|
+
function Re(a) {
|
1401
|
+
m(a);
|
1423
1402
|
}
|
1424
|
-
function
|
1425
|
-
|
1403
|
+
function C1(a) {
|
1404
|
+
Ae(a == null ? void 0 : a.provider), le(a);
|
1426
1405
|
}
|
1427
|
-
function
|
1406
|
+
function v1() {
|
1428
1407
|
setTimeout(() => {
|
1429
|
-
|
1408
|
+
Re(!0), we.refetch();
|
1430
1409
|
}, 1e3);
|
1431
1410
|
}
|
1432
|
-
function
|
1433
|
-
|
1411
|
+
function k1() {
|
1412
|
+
R("");
|
1434
1413
|
}
|
1435
|
-
function
|
1436
|
-
|
1437
|
-
var
|
1438
|
-
(We = (
|
1439
|
-
|
1440
|
-
...
|
1414
|
+
function N1(a, ue, fe) {
|
1415
|
+
_e.fetchTokens(a.chainId, fe).then((me) => me.json()).then((me) => {
|
1416
|
+
var xe, We;
|
1417
|
+
(We = (xe = me.data) == null ? void 0 : xe[a.chainId]) == null || We.forEach((De) => {
|
1418
|
+
ue({
|
1419
|
+
...H,
|
1441
1420
|
coin: De.symbol,
|
1442
1421
|
...De,
|
1443
1422
|
availBal: ""
|
@@ -1445,44 +1424,44 @@ function Mt({ handleShowWallet: t, showWallet: n, fetchChains: s }) {
|
|
1445
1424
|
});
|
1446
1425
|
});
|
1447
1426
|
}
|
1448
|
-
function
|
1449
|
-
|
1427
|
+
function T1() {
|
1428
|
+
R(""), w(P), A($), T(C), L(H), C.networkType !== P.networkType && Be("");
|
1450
1429
|
}
|
1451
1430
|
j(() => {
|
1452
|
-
O.isHistory && f === "" && (V({}),
|
1431
|
+
O.isHistory && f === "" && (V({ allSteps: { steps: null, currentStep: 0 }, stepData: {} }), ve(!1));
|
1453
1432
|
}, [O]);
|
1454
|
-
function
|
1455
|
-
var
|
1456
|
-
if (
|
1457
|
-
let
|
1433
|
+
function I1(a) {
|
1434
|
+
var ue;
|
1435
|
+
if (a && s.isSuccess && a !== (P == null ? void 0 : P.networkType) && a !== (C == null ? void 0 : C.networkType)) {
|
1436
|
+
let fe = pe.keyBy(s.data.data, "chainId"), me = a == "evm" ? "8453" : a == "sol" ? "sol" : a == "sui" ? "1" : a == "btc" ? "btc" : a == "tron" ? "tron" : "cosmoshub-4", xe = a == "evm" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "sol" ? "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" : a == "sui" ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : a == "btc" ? "bitcoin" : a == "tron" ? "0000000000000000000000000000000000" : "uatom";
|
1458
1437
|
w({
|
1459
|
-
...
|
1460
|
-
chain: ((
|
1461
|
-
}),
|
1438
|
+
...fe[me],
|
1439
|
+
chain: ((ue = fe[me]) == null ? void 0 : ue.name) || ""
|
1440
|
+
}), N1(fe[me], A, xe);
|
1462
1441
|
} else
|
1463
1442
|
return;
|
1464
1443
|
}
|
1465
|
-
return /* @__PURE__ */ e(
|
1466
|
-
/* @__PURE__ */ e(
|
1444
|
+
return /* @__PURE__ */ e(A1, { fallback: /* @__PURE__ */ e(P1, {}), children: /* @__PURE__ */ e("div", { children: n ? /* @__PURE__ */ e(Bt, { connectWalletField: M, handleShowWallet: t, handleRecentSelectedWallet: I1 }) : !d && !((Ye = O == null ? void 0 : O.routeId) != null && Ye.length) ? l ? /* @__PURE__ */ e(Lt, { routes: Z, handleShowAllRoutes: He, handleRoutesData: C1, convertVal: ($ == null ? void 0 : $.lastPrice) || 0, amount: N }) : o ? /* @__PURE__ */ e(et, { chainData: o == "from" ? C : P, coinData: o == "from" ? H : $, setChainData: h1, setCoinData: y1, handleReset: Le, showExchangeList: o, fetchBalance: we, fetchChains: s }) : /* @__PURE__ */ p(J, { children: [
|
1445
|
+
/* @__PURE__ */ e(wt, {}),
|
1467
1446
|
/* @__PURE__ */ p("div", { className: "bw-flex bw-relative bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
1468
|
-
/* @__PURE__ */ e(
|
1469
|
-
/* @__PURE__ */ e(o1, { chainData: C, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData:
|
1470
|
-
/* @__PURE__ */ e(o1, { chainData:
|
1447
|
+
/* @__PURE__ */ e(kt, { handleSwap: T1 }),
|
1448
|
+
/* @__PURE__ */ e(o1, { chainData: C, show: "from", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: H }),
|
1449
|
+
/* @__PURE__ */ e(o1, { chainData: P, show: "to", handleShowWallet: t, setShowExchangeList: r, setConnectWalletField: F, coinData: $ })
|
1471
1450
|
] }),
|
1472
|
-
/* @__PURE__ */ e(
|
1473
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1474
|
-
/* @__PURE__ */ e("p", { className: "bw-text-xs bw-font-normal bw-py-1 bw-text-text-redtext", children: typeof (
|
1475
|
-
/* @__PURE__ */ e(
|
1476
|
-
/* @__PURE__ */ e(
|
1477
|
-
] }) : /* @__PURE__ */ e(
|
1451
|
+
/* @__PURE__ */ e(Nt, { amount: N, setAmount: R, fetchBalance: we, getCoinBalance: _, isBalanceLoading: ne }),
|
1452
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(jt, { routes: Z, handleShowAllRoutes: He, routesData: X, amount: N, isRoutesEnabled: k, price: ((X == null ? void 0 : X.outputAmountDisplay) || "") * (($ == null ? void 0 : $.lastPrice) || 0) }) }),
|
1453
|
+
/* @__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 : "" }),
|
1454
|
+
/* @__PURE__ */ e(Tt, { amount: k, routes: Z, routesData: X, quoteTimer: je }),
|
1455
|
+
/* @__PURE__ */ e(It, { routesData: X, handleSuccess: Re, routes: Z, fetchBalancePrev: we, amount: N, isAmountTyped: k, handleShowWallet: t, setConnectWalletField: F, handleConfirmClose: Ge, balanceSol: u, getCoinBalance: _ })
|
1456
|
+
] }) : /* @__PURE__ */ e(At, { handleConfirmClose: Ge, amount: N, routesData: X, resetAmount: k1, routes: Z, handleStopRoute: ve, resetBalance: v1 }) }) });
|
1478
1457
|
}
|
1479
|
-
function
|
1480
|
-
const [n, s] = v(!1), { isConnected: o } =
|
1481
|
-
function r(
|
1458
|
+
function Ft({ fetchChains: t }) {
|
1459
|
+
const [n, s] = v(!1), { isConnected: o } = ge();
|
1460
|
+
function r(l) {
|
1482
1461
|
s(!n);
|
1483
1462
|
}
|
1484
1463
|
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
1485
|
-
|
1464
|
+
Pt,
|
1486
1465
|
{
|
1487
1466
|
handleShowWallet: r,
|
1488
1467
|
fetchChains: t,
|
@@ -1490,15 +1469,15 @@ function Et({ fetchChains: t }) {
|
|
1490
1469
|
}
|
1491
1470
|
) });
|
1492
1471
|
}
|
1493
|
-
const
|
1472
|
+
const qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1494
1473
|
__proto__: null,
|
1495
|
-
default:
|
1474
|
+
default: Ft
|
1496
1475
|
}, Symbol.toStringTag, { value: "Module" }));
|
1497
1476
|
export {
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1477
|
+
pt as c,
|
1478
|
+
yt as g,
|
1479
|
+
qt as i,
|
1501
1480
|
d1 as p,
|
1502
1481
|
u1 as r,
|
1503
|
-
|
1482
|
+
U1 as u
|
1504
1483
|
};
|