@blockend/widget 1.0.63-beta.6 → 1.0.63-beta.8
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-C-bg1G1T.js → AllRoutes-DoSeqp2j.js} +201 -198
- package/dist/{Box-CKZDZLl4.js → Box-FrZ2tCTh.js} +1 -1
- package/dist/{EstGas-Y6UghgVY.js → EstGas-BpIoY_ji.js} +508 -503
- package/dist/{Grow-DffHd2Lw.js → Grow-DBvdz5UZ.js} +196 -192
- package/dist/{InputComp-ChJ6QQhG.js → InputComp-BK2N4hFi.js} +3 -3
- package/dist/{LoadRoute-Di3FyCZ1.js → LoadRoute-De5aGnca.js} +4 -4
- package/dist/{QuotesProgress-yrW4aE32.js → QuotesProgress-CSOReaT-.js} +1 -1
- package/dist/{SwapAsset-DMfKKlC2.js → SwapAsset-BUX68B5Z.js} +1 -1
- package/dist/{Tooltip-B9ycbCMm.js → Tooltip-D2ib9GDE.js} +9 -6
- package/dist/{TxnButton-D3jSURHd.js → TxnButton-1FU3avMw.js} +65 -62
- package/dist/{add-BCSWxwHS.js → add-wYooH1gK.js} +1 -1
- package/dist/{all-wallets-BK_UZQNa.js → all-wallets-C6LJRbpy.js} +1 -1
- package/dist/{app-store-Csa7gIlA.js → app-store-BSWYiqvs.js} +1 -1
- package/dist/{apple-L7GXZYaA.js → apple-CN5Y3Csn.js} +1 -1
- package/dist/{arrow-bottom-B6KjSW0o.js → arrow-bottom-BA21m35g.js} +1 -1
- package/dist/{arrow-bottom-circle-BE_HzVD_.js → arrow-bottom-circle-Dax7dvSP.js} +1 -1
- package/dist/{arrow-left-CrLpeusP.js → arrow-left-CkNoSoW3.js} +1 -1
- package/dist/{arrow-right-vjIbwdKA.js → arrow-right-uzRBP5Kz.js} +1 -1
- package/dist/{arrow-top-BGZ_Nko4.js → arrow-top-B-b_hBCW.js} +1 -1
- package/dist/{bank-DAXIRSNX.js → bank-DVkdUvcz.js} +1 -1
- package/dist/{basic-DHSzNV8S.js → basic-BUlpVIZA.js} +4 -4
- package/dist/{browser-Dyy8p-Si.js → browser-iWNSfbqX.js} +1 -1
- package/dist/{card-BxxY5wwZ.js → card-FxQGBFjD.js} +1 -1
- package/dist/{ccip-Cd9s53s3.js → ccip-BsMDpChz.js} +1 -1
- package/dist/{checkmark-bold-D0YLV0Gj.js → checkmark-bold-BOebxKPv.js} +1 -1
- package/dist/{checkmark-BmDsigGt.js → checkmark-gt7SsdNC.js} +1 -1
- package/dist/{chevron-bottom-QExywqC5.js → chevron-bottom-Ca2sqnim.js} +1 -1
- package/dist/{chevron-left-Dvm0tgmo.js → chevron-left-BWFXvYsO.js} +1 -1
- package/dist/{chevron-right-Dfu2y4ja.js → chevron-right-sRcIaRxa.js} +1 -1
- package/dist/{chevron-top-BM4FFy1t.js → chevron-top-BOaOwVgQ.js} +1 -1
- package/dist/{chrome-store-CQ5YM81g.js → chrome-store-CZ1bDAhi.js} +1 -1
- package/dist/{clock-brI-HWoi.js → clock-PWxIVDxr.js} +1 -1
- package/dist/{close-CjZyNBj9.js → close-BsvKkfca.js} +1 -1
- package/dist/{coinPlaceholder-DfquJeIO.js → coinPlaceholder-DRu8YOSK.js} +1 -1
- package/dist/{compass-E5Qrb0R3.js → compass-B2Qx88h0.js} +1 -1
- package/dist/{copy-BhX3bqeP.js → copy-BXWcyQTW.js} +1 -1
- package/dist/{core-DMQn3TEv.js → core-aF38ikHl.js} +390 -324
- package/dist/{cursor-rW4t6k7C.js → cursor-DKcaK5Bk.js} +1 -1
- package/dist/{cursor-transparent-gL3FEsIs.js → cursor-transparent-BrkSSIaF.js} +1 -1
- package/dist/{desktop-CTtG5hNw.js → desktop-cQ1liLSp.js} +1 -1
- package/dist/{disconnect-DzFwc8XR.js → disconnect-D7sGAcTp.js} +1 -1
- package/dist/{discord-DlYoXVoz.js → discord-DHrqUV5c.js} +1 -1
- package/dist/{down-BhSlN_iU.js → down-DbLP0h4h.js} +4 -3
- package/dist/{etherscan-BC-Eui10.js → etherscan-Dy21HjdF.js} +1 -1
- package/dist/{exclamation-triangle-BQfTkdC_.js → exclamation-triangle-ND9JGDNp.js} +1 -1
- package/dist/{extension-RXz8FN2P.js → extension-BrEPTdg3.js} +1 -1
- package/dist/{external-link-BGuVid3j.js → external-link-Cr1mVYbV.js} +1 -1
- package/dist/{facebook-aDLZabgs.js → facebook-BwOKyhST.js} +1 -1
- package/dist/{farcaster-Dlz_3uh1.js → farcaster-BXI7d_13.js} +1 -1
- package/dist/{filters-DjrngKfX.js → filters-PLSIQrIb.js} +1 -1
- package/dist/{getChainIds-BgdYYYw4.js → getChainIds-DtsR3oXI.js} +6 -4
- package/dist/{getCosmosAddress-DdiKfggl.js → getCosmosAddress-Cda_QoF0.js} +17 -15
- package/dist/{github-jQXBovn4.js → github-Cu2gm8_M.js} +1 -1
- package/dist/{google-juhpPfSN.js → google-C_oZx5UJ.js} +1 -1
- package/dist/{hamburger-enC3srT9.js → hamburger-BbNsjjIW.js} +436 -427
- package/dist/{help-circle-B34SjgAa.js → help-circle-mjNpnYGn.js} +1 -1
- package/dist/{id-DTg4dqLJ.js → id-CkOsoSyg.js} +1 -1
- package/dist/{image-BfaTspT1.js → image-BmMbJrtD.js} +1 -1
- package/dist/{index-BP8wBV05.js → index-BHJL0INc.js} +5508 -5436
- package/dist/{index-DTish3yr.js → index-Bl2UpALc.js} +3 -1
- package/dist/{index-Ch78IFCL.js → index-BpovjW_q.js} +306 -305
- package/dist/{index-CeXHLGpN.js → index-ByCz02Nd.js} +1151 -1134
- package/dist/{index-BYH4tXlz.js → index-C0eMjgxx.js} +1 -1
- package/dist/{index-Dbq_Uq3C.js → index-C6391ncZ.js} +32 -21
- package/dist/{index-AY1swC9S.js → index-Cu1zb9Vh.js} +78 -78
- package/dist/{index-A2zB7LtZ.js → index-CvkScNdo.js} +19 -14
- package/dist/{index-CkO12dzp.js → index-DWVfD1iH.js} +1 -1
- package/dist/{index-Dy825CPY.js → index-Dt6pc29P.js} +33 -19
- package/dist/{index-BE7nGP8x.js → index-VMjoWWTF.js} +2 -2
- package/dist/{index-Bcf_V0vR.js → index-WSRoS5bE.js} +4 -4
- package/dist/{index.es-DAnpsBBV.js → index.es-BYP1FMWM.js} +978 -958
- package/dist/{index.es-KYOLIFvY.js → index.es-Ccdd2zBW.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-circle-BMGdz31T.js → info-circle-C9t_2-0o.js} +1 -1
- package/dist/{info-DXR5_pCm.js → info-o12C44h6.js} +1 -1
- package/dist/{lightbulb-CdOoPgKL.js → lightbulb-CFUkH4-D.js} +1 -1
- package/dist/{mail-CeFdTx-v.js → mail-uP1qUZ_i.js} +1 -1
- package/dist/{mobile-CkqO6MX_.js → mobile-DixqXR0f.js} +1 -1
- package/dist/{more-D_LzvhpH.js → more-DgsI8N8X.js} +1 -1
- package/dist/{network-placeholder-DawOGq0q.js → network-placeholder-BrR90hPT.js} +1 -1
- package/dist/{nftPlaceholder-BwVP_ztO.js → nftPlaceholder-CWEsPKB-.js} +1 -1
- package/dist/{off-DKTjO0JH.js → off-CUd-_5nY.js} +1 -1
- package/dist/{play-store-D9HgU1YM.js → play-store-Cmr6xelI.js} +1 -1
- package/dist/{plus-XBvNjfM5.js → plus-tMp0VWtD.js} +1 -1
- package/dist/{qr-code-td4y6spM.js → qr-code-BsESP39Q.js} +1 -1
- package/dist/{recycle-horizontal-CF_Q90px.js → recycle-horizontal-DGoMsnJ_.js} +1 -1
- package/dist/{refresh-CJM59Ha2.js → refresh-D5_Pyj_U.js} +1 -1
- package/dist/{reown-logo-CfquSlUp.js → reown-logo-C-R8XQgl.js} +1 -1
- package/dist/{search-eqn-cEXl.js → search-DG8Ckas2.js} +1 -1
- package/dist/{send-4M8qiOxg.js → send-Dc3NVWdG.js} +1 -1
- package/dist/{swapHorizontal-Cp0wJcng.js → swapHorizontal-Dvlln8P-.js} +1 -1
- package/dist/{swapHorizontalBold-YzgskIUT.js → swapHorizontalBold-CcTTrQAV.js} +1 -1
- package/dist/{swapHorizontalMedium-CkfCXGoR.js → swapHorizontalMedium-C5A8jqx1.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-9-91rUX_.js → swapHorizontalRoundedBold-tW-YwI32.js} +1 -1
- package/dist/{swapVertical-Dnq_-N6W.js → swapVertical-BljauHkF.js} +1 -1
- package/dist/{telegram-DcW73J68.js → telegram-o4Wg_e4w.js} +1 -1
- package/dist/{three-dots-S-bKyjz1.js → three-dots-CM5EXIBR.js} +1 -1
- package/dist/{twitch-BfOZoT8l.js → twitch-Bv2ehoaq.js} +1 -1
- package/dist/{twitterIcon-CgXW2ZuR.js → twitterIcon-Dhg6xNIq.js} +1 -1
- package/dist/{unsupportedProp-6VTSRJm-.js → unsupportedProp-BHYAXJVy.js} +1 -1
- package/dist/{useRegisterError-qXWGu3GR.js → useRegisterError-Cdz9-RAY.js} +126 -122
- package/dist/{verify-filled-DX9iyuvD.js → verify-filled-ZGfQ4M0_.js} +1 -1
- package/dist/{verify-CUsfxmX5.js → verify-kJKoDAtL.js} +1 -1
- package/dist/{w3m-modal-BQTw_53B.js → w3m-modal-NOYXxJxN.js} +2 -2
- package/dist/{wallet-z3Rs6j-C.js → wallet-BXekW4Rx.js} +1 -1
- package/dist/{wallet-placeholder-CaGeJgid.js → wallet-placeholder-DNvWxMPk.js} +1 -1
- package/dist/{walletconnect-oumirz7I.js → walletconnect-CBQH2nMt.js} +1 -1
- package/dist/{warning-circle-BlQqf0xM.js → warning-circle-Dx0pFR-L.js} +1 -1
- package/dist/{x-6GxPtZEq.js → x-C3hoICgM.js} +1 -1
- package/package.json +2 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as b, jsx as t, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { u as n, S as W } from "./index-
|
|
2
|
+
import { u as n, S as W } from "./index-BHJL0INc.js";
|
|
3
3
|
import { useState as S, useRef as x } from "react";
|
|
4
|
-
import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-
|
|
4
|
+
import { u as j, i as I, W as D, F, f as p, c as u, z as R } from "./useRegisterError-Cdz9-RAY.js";
|
|
5
5
|
import { useAccount as T, useBalance as A } from "wagmi";
|
|
6
6
|
import "@dynamic-labs/sdk-react-core";
|
|
7
|
-
import { c as B, r as G } from "./index-
|
|
7
|
+
import { c as B, r as G } from "./index-BpovjW_q.js";
|
|
8
8
|
function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBalanceLoading: f }) {
|
|
9
9
|
var d, o;
|
|
10
10
|
const s = n((a) => a.configuration), e = n((a) => a.fromCoin), r = n((a) => a.fromChain), { isAnyWalletConnected: g } = j({ chainData: r }), [$, z] = S(40), { address: N } = T(), v = x(), { defaultCoin: y } = I;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as b, jsxs as t, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { t as te } from "./truncate-D9t92mVX.js";
|
|
3
|
-
import { u as r, S as o, l as we } from "./index-
|
|
3
|
+
import { u as r, S as o, l as we } from "./index-BHJL0INc.js";
|
|
4
4
|
import { useState as ie, useEffect as le } from "react";
|
|
5
5
|
import { s as a } from "./WidgetForm.module-QHJ0-m5f.js";
|
|
6
6
|
import { G as ce, C as de, S as me } from "./clockIcon-C2W5xvyt.js";
|
|
7
|
-
import { S as re } from "./down-
|
|
7
|
+
import { S as re } from "./down-DbLP0h4h.js";
|
|
8
8
|
import { e as se } from "./ethertousd-CC_ezooz.js";
|
|
9
|
-
import { O as J } from "./index-
|
|
10
|
-
import { F as K, i as ae } from "./useRegisterError-
|
|
9
|
+
import { O as J } from "./index-C0eMjgxx.js";
|
|
10
|
+
import { F as K, i as ae } from "./useRegisterError-Cdz9-RAY.js";
|
|
11
11
|
function Se({ routes: n, handleShowAllRoutes: Q, routesData: e, price: X, amount: Y, isRoutesEnabled: y }) {
|
|
12
12
|
var v, N, F, S, k, u, $, E, j, I, U, C, A, G, O, T, z, L, R, _, M, V, q, B, P, W;
|
|
13
13
|
const x = n.data, [c, Z] = ie(), l = r((i) => i.gradient), w = r((i) => i.configuration), h = r((i) => i.fromChain), g = r((i) => i.fromCoin), p = r((i) => i.toChain), d = r((i) => i.toCoin), { defaultCoin: D } = ae;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as o, jsx as a, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { s as l } from "./WidgetForm.module-QHJ0-m5f.js";
|
|
3
|
-
import { u as g } from "./index-
|
|
3
|
+
import { u as g } from "./index-BHJL0INc.js";
|
|
4
4
|
function y({ routesData: x, routes: e, quoteTimer: n, amount: c }) {
|
|
5
5
|
var s, b, d, w;
|
|
6
6
|
const r = g((i) => i.configuration), t = g((i) => i.gradient);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-
|
|
1
|
+
import { b as go, g as To, i as yo, _ as vo, p as B, d as n, e as D, s as Q, f as Ve, h as Po, j as ze, P as e } from "./index-BHJL0INc.js";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-
|
|
3
|
+
import { G as Be, b as wo, u as Ro, a as Co, P as He } from "./Grow-DBvdz5UZ.js";
|
|
4
4
|
import { jsx as j, jsxs as Se } from "react/jsx-runtime";
|
|
5
|
-
import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, D as A, E as _o, w as No } from "./useRegisterError-
|
|
5
|
+
import { j as xo, q as I, l as Ue, s as Oo, b as Eo, n as Mo, D as A, E as _o, w as No } from "./useRegisterError-Cdz9-RAY.js";
|
|
6
6
|
function Lo(r) {
|
|
7
7
|
return To("MuiTooltip", r);
|
|
8
8
|
}
|
|
@@ -231,7 +231,8 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
|
231
231
|
current: o
|
|
232
232
|
} = p.useRef(Pe !== void 0);
|
|
233
233
|
p.useEffect(() => {
|
|
234
|
-
l && l.disabled && !o && m !== "" && l.tagName.toLowerCase()
|
|
234
|
+
l && l.disabled && !o && m !== "" && l.tagName.toLowerCase() === "button" && console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.", "A disabled element does not fire events.", "Tooltip needs to listen to the child element's events to display the title.", "", "Add a simple wrapper element, such as a `span`."].join(`
|
|
235
|
+
`));
|
|
235
236
|
}, [m, l, o]);
|
|
236
237
|
}
|
|
237
238
|
const q = Co(Je), T = p.useRef(), N = Ue(() => {
|
|
@@ -309,10 +310,12 @@ const ko = /* @__PURE__ */ p.forwardRef(function(t, s) {
|
|
|
309
310
|
onMouseMove: co
|
|
310
311
|
} : {});
|
|
311
312
|
B.env.NODE_ENV !== "production" && (a["data-mui-internal-clone-element"] = !0, p.useEffect(() => {
|
|
312
|
-
l && l.getAttribute("data-mui-internal-clone-element")
|
|
313
|
+
l && !l.getAttribute("data-mui-internal-clone-element") && console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.", "Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
314
|
+
`));
|
|
313
315
|
}, [l]));
|
|
314
316
|
const v = {};
|
|
315
|
-
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(G, a.onMouseLeave), H || (v.onMouseOver = $, v.onMouseLeave = G)), qe || (a.onFocus = k(De, a.onFocus), a.onBlur = k($e, a.onBlur), H || (v.onFocus = De, v.onBlur = $e)), B.env.NODE_ENV !== "production" && c.props.title
|
|
317
|
+
Ke || (a.onTouchStart = io, a.onTouchEnd = lo), he || (a.onMouseOver = k($, a.onMouseOver), a.onMouseLeave = k(G, a.onMouseLeave), H || (v.onMouseOver = $, v.onMouseLeave = G)), qe || (a.onFocus = k(De, a.onFocus), a.onBlur = k($e, a.onBlur), H || (v.onFocus = De, v.onBlur = $e)), B.env.NODE_ENV !== "production" && c.props.title && console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.", `Remove this title prop \`${c.props.title}\` or the Tooltip component.`].join(`
|
|
318
|
+
`));
|
|
316
319
|
const uo = p.useMemo(() => {
|
|
317
320
|
var o;
|
|
318
321
|
let i = [{
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsx as G } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useEffect as z } from "react";
|
|
3
3
|
import { useDynamicContext as xe, useSwitchNetwork as Me, useIsLoggedIn as Oe } from "@dynamic-labs/sdk-react-core";
|
|
4
|
-
import { a as _, u as
|
|
4
|
+
import { a as _, u as N, aA as Re, aB as ge } from "./index-BHJL0INc.js";
|
|
5
5
|
import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
|
|
6
6
|
import { useAccount as Ve, useConfig as qe, useSwitchChain as Pe, useBalance as _e } from "wagmi";
|
|
7
|
-
import { u as
|
|
7
|
+
import { u as pe, d as Qe, c as He, C as ye } from "./useRegisterError-Cdz9-RAY.js";
|
|
8
8
|
import { v as Je } from "./validError-CDlJpg_f.js";
|
|
9
|
-
import { u as Ke, g as Ue, p as Xe } from "./index-
|
|
9
|
+
import { u as Ke, g as Ue, p as Xe } from "./index-BpovjW_q.js";
|
|
10
10
|
function Ye(n) {
|
|
11
|
-
const { wallet:
|
|
11
|
+
const { wallet: g, address: a } = _(), [h, B] = v(0);
|
|
12
12
|
async function x() {
|
|
13
|
-
const F = await window.tronWeb.trx.getBalance(
|
|
13
|
+
const F = await window.tronWeb.trx.getBalance(a);
|
|
14
14
|
B(F / Math.pow(10, 6));
|
|
15
15
|
}
|
|
16
16
|
return z(() => {
|
|
17
|
-
|
|
18
|
-
}, [
|
|
17
|
+
a && (n == null ? void 0 : n.networkType) === "tron" && x();
|
|
18
|
+
}, [a, n == null ? void 0 : n.networkType]), { tronBal: h };
|
|
19
19
|
}
|
|
20
20
|
function A(n) {
|
|
21
|
-
if (n.key.toLowerCase() === "backpacksol")
|
|
21
|
+
if (console.log(n, "primary wallet"), n.key.toLowerCase() === "backpacksol")
|
|
22
22
|
return !0;
|
|
23
23
|
}
|
|
24
24
|
function Ze() {
|
|
25
|
-
const [n,
|
|
25
|
+
const [n, g] = v(0), a = N((x) => x.fromChain), { primaryWallet: h } = xe();
|
|
26
26
|
async function B() {
|
|
27
|
-
let x = await
|
|
28
|
-
|
|
27
|
+
let x = await h.getBalance();
|
|
28
|
+
g(Number(x) || 0);
|
|
29
29
|
}
|
|
30
30
|
return z(() => {
|
|
31
|
-
(
|
|
32
|
-
}, [
|
|
31
|
+
(a.networkType === "btc" || a.networkType === "sui") && B();
|
|
32
|
+
}, [a.networkType, h]), n;
|
|
33
33
|
}
|
|
34
|
-
function lt({ routesData: n, routes:
|
|
34
|
+
function lt({ routesData: n, routes: g, amount: a, isAmountTyped: h, handleShowWallet: B, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: Te, handleSuccess: Q }) {
|
|
35
35
|
var C, ee, te, se, re, ce, ne, ie, de, ae, le, oe, we;
|
|
36
|
-
const w =
|
|
36
|
+
const w = N((s) => s.gradient), I = N((s) => s.configuration), e = N((s) => s.fromChain), i = N((s) => s.fromCoin), r = N((s) => s.toChain), b = N((s) => s.toCoin), { isConnected: j, address: H, chain: m } = Ve(), { address: J, isConnected: We } = _(), Ie = qe(), me = Me(), { getBothWalletConnection: Ne, getConnectWallet: he } = pe({
|
|
37
37
|
chainData: e
|
|
38
|
-
}), { connected: K, address: U, disconnect: De } = _(), M =
|
|
38
|
+
}), { connected: K, address: U, disconnect: De } = _(), M = N((s) => s.toDisconnect), d = N((s) => s.customWallet), { getWallet: Be } = pe({ chainData: e }), fe = he(e, r), [O, Ge] = v("101"), { tronBal: R } = Ye(e), { cosmosBalance: X } = Ke(), Y = Ze(), V = ((C = e.chain) == null ? void 0 : C.length) && ((ee = r.chain) == null ? void 0 : ee.length), q = ((te = i.address) == null ? void 0 : te.length) && ((se = b.address) == null ? void 0 : se.length), Se = Qe(), Z = Re(), { switchChain: ke, switchChainAsync: Ee, isPending: $e } = Pe({
|
|
39
39
|
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
|
40
40
|
config: Ie,
|
|
41
41
|
throwForSwitchChainNotSupported: !0,
|
|
@@ -47,7 +47,7 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowW
|
|
|
47
47
|
token: "",
|
|
48
48
|
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
|
49
49
|
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
|
50
|
-
}), W = He(Te || 0, 11), [o,
|
|
50
|
+
}), W = He(Te || 0, 11), [o, l] = v({
|
|
51
51
|
text: "",
|
|
52
52
|
isGradient: !1,
|
|
53
53
|
color: "bw-bg-border-primary"
|
|
@@ -55,27 +55,30 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowW
|
|
|
55
55
|
async function Fe() {
|
|
56
56
|
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id))
|
|
57
57
|
try {
|
|
58
|
-
await
|
|
59
|
-
} catch {
|
|
58
|
+
await Ee({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
|
59
|
+
} catch (s) {
|
|
60
|
+
console.log(s, "err");
|
|
60
61
|
}
|
|
61
62
|
else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
|
62
63
|
try {
|
|
63
64
|
let s = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
|
64
65
|
D();
|
|
65
|
-
} catch {
|
|
66
|
+
} catch (s) {
|
|
67
|
+
console.log(s, "err");
|
|
66
68
|
}
|
|
67
|
-
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(
|
|
69
|
+
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(ge.TransactionStarted, {
|
|
68
70
|
...n
|
|
69
|
-
}), f && (Q(!1), F())) : (Z.emit(
|
|
71
|
+
}), f && (Q(!1), F())) : (Z.emit(ge.TransactionStarted, {
|
|
70
72
|
...n
|
|
71
73
|
}), f && (Q(!1), F()));
|
|
72
74
|
}
|
|
73
|
-
const { primaryWallet: p } = xe(), P = Oe(), f = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Be(e)) == null ? void 0 : re.address) != null && ce.length) :
|
|
75
|
+
const { primaryWallet: p } = xe(), P = Oe(), f = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Be(e)) == null ? void 0 : re.address) != null && ce.length) : Ne(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), D = async () => {
|
|
74
76
|
if (p)
|
|
75
77
|
try {
|
|
76
78
|
const s = await p.getNetwork();
|
|
77
|
-
Ge(s);
|
|
78
|
-
} catch {
|
|
79
|
+
console.log("Current network:", s), Ge(s);
|
|
80
|
+
} catch (s) {
|
|
81
|
+
console.error("Error getting network:", s);
|
|
79
82
|
}
|
|
80
83
|
else
|
|
81
84
|
return;
|
|
@@ -83,67 +86,67 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowW
|
|
|
83
86
|
z(() => {
|
|
84
87
|
D();
|
|
85
88
|
}, [p]);
|
|
86
|
-
function k(s,
|
|
87
|
-
let
|
|
88
|
-
return
|
|
89
|
+
function k(s, y) {
|
|
90
|
+
let u = s / Math.pow(10, y);
|
|
91
|
+
return u < 1e-6 ? u.toFixed(20) : u;
|
|
89
92
|
}
|
|
90
93
|
function Le() {
|
|
91
94
|
var s;
|
|
92
95
|
return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
|
|
93
96
|
}
|
|
94
97
|
function je(s) {
|
|
95
|
-
var
|
|
96
|
-
return Number(((
|
|
98
|
+
var y;
|
|
99
|
+
return Number(((y = X[Xe(s.address)]) == null ? void 0 : y.amount) || 0) / Math.pow(10, s.decimals);
|
|
97
100
|
}
|
|
98
101
|
function Ae() {
|
|
99
|
-
var
|
|
102
|
+
var $;
|
|
100
103
|
let s = {};
|
|
101
|
-
async function
|
|
102
|
-
let
|
|
104
|
+
async function y(t, c) {
|
|
105
|
+
let E = Object.keys(s);
|
|
103
106
|
s[t == null ? void 0 : t.chainId] ? (s[t == null ? void 0 : t.chainId].amountInToken += c.amountInToken, s[t == null ? void 0 : t.chainId].gas += k(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
|
|
104
107
|
amountInToken: c.amountInToken,
|
|
105
108
|
gas: k(c.amountInToken, t == null ? void 0 : t.decimals),
|
|
106
109
|
token: t,
|
|
107
110
|
nativeBal: (d == null ? void 0 : d.length) > 30 && !M && (t == null ? void 0 : t.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (t == null ? void 0 : t.networkType) == "sol" ? L : (t == null ? void 0 : t.networkType) == "tron" ? R : (t == null ? void 0 : t.networkType) == "btc" || (t == null ? void 0 : t.networkType) == "sui" ? Y : (t == null ? void 0 : t.networkType) == "cosmos" ? je(t) : (t == null ? void 0 : t.networkType) == "tron" ? Ue(J) : Le(),
|
|
108
111
|
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
|
109
|
-
order: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (t == null ? void 0 : t.chainId) ? 2 :
|
|
112
|
+
order: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (t == null ? void 0 : t.chainId) ? 2 : E.length > 2 ? 3 : 2
|
|
110
113
|
};
|
|
111
114
|
}
|
|
112
|
-
(
|
|
115
|
+
($ = n == null ? void 0 : n.fee) == null || $.forEach((t) => {
|
|
113
116
|
const { token: c } = t;
|
|
114
|
-
t.source.toLowerCase() == "from_source_wallet" &&
|
|
117
|
+
t.source.toLowerCase() == "from_source_wallet" && y(c, t);
|
|
115
118
|
});
|
|
116
|
-
let
|
|
117
|
-
if (Number(
|
|
118
|
-
|
|
119
|
+
let u = W;
|
|
120
|
+
if (console.log(Number(u), Number(a), s, "coinBalance"), Number(a) > Number(u))
|
|
121
|
+
l({
|
|
119
122
|
text: `Insufficient Balance ${i.coin || ""}`,
|
|
120
123
|
isGradient: !1,
|
|
121
124
|
color: "bw-bg-border-primary"
|
|
122
125
|
});
|
|
123
126
|
else if ((T != null && T.isLoading || T.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !R && (e == null ? void 0 : e.networkType) === "tron")
|
|
124
|
-
|
|
127
|
+
l({
|
|
125
128
|
text: "Fetching Balance..",
|
|
126
129
|
isGradient: !1,
|
|
127
130
|
color: "bw-bg-border-primary"
|
|
128
131
|
});
|
|
129
132
|
else {
|
|
130
|
-
let t = Object.values(s).sort((c,
|
|
133
|
+
let t = Object.values(s).sort((c, E) => c.order - E.order);
|
|
131
134
|
t.some((c) => {
|
|
132
|
-
var
|
|
133
|
-
return c != null && c.isFromChain && Number(
|
|
134
|
-
text: `Insufficient ${((
|
|
135
|
+
var E, be, ue;
|
|
136
|
+
return c != null && c.isFromChain && Number(a) <= Number(u) && Number(c.nativeBal) - Number(a) < c.gas && (i != null && i.isNative) || Number(a) <= Number(u) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (l({
|
|
137
|
+
text: `Insufficient ${((E = c == null ? void 0 : c.token) == null ? void 0 : E.symbol) || ""} for gas on ${c.token.blockchain}`,
|
|
135
138
|
isGradient: !1,
|
|
136
139
|
color: "bw-bg-border-primary"
|
|
137
|
-
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (
|
|
140
|
+
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (l({
|
|
138
141
|
text: `Insufficient ${((ue = c == null ? void 0 : c.token) == null ? void 0 : ue.symbol) || ""} for gas on ${c.token.blockchain}`,
|
|
139
142
|
isGradient: !1,
|
|
140
143
|
color: "bw-bg-border-primary"
|
|
141
|
-
}), !0) : (
|
|
144
|
+
}), !0) : (l({
|
|
142
145
|
text: "",
|
|
143
146
|
isGradient: !0,
|
|
144
147
|
color: w || S.gradientbutton
|
|
145
148
|
}), !0);
|
|
146
|
-
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") &&
|
|
149
|
+
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && l({
|
|
147
150
|
text: "",
|
|
148
151
|
isGradient: !0,
|
|
149
152
|
color: w || S.gradientbutton
|
|
@@ -151,53 +154,53 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowW
|
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
156
|
z(() => {
|
|
154
|
-
var s,
|
|
155
|
-
!i.coin.length || !(b != null && b.coin.length) ?
|
|
157
|
+
var s, y, u;
|
|
158
|
+
!i.coin.length || !(b != null && b.coin.length) ? l({
|
|
156
159
|
text: "Select Token",
|
|
157
160
|
isGradient: !0,
|
|
158
161
|
color: w || S.gradientbutton
|
|
159
|
-
}) : f ? typeof
|
|
162
|
+
}) : f ? typeof a < "u" && Number(a || 0) <= 0 ? l({
|
|
160
163
|
text: "Enter Amount",
|
|
161
164
|
isGradient: !1,
|
|
162
165
|
color: "bw-bg-border-primary"
|
|
163
|
-
}) :
|
|
166
|
+
}) : g.isFetching || !h ? l({
|
|
164
167
|
text: "Loading Routes...",
|
|
165
168
|
isGradient: !1,
|
|
166
169
|
color: "bw-bg-border-primary"
|
|
167
|
-
}) : e.chainId === "eclipse-svm" && !A(p) ?
|
|
170
|
+
}) : e.chainId === "eclipse-svm" && !A(p) ? l({
|
|
168
171
|
text: `Select ${e.name} wallet`,
|
|
169
172
|
isGradient: !0,
|
|
170
173
|
color: w || S.gradientbutton
|
|
171
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ?
|
|
174
|
+
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? l({
|
|
172
175
|
text: "Enter recipient wallet address",
|
|
173
176
|
isGradient: !0,
|
|
174
177
|
color: w || S.gradientbutton
|
|
175
|
-
}) : (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) === "evm" && H === d && (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) || (e == null ? void 0 : e.networkType) === "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) ?
|
|
178
|
+
}) : (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) === "evm" && H === d && (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) || (e == null ? void 0 : e.networkType) === "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) === (b == null ? void 0 : b.address) && (e == null ? void 0 : e.chainId) === (r == null ? void 0 : r.chainId) ? l({
|
|
176
179
|
text: "From and To asset can not be the same!",
|
|
177
180
|
isGradient: !1,
|
|
178
181
|
color: "bw-bg-border-primary"
|
|
179
|
-
}) : (
|
|
182
|
+
}) : (u = (y = (s = g == null ? void 0 : g.data) == null ? void 0 : s.data) == null ? void 0 : y.quotes) != null && u.length ? g != null && g.error ? l({
|
|
180
183
|
text: "Failed to fetch Quotes",
|
|
181
184
|
isGradient: !1,
|
|
182
185
|
color: "bw-bg-border-primary"
|
|
183
|
-
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== O && (e == null ? void 0 : e.networkType) === "sol" ?
|
|
186
|
+
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== O && (e == null ? void 0 : e.networkType) === "sol" ? l({
|
|
184
187
|
text: `Switch Chain to ${e.chain}`,
|
|
185
188
|
isGradient: !0,
|
|
186
189
|
color: w || S.gradientbutton
|
|
187
|
-
}) : Ae() :
|
|
190
|
+
}) : Ae() : l({
|
|
188
191
|
text: "No Routes Found",
|
|
189
192
|
isGradient: !1,
|
|
190
193
|
color: "bw-bg-border-primary"
|
|
191
|
-
}) :
|
|
194
|
+
}) : l({
|
|
192
195
|
text: "",
|
|
193
196
|
isGradient: !0,
|
|
194
197
|
color: w || S.gradientbutton
|
|
195
198
|
});
|
|
196
|
-
}, [O, p, i, b,
|
|
199
|
+
}, [O, p, i, b, a, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, f, g.isFetching, m == null ? void 0 : m.id, h, R, L, d, Y, X, J]);
|
|
197
200
|
let ve = [`switch chain to ${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, `select ${(de = e.chain) == null ? void 0 : de.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
|
|
198
201
|
function ze() {
|
|
199
|
-
var s,
|
|
200
|
-
return f ?
|
|
202
|
+
var s, y, u, $;
|
|
203
|
+
return f ? g.isFetching ? !0 : o.text.length ? !ve.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !(($ = (u = (y = g.data) == null ? void 0 : y.data) == null ? void 0 : u.quotes) != null && $.length) : !1;
|
|
201
204
|
}
|
|
202
205
|
return /* @__PURE__ */ G(
|
|
203
206
|
"button",
|
|
@@ -213,7 +216,7 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowW
|
|
|
213
216
|
onClick: () => {
|
|
214
217
|
f || (B(!0), ((e == null ? void 0 : e.networkType) !== "evm" && j || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && K && U) && !M ? x("from") : j && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && K && U || M ? x("to") : x("from")), e.chainId === "eclipse-svm" && !A(p) ? (B(!0), x("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? (B(!0), x("to")) : Fe();
|
|
215
218
|
},
|
|
216
|
-
children: /* @__PURE__ */ G("div", { className: "bw-rounded-sm bw-bg-background-container bw-flex bw-items-center bw-justify-center b-w-full bw-h-full", children: /* @__PURE__ */ G("p", { className: "bw-relative bw-z-20", children: V && q ?
|
|
219
|
+
children: /* @__PURE__ */ G("div", { className: "bw-rounded-sm bw-bg-background-container bw-flex bw-items-center bw-justify-center b-w-full bw-h-full", children: /* @__PURE__ */ G("p", { className: "bw-relative bw-z-20", children: V && q ? $e ? /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) : f ? o.text.length ? o.text : "Start Transaction" : `Connect ${fe} Wallet` : /* @__PURE__ */ G("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ G(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
|
217
220
|
}
|
|
218
221
|
);
|
|
219
222
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-
|
|
2
|
-
import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-
|
|
3
|
-
import { n as Wn } from "./index-
|
|
1
|
+
import { i as D, e as G, r as q, a as A, x as c, C as U, A as M, O as tt, b as z, E as et, R as O, c as Ut, d as K, f as N, S as pe, g as Cn, W as fe, h as Ze, j as vi, T as ti, k as Xt, M as on, l as rn, m as Dt, n as yi, o as $n } from "./core-aF38ikHl.js";
|
|
2
|
+
import { n as u, c as B, o as W, r as E, U as ht, e as Rn, f as En, a as In } from "./index-Cu1zb9Vh.js";
|
|
3
|
+
import { n as Wn } from "./index-BHJL0INc.js";
|
|
4
4
|
const Sn = D`
|
|
5
5
|
:host {
|
|
6
6
|
position: relative;
|
|
@@ -899,7 +899,7 @@ let xt = class extends A {
|
|
|
899
899
|
tabIdx=${W(this.tabIdx)}
|
|
900
900
|
></w3m-connect-recommended-widget>`;
|
|
901
901
|
default:
|
|
902
|
-
return null;
|
|
902
|
+
return console.warn(`Unknown connector type: ${h}`), null;
|
|
903
903
|
}
|
|
904
904
|
});
|
|
905
905
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad as L, ae as b, af as F, ag as N, ah as P, ai as w, aj as S, ak as E, al as $, am as C, an as I, ao as m, ap as G, aq as R, ar as k, as as y, at as O, au as q, av as T, aw as v, ax as D, ay as A, az as H } from "./index-
|
|
1
|
+
import { ad as L, ae as b, af as F, ag as N, ah as P, ai as w, aj as S, ak as E, al as $, am as C, an as I, ao as m, ap as G, aq as R, ar as k, as as y, at as O, au as q, av as T, aw as v, ax as D, ay as A, az as H } from "./index-BHJL0INc.js";
|
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
|
3
3
|
function x(t) {
|
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|