@blockend/widget 1.0.60 → 1.0.61-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdvancedSettings-BSHVKOx8.js +60 -0
- package/dist/{AllRoutes-Bi2Qb6vT.js → AllRoutes-3rJ_6MZA.js} +9 -9
- package/dist/{Box-DofFTOO9.js → Box-k1E75YNB.js} +1 -1
- package/dist/EstGas-NmdlnuTV.js +1688 -0
- package/dist/{Grow-C7qv-xx7.js → Grow-DHSmig3g.js} +2 -2
- package/dist/{InputComp-B7JBOOCL.js → InputComp-Q8pjLoPE.js} +3 -3
- package/dist/{LoadRoute-KBCAhdb3.js → LoadRoute-C2z-mW9G.js} +4 -4
- package/dist/{QuotesProgress-DaVjqEE8.js → QuotesProgress-BD5CQpZ-.js} +1 -1
- package/dist/{SwapAsset-ClNXL1XN.js → SwapAsset-Kx0ombNP.js} +1 -1
- package/dist/{Tooltip-BfAqBg9y.js → Tooltip-Dx9YIENU.js} +3 -3
- package/dist/{TxnButton-41zPru_N.js → TxnButton-CWOz7URH.js} +31 -31
- package/dist/{add-Dtd6YmCJ.js → add-D_aca-vE.js} +1 -1
- package/dist/{all-wallets-fWl6fl6Y.js → all-wallets-D4BSWfpK.js} +1 -1
- package/dist/{app-store-DSLOwXZY.js → app-store-ST0Ravfg.js} +1 -1
- package/dist/{apple-BMDEkk8X.js → apple-DaFtNkdI.js} +1 -1
- package/dist/{arrow-bottom-BWURPGva.js → arrow-bottom-CuRXWFcr.js} +1 -1
- package/dist/{arrow-bottom-circle-BR18TdWN.js → arrow-bottom-circle-xfTEwf8w.js} +1 -1
- package/dist/{arrow-left-DSHPaT9f.js → arrow-left-Z346mTvE.js} +1 -1
- package/dist/{arrow-right-BQyfcxHk.js → arrow-right-CUIO0t26.js} +1 -1
- package/dist/{arrow-top-RP3srPoV.js → arrow-top-DmqPBsC5.js} +1 -1
- package/dist/{bank-C9VWqird.js → bank-BO1ZejV3.js} +1 -1
- package/dist/{basic-ChmJK0Xt.js → basic-P5IuMVWt.js} +3 -3
- package/dist/{browser-CSkm7gnt.js → browser-R_yTVBVl.js} +1 -1
- package/dist/{card-qLWgu9c8.js → card-CmQJzq49.js} +1 -1
- package/dist/{ccip-QF_uXtAt.js → ccip-Vdbs2YPx.js} +1 -1
- package/dist/{checkmark-BmzqmMw0.js → checkmark-BUj82mTz.js} +1 -1
- package/dist/{checkmark-bold-B6aImdAf.js → checkmark-bold-4sXAvyEi.js} +1 -1
- package/dist/{chevron-bottom-t4h4eaxS.js → chevron-bottom-BHRgOLsC.js} +1 -1
- package/dist/{chevron-left-D3susSgC.js → chevron-left-eVq5zb9x.js} +1 -1
- package/dist/{chevron-right-W13sAkua.js → chevron-right-BqbdhgX8.js} +1 -1
- package/dist/{chevron-top-Bx-QdB_J.js → chevron-top-lFcz1Dk9.js} +1 -1
- package/dist/{chrome-store-CGxM7IYK.js → chrome-store-CJjs0q6Z.js} +1 -1
- package/dist/{clock-DLxk1mp4.js → clock-LxWBSJ_V.js} +1 -1
- package/dist/{close-XyT_Ei7X.js → close-CJEyeA8d.js} +1 -1
- package/dist/{coinPlaceholder-COnVP39c.js → coinPlaceholder-A0px2L1V.js} +1 -1
- package/dist/{compass-B7Ua__ME.js → compass-CKpEE3QF.js} +1 -1
- package/dist/{copy-CwqmRN0X.js → copy-BGAVbyLK.js} +1 -1
- package/dist/{core-HN_b3jpG.js → core-UMj0YuPY.js} +6124 -4570
- package/dist/{cursor-CZUzCZDa.js → cursor-CdRK37lV.js} +1 -1
- package/dist/{cursor-transparent-C-iNJp5e.js → cursor-transparent-DCtZPn6M.js} +1 -1
- package/dist/{desktop-CKvUvwiO.js → desktop-BpmiexI7.js} +1 -1
- package/dist/{disconnect-Baq1ttCe.js → disconnect-CmRL6rxR.js} +1 -1
- package/dist/{discord-D8jJPT-u.js → discord-CgA8etyT.js} +1 -1
- package/dist/{down-CbXkinMO.js → down-veMPztmj.js} +2 -2
- package/dist/{etherscan-DmvsfmlR.js → etherscan-B0Iz4J9k.js} +1 -1
- package/dist/{exclamation-triangle-B5sVL0Op.js → exclamation-triangle-Box_8laE.js} +1 -1
- package/dist/{extension-DTURW9PD.js → extension-CT5kynXr.js} +1 -1
- package/dist/{external-link-BhiyYwAM.js → external-link-BmAqCUs9.js} +1 -1
- package/dist/{facebook-BKU8pCSU.js → facebook-CzlMPtlk.js} +1 -1
- package/dist/{farcaster-aPuBoT-f.js → farcaster-Z3KYAnFk.js} +1 -1
- package/dist/{filters-Dhcy_bWD.js → filters-CVtviD0v.js} +1 -1
- package/dist/{getChainIds-hFBaLC3P.js → getChainIds-DDKgS0TA.js} +2 -2
- package/dist/{getCosmosAddress-wW2QvGf4.js → getCosmosAddress-D-BxI1sZ.js} +2640 -2576
- package/dist/{github-DpOcHBpK.js → github-KjnPjzGN.js} +1 -1
- package/dist/{google-Dlr5X4XZ.js → google-CnyCazMS.js} +1 -1
- package/dist/{hamburger-CbTP1z8e.js → hamburger-DkyOLKDt.js} +5 -5
- package/dist/{help-circle-DfsreI1-.js → help-circle-BoN3xTWx.js} +1 -1
- package/dist/{id-CgVrDv4g.js → id-tq8aEw5U.js} +1 -1
- package/dist/{image-BgZMfISb.js → image-DBC1q2_n.js} +1 -1
- package/dist/{index-D-h2D2T4.js → index-37soHOzC.js} +2 -2
- package/dist/{index-BzlNNUJC.js → index-B6Hd7MNh.js} +211 -207
- package/dist/{index-Doq8prid.js → index-BMJemt0T.js} +1 -1
- package/dist/{index-DEzMTwnP.js → index-BnfXeC9U.js} +11 -11
- package/dist/{index-Dfnahm9u.js → index-BrUFU9w4.js} +4 -4
- package/dist/{index-W17Yun1B.js → index-C57ebjbd.js} +78 -78
- package/dist/{index-CQef3aFT.js → index-CrdvyxIs.js} +5 -5
- package/dist/{index-BNAc3BNQ.js → index-Dq-7CifU.js} +260 -259
- package/dist/{index-CzIE4OVR.js → index-DwgdKTri.js} +1 -1
- package/dist/{index-cmkdh21h.js → index-nbo2VFYc.js} +4 -4
- package/dist/{index-ij8WLtCK.js → index-u8Ded5qw.js} +10 -10
- package/dist/index.es-CXA8FwxC.js +14904 -0
- package/dist/{index.es-DznYPOeF.js → index.es-CwOZPtUM.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-CZQMmcBD.js → info-B-ADkq2O.js} +1 -1
- package/dist/{info-circle-CA3WSSRD.js → info-circle-CzjFim13.js} +1 -1
- package/dist/{lightbulb-8ISYXfUt.js → lightbulb-BzGUazBJ.js} +1 -1
- package/dist/{mail-CHIth09p.js → mail-CEB7w3xW.js} +1 -1
- package/dist/{mobile-CrFtClXb.js → mobile-D2As9Lxy.js} +1 -1
- package/dist/{more-mHern-4V.js → more-B3qgSPHK.js} +1 -1
- package/dist/{network-placeholder-CoODkTLk.js → network-placeholder-D3v1VNVd.js} +1 -1
- package/dist/{nftPlaceholder-CG7DC4DT.js → nftPlaceholder-7uzR-QgE.js} +1 -1
- package/dist/{off-CrgcN-zp.js → off-B5fhwDTB.js} +1 -1
- package/dist/{play-store-CQP9kqkp.js → play-store-fmnI2qeP.js} +1 -1
- package/dist/{plus-DHA7xDuc.js → plus-BPrwB2BV.js} +1 -1
- package/dist/{qr-code-zibhnzKq.js → qr-code-DRh63vJj.js} +1 -1
- package/dist/{recycle-horizontal-DywyCULr.js → recycle-horizontal-DGw86E5g.js} +1 -1
- package/dist/{refresh-e2GocWQK.js → refresh-Dg7iaYhB.js} +1 -1
- package/dist/{reown-logo-BU64qOXz.js → reown-logo-tiOXXURu.js} +1 -1
- package/dist/{search-DzxpvkH-.js → search-eG23Hr6c.js} +1 -1
- package/dist/{send-r9Pjl4vo.js → send-BOwE6eLM.js} +1 -1
- package/dist/{swapHorizontal-BTrXWq48.js → swapHorizontal-ywv205Wi.js} +1 -1
- package/dist/{swapHorizontalBold-CJqWkgp6.js → swapHorizontalBold-CzmBehA5.js} +1 -1
- package/dist/{swapHorizontalMedium-DX7hDgRK.js → swapHorizontalMedium-BLbLZusS.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-C51tXWKa.js → swapHorizontalRoundedBold-N_SHWa3r.js} +1 -1
- package/dist/{swapVertical-Crddwuzr.js → swapVertical-EAZRQhGp.js} +1 -1
- package/dist/{telegram-BC6rpZd8.js → telegram-n36fCk1z.js} +1 -1
- package/dist/{three-dots-DC9iZV71.js → three-dots-0tBgmH4A.js} +1 -1
- package/dist/{twitch-Dqthmddu.js → twitch-BhZ8ahtd.js} +1 -1
- package/dist/{twitterIcon-DIWxOs67.js → twitterIcon-DfNmxt1B.js} +1 -1
- package/dist/{unsupportedProp-BW6bMgdV.js → unsupportedProp-D3sAzZYG.js} +1 -1
- package/dist/{useRegisterError-D0oAcJrb.js → useRegisterError-Bo2lp0sa.js} +3 -2
- package/dist/{verify-GrViE51Y.js → verify-CWXFpftr.js} +1 -1
- package/dist/{verify-filled-Cws_QO3X.js → verify-filled-DP3y-Kx3.js} +1 -1
- package/dist/{w3m-modal-n7hzVP_I.js → w3m-modal-CwwnoSKf.js} +2 -2
- package/dist/{wallet-Cd1ruTUh.js → wallet-pQYrlhSS.js} +1 -1
- package/dist/{wallet-placeholder-Ce4gGswZ.js → wallet-placeholder-CFNKM5lP.js} +1 -1
- package/dist/{walletconnect-CqpJhu9-.js → walletconnect-CAtjZJiV.js} +1 -1
- package/dist/{warning-circle-DQ6ZS1NO.js → warning-circle-BOE2EoE9.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-CR749er2.js → x-BqcRzM19.js} +1 -1
- package/package.json +1 -1
- package/dist/EstGas-w0MeYkJr.js +0 -1574
- package/dist/index.es-C8qSCFHh.js +0 -13234
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as D from "react";
|
2
2
|
import kt from "react";
|
3
|
-
import { p as K, P as i, aK as St, n as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-
|
3
|
+
import { p as K, P as i, aK as St, n as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-B6Hd7MNh.js";
|
4
4
|
import { jsx as de } from "react/jsx-runtime";
|
5
|
-
import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-
|
5
|
+
import { o as et, P as It, b as Se, a as tt, m as Ut, r as mt, h as qt, H as Ee, T as Ft, q as _t, j as Xt, n as zt, t as rt, v as Yt, w as Gt } from "./useRegisterError-Bo2lp0sa.js";
|
6
6
|
let nt = 0;
|
7
7
|
function Kt(e) {
|
8
8
|
const [t, r] = D.useState(e), n = e || t;
|
@@ -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-B6Hd7MNh.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-Bo2lp0sa.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-Dq-7CifU.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 e, 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-B6Hd7MNh.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-veMPztmj.js";
|
8
8
|
import { e as se } from "./ethertousd-CC_ezooz.js";
|
9
|
-
import { O as H } from "./index-
|
10
|
-
import { F as J, i as ae } from "./useRegisterError-
|
9
|
+
import { O as H } from "./index-DwgdKTri.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-Bo2lp0sa.js";
|
11
11
|
function oe({ fill: n }) {
|
12
12
|
return /* @__PURE__ */ e(
|
13
13
|
"svg",
|
@@ -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-B6Hd7MNh.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-B6Hd7MNh.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-DHSmig3g.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-Bo2lp0sa.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -1,43 +1,43 @@
|
|
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 h, aA as Re, aB as pe } from "./index-
|
4
|
+
import { a as _, u as h, aA as Re, aB as pe } from "./index-B6Hd7MNh.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 ge, d as Qe, c as He, C as ye } from "./useRegisterError-
|
7
|
+
import { u as ge, d as Qe, c as He, C as ye } from "./useRegisterError-Bo2lp0sa.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-Dq-7CifU.js";
|
10
10
|
function Ye(n) {
|
11
|
-
const { wallet: u, address: l } = _(), [
|
11
|
+
const { wallet: u, address: l } = _(), [N, B] = v(0);
|
12
12
|
async function x() {
|
13
13
|
const F = await window.tronWeb.trx.getBalance(l);
|
14
|
-
|
14
|
+
B(F / Math.pow(10, 6));
|
15
15
|
}
|
16
16
|
return z(() => {
|
17
17
|
l && (n == null ? void 0 : n.networkType) === "tron" && x();
|
18
|
-
}, [l, n == null ? void 0 : n.networkType]), { tronBal:
|
18
|
+
}, [l, n == null ? void 0 : n.networkType]), { tronBal: N };
|
19
19
|
}
|
20
20
|
function A(n) {
|
21
21
|
if (n.key.toLowerCase() === "backpacksol")
|
22
22
|
return !0;
|
23
23
|
}
|
24
24
|
function Ze() {
|
25
|
-
const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet:
|
26
|
-
async function
|
27
|
-
let x = await
|
25
|
+
const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: N } = xe();
|
26
|
+
async function B() {
|
27
|
+
let x = await N.getBalance();
|
28
28
|
u(Number(x) || 0);
|
29
29
|
}
|
30
30
|
return z(() => {
|
31
|
-
(l.networkType === "btc" || l.networkType === "sui") &&
|
32
|
-
}, [l.networkType,
|
31
|
+
(l.networkType === "btc" || l.networkType === "sui") && B();
|
32
|
+
}, [l.networkType, N]), n;
|
33
33
|
}
|
34
|
-
function lt({ routesData: n, routes: u, amount: l, isAmountTyped:
|
34
|
+
function lt({ routesData: n, routes: u, amount: l, isAmountTyped: N, 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 = h((s) => s.gradient),
|
36
|
+
const w = h((s) => s.gradient), I = h((s) => s.configuration), e = h((s) => s.fromChain), i = h((s) => s.fromCoin), r = h((s) => s.toChain), b = h((s) => s.toCoin), { isConnected: j, address: H, chain: m } = Ve(), { address: J, isConnected: We } = _(), Ie = qe(), me = Me(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
|
37
37
|
chainData: e
|
38
|
-
}), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet:
|
38
|
+
}), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: Be } = ge({ chainData: e }), fe = Ne(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: $e, isPending: Ee } = Pe({
|
39
39
|
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
40
|
-
config:
|
40
|
+
config: Ie,
|
41
41
|
throwForSwitchChainNotSupported: !0,
|
42
42
|
onError(s) {
|
43
43
|
Je(s.message) && Se({ module: "wallet-error-switch", error: s.message });
|
@@ -53,24 +53,24 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowW
|
|
53
53
|
color: "bw-bg-border-primary"
|
54
54
|
});
|
55
55
|
async function Fe() {
|
56
|
-
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (
|
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
58
|
await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
59
59
|
} catch {
|
60
60
|
}
|
61
61
|
else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
62
62
|
try {
|
63
|
-
let s = await
|
63
|
+
let s = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
64
64
|
D();
|
65
65
|
} catch {
|
66
66
|
}
|
67
67
|
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(pe.TransactionStarted, {
|
68
68
|
...n
|
69
|
-
}),
|
69
|
+
}), f && (Q(!1), F())) : (Z.emit(pe.TransactionStarted, {
|
70
70
|
...n
|
71
|
-
}),
|
71
|
+
}), f && (Q(!1), F()));
|
72
72
|
}
|
73
|
-
const { primaryWallet: p } = xe(), P = Oe(),
|
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) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), D = async () => {
|
74
74
|
if (p)
|
75
75
|
try {
|
76
76
|
const s = await p.getNetwork();
|
@@ -156,11 +156,11 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowW
|
|
156
156
|
text: "Select Token",
|
157
157
|
isGradient: !0,
|
158
158
|
color: w || S.gradientbutton
|
159
|
-
}) :
|
159
|
+
}) : f ? typeof l < "u" && Number(l || 0) <= 0 ? a({
|
160
160
|
text: "Enter Amount",
|
161
161
|
isGradient: !1,
|
162
162
|
color: "bw-bg-border-primary"
|
163
|
-
}) : u.isFetching || !
|
163
|
+
}) : u.isFetching || !N ? a({
|
164
164
|
text: "Loading Routes...",
|
165
165
|
isGradient: !1,
|
166
166
|
color: "bw-bg-border-primary"
|
@@ -172,7 +172,7 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowW
|
|
172
172
|
text: "Enter recipient wallet address",
|
173
173
|
isGradient: !0,
|
174
174
|
color: w || S.gradientbutton
|
175
|
-
}) : (i == null ? void 0 : i.address)
|
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) ? a({
|
176
176
|
text: "From and To asset can not be the same!",
|
177
177
|
isGradient: !1,
|
178
178
|
color: "bw-bg-border-primary"
|
@@ -180,7 +180,7 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowW
|
|
180
180
|
text: "Failed to fetch Quotes",
|
181
181
|
isGradient: !1,
|
182
182
|
color: "bw-bg-border-primary"
|
183
|
-
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (
|
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" ? a({
|
184
184
|
text: `Switch Chain to ${e.chain}`,
|
185
185
|
isGradient: !0,
|
186
186
|
color: w || S.gradientbutton
|
@@ -193,27 +193,27 @@ function lt({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowW
|
|
193
193
|
isGradient: !0,
|
194
194
|
color: w || S.gradientbutton
|
195
195
|
});
|
196
|
-
}, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W,
|
196
|
+
}, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, f, u.isFetching, m == null ? void 0 : m.id, N, R, L, d, Y, X, J]);
|
197
197
|
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
198
|
function ze() {
|
199
199
|
var s, g, y, E;
|
200
|
-
return
|
200
|
+
return f ? u.isFetching ? !0 : o.text.length ? !ve.includes((s = o.text) == null ? void 0 : s.toLowerCase()) : !((E = (y = (g = u.data) == null ? void 0 : g.data) == null ? void 0 : y.quotes) != null && E.length) : !1;
|
201
201
|
}
|
202
202
|
return /* @__PURE__ */ G(
|
203
203
|
"button",
|
204
204
|
{
|
205
205
|
disabled: ze(),
|
206
206
|
style: o != null && o.isGradient && V && q ? {
|
207
|
-
...
|
208
|
-
boxShadow:
|
207
|
+
...I == null ? void 0 : I.gradientStyle,
|
208
|
+
boxShadow: I && I.customTheme && ((le = (ae = I.customTheme) == null ? void 0 : ae.shadow) == null ? void 0 : le.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
209
209
|
} : {
|
210
|
-
boxShadow:
|
210
|
+
boxShadow: I && I.customTheme && ((we = (oe = I.customTheme) == null ? void 0 : oe.shadow) == null ? void 0 : we.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
211
211
|
},
|
212
212
|
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${o != null && o.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${V && q && o.color} ${o.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${o != null && o.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
|
213
213
|
onClick: () => {
|
214
|
-
|
214
|
+
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
215
|
},
|
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 ? Ee ? /* @__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" }) }) :
|
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 ? Ee ? /* @__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
217
|
}
|
218
218
|
);
|
219
219
|
}
|
@@ -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-UMj0YuPY.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-C57ebjbd.js";
|
3
|
+
import { n as Wn } from "./index-B6Hd7MNh.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|
@@ -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-B6Hd7MNh.js";
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
3
3
|
function x(t) {
|
4
4
|
const { abi: s, errorName: a, args: r } = t;
|