@blockend/widget 1.0.63-beta.7 → 1.0.63-beta.9
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-B0qUNuDH.js → AllRoutes-RsI9ZXES.js} +201 -198
- package/dist/{Box-CIiWusfY.js → Box-Bsthq0_N.js} +1 -1
- package/dist/{EstGas-DcHY3ys9.js → EstGas-C8a9w7-3.js} +508 -503
- package/dist/{Grow-DCCl_HDH.js → Grow-Cou9ttWc.js} +196 -192
- package/dist/{InputComp-D84lcPgv.js → InputComp-CqDI0LCa.js} +3 -3
- package/dist/{LoadRoute-BJ073SQm.js → LoadRoute-BDhaiYLj.js} +4 -4
- package/dist/{QuotesProgress-BhbeWzf-.js → QuotesProgress-CrxvY6km.js} +1 -1
- package/dist/{SwapAsset-CDjqqcam.js → SwapAsset-DgBJaBem.js} +1 -1
- package/dist/{Tooltip-D1CJjTMd.js → Tooltip-BD1qYOl-.js} +9 -6
- package/dist/{TxnButton-DrCYtGR2.js → TxnButton-_ODDOY9B.js} +65 -62
- package/dist/{add-DFvtJrK0.js → add-CTFXgCoU.js} +1 -1
- package/dist/{all-wallets-B5Vw3jBp.js → all-wallets-BTcn7L58.js} +1 -1
- package/dist/{app-store-Dp1us_2b.js → app-store-CL8bQPYd.js} +1 -1
- package/dist/{apple-CyJQHnZe.js → apple-BIieeXyi.js} +1 -1
- package/dist/{arrow-bottom-C0_kjqqq.js → arrow-bottom-D8fFMnJb.js} +1 -1
- package/dist/{arrow-bottom-circle-Br4e-YoU.js → arrow-bottom-circle-H5Iy9C92.js} +1 -1
- package/dist/{arrow-left-Bi5TQm-u.js → arrow-left-CqgyaTJw.js} +1 -1
- package/dist/{arrow-right-DAOlK5Of.js → arrow-right-CoBk-CRO.js} +1 -1
- package/dist/{arrow-top-DpsiC8Zq.js → arrow-top-CWGa5YvA.js} +1 -1
- package/dist/{bank-6aG9mNUI.js → bank-DUIHaEE6.js} +1 -1
- package/dist/{basic-UMeBjBV-.js → basic-DTJ6LiE0.js} +4 -4
- package/dist/{browser-CkjFn1d5.js → browser-CWbcIFqg.js} +1 -1
- package/dist/{card-DS4AU_FY.js → card-5cs4Y-pe.js} +1 -1
- package/dist/{ccip-BrVHwCbp.js → ccip-Cx7kojkW.js} +1 -1
- package/dist/{checkmark-CeP4WNd7.js → checkmark-DOR2w-Yw.js} +1 -1
- package/dist/{checkmark-bold-CbdhdtOj.js → checkmark-bold-DnmQ8854.js} +1 -1
- package/dist/{chevron-bottom-osjx6IRf.js → chevron-bottom-CYv00Eqy.js} +1 -1
- package/dist/{chevron-left-CE8GQp6s.js → chevron-left-ClK8tPAM.js} +1 -1
- package/dist/{chevron-right-V_JxxsRS.js → chevron-right-BA4eoHgX.js} +1 -1
- package/dist/{chevron-top-DW3igmoO.js → chevron-top-DgNCuFSo.js} +1 -1
- package/dist/{chrome-store-Cwyq98j_.js → chrome-store-DkV5Q5oq.js} +1 -1
- package/dist/{clock-NYPFcLBj.js → clock-Dd8uJP8B.js} +1 -1
- package/dist/{close-1V1i86MN.js → close-D5EGSnX-.js} +1 -1
- package/dist/{coinPlaceholder-Ck0KQsDS.js → coinPlaceholder-C6-DzwbG.js} +1 -1
- package/dist/{compass-qSr0J_3b.js → compass-D3vVjifM.js} +1 -1
- package/dist/{copy-Db-FfgvN.js → copy-DoBp5eyn.js} +1 -1
- package/dist/{core-D1o31ecc.js → core-Bo9kRq09.js} +390 -324
- package/dist/{cursor-Bpo_Ep_-.js → cursor-Cu-wQRxl.js} +1 -1
- package/dist/{cursor-transparent-DB6ZjdBE.js → cursor-transparent-BAZBbOFu.js} +1 -1
- package/dist/{desktop-C3qMRi5a.js → desktop-BMNtQ_LC.js} +1 -1
- package/dist/{disconnect-B7SXMkgo.js → disconnect-OEG67Lm4.js} +1 -1
- package/dist/{discord-DhSBlRzH.js → discord-g9tOcA3P.js} +1 -1
- package/dist/{down-CT_QTkXc.js → down-Bcq_UUqJ.js} +4 -3
- package/dist/{etherscan-QRuV72r0.js → etherscan-9LF9JwXx.js} +1 -1
- package/dist/{exclamation-triangle-heu7m2rb.js → exclamation-triangle-BvnWFNRm.js} +1 -1
- package/dist/{extension-C91DLfkN.js → extension-cjTCqimH.js} +1 -1
- package/dist/{external-link-Cl7I0Y0X.js → external-link-C8YDsrnV.js} +1 -1
- package/dist/{facebook-BDnGUn37.js → facebook-kN8QLkwt.js} +1 -1
- package/dist/{farcaster-DYVjIXVC.js → farcaster-BOigS3mw.js} +1 -1
- package/dist/{filters-B7OA-wru.js → filters-DDUSRD4l.js} +1 -1
- package/dist/{getChainIds-DxmpEN82.js → getChainIds-DJmE6Msn.js} +6 -4
- package/dist/{getCosmosAddress-3ZO3t0Pq.js → getCosmosAddress-Bw14apoq.js} +17 -15
- package/dist/{github-CuT-JJxK.js → github-CTPDODU3.js} +1 -1
- package/dist/{google-DtM-awfL.js → google-BfICCDQV.js} +1 -1
- package/dist/{hamburger-BTj6nm8m.js → hamburger-B3kppZCZ.js} +436 -427
- package/dist/{help-circle-PoGrqvGy.js → help-circle-CYHajLTp.js} +1 -1
- package/dist/{id-DtnNuGtw.js → id-B7wY816l.js} +1 -1
- package/dist/{image-C3_QR-hA.js → image-DlCULKUt.js} +1 -1
- package/dist/{index-CyWELywY.js → index-3sJNAfC_.js} +4 -4
- package/dist/{index-DTish3yr.js → index-Bl2UpALc.js} +3 -1
- package/dist/{index-BWOjN38U.js → index-Bn_VweUk.js} +1 -1
- package/dist/{index-B5GLjx4W.js → index-CWXdfgTQ.js} +32 -21
- package/dist/{index-bIEWK3eL.js → index-CtRbg4p1.js} +2 -2
- package/dist/{index-CWT2Y0IM.js → index-Czp--Oac.js} +306 -305
- package/dist/{index-B0gAFQ8x.js → index-DQzXQKqp.js} +1151 -1134
- package/dist/{index-CE745smM.js → index-DSMnsKQF.js} +1 -1
- package/dist/{index-BrOA0ymh.js → index-DUxO2DP0.js} +19 -14
- package/dist/{index-DoGNd7ny.js → index-DZtjoDQ6.js} +78 -78
- package/dist/{index-CwWCbB2k.js → index-OOwWTdzF.js} +301 -285
- package/dist/{index-ChiQWx38.js → index-aAIeFVJJ.js} +5511 -5439
- package/dist/{index.es-GoiejPCa.js → index.es-DRF0icwI.js} +978 -958
- package/dist/{index.es-diG_ceXO.js → index.es-X5yn1dxd.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-6gBrA9Sk.js → info-M4ZOkVDP.js} +1 -1
- package/dist/{info-circle-Co_nZbRr.js → info-circle-C9Ubrxcs.js} +1 -1
- package/dist/{lightbulb-G7-2nLo-.js → lightbulb-CLWTyO5Z.js} +1 -1
- package/dist/{mail-vGK6gbWd.js → mail-D04vbAIn.js} +1 -1
- package/dist/{mobile-XP2FeEWD.js → mobile-DV1PY5xi.js} +1 -1
- package/dist/{more-BHgDT0Pp.js → more-C65eEKRH.js} +1 -1
- package/dist/{network-placeholder-CqkTM05y.js → network-placeholder-CXMRKYMN.js} +1 -1
- package/dist/{nftPlaceholder-6a566h1c.js → nftPlaceholder-BK5d4yES.js} +1 -1
- package/dist/{off-BXC0AT_k.js → off-BdYrVle4.js} +1 -1
- package/dist/{play-store-KUlP7I5z.js → play-store-DAX2ASir.js} +1 -1
- package/dist/{plus-CZhmPU1m.js → plus-D5RNr0ys.js} +1 -1
- package/dist/{qr-code-CF-73Wwg.js → qr-code-DaxiDo9X.js} +1 -1
- package/dist/{recycle-horizontal-6JAAvvcy.js → recycle-horizontal-ClcvuCEy.js} +1 -1
- package/dist/{refresh-Dwf94I4G.js → refresh-CujBkPMj.js} +1 -1
- package/dist/{reown-logo-Dl5JSYxh.js → reown-logo-WTts-Scd.js} +1 -1
- package/dist/{search-CKhb3C_h.js → search-P3URx6VX.js} +1 -1
- package/dist/{send-B7FISkEI.js → send-DfJVhhSC.js} +1 -1
- package/dist/{swapHorizontal-DRQmOoS0.js → swapHorizontal-B9gWlR2l.js} +1 -1
- package/dist/{swapHorizontalBold-CqHI3G2k.js → swapHorizontalBold-CRtcE7ut.js} +1 -1
- package/dist/{swapHorizontalMedium-DEXC4JPY.js → swapHorizontalMedium-BAEqXMi9.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-Z2g21P58.js → swapHorizontalRoundedBold-BLGgmuUY.js} +1 -1
- package/dist/{swapVertical-C0yf4WlR.js → swapVertical-DPQZggT-.js} +1 -1
- package/dist/{telegram-JZ1AyWGc.js → telegram-CqLP8xqY.js} +1 -1
- package/dist/{three-dots-Cv8ypYiL.js → three-dots-D-KG8V0Q.js} +1 -1
- package/dist/{twitch-CuVRsDeZ.js → twitch-rNJXFSdN.js} +1 -1
- package/dist/{twitterIcon-CsnMnAUE.js → twitterIcon-4tgDZwwF.js} +1 -1
- package/dist/{unsupportedProp-Pa1IsOH0.js → unsupportedProp-BNyPEWVG.js} +1 -1
- package/dist/{useRegisterError-CMF6oX9a.js → useRegisterError-ZRNy_w0g.js} +126 -122
- package/dist/{verify-RnCjWGr5.js → verify-C45bmkgn.js} +1 -1
- package/dist/{verify-filled-DCba5G5i.js → verify-filled-CWt93AN6.js} +1 -1
- package/dist/{w3m-modal-B2v0cVZA.js → w3m-modal-Ow5BEsRv.js} +2 -2
- package/dist/{wallet-D2s2NA4K.js → wallet-DXkYtsfK.js} +1 -1
- package/dist/{wallet-placeholder-BlAJhnXt.js → wallet-placeholder-CYSD6rlf.js} +1 -1
- package/dist/{walletconnect-CHGasaVk.js → walletconnect-DMBQSfX1.js} +1 -1
- package/dist/{warning-circle-CfntdUBu.js → warning-circle-DlL-sIcF.js} +1 -1
- package/dist/{x-BaYKRrBX.js → x-DGaODNjX.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-aAIeFVJJ.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-ZRNy_w0g.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-Czp--Oac.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-aAIeFVJJ.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-Bcq_UUqJ.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-Bn_VweUk.js";
|
|
10
|
+
import { F as K, i as ae } from "./useRegisterError-ZRNy_w0g.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-aAIeFVJJ.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-aAIeFVJJ.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-Cou9ttWc.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-ZRNy_w0g.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-aAIeFVJJ.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-ZRNy_w0g.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-Czp--Oac.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-Bo9kRq09.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-DZtjoDQ6.js";
|
|
3
|
+
import { n as Wn } from "./index-aAIeFVJJ.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-aAIeFVJJ.js";
|
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
|
3
3
|
function x(t) {
|
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|