@blockend/widget 1.0.48 → 1.0.49-beta.2
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-GG915rBw.js → AllRoutes-SK8ZFq_x.js} +9 -9
- package/dist/{Box-DdtDQFy9.js → Box-DAMq9mQT.js} +7 -7
- package/dist/EstGas-B9rFXiVW.js +1486 -0
- package/dist/{Grow-BUfBvEgN.js → Grow-Qzfjlf_b.js} +2 -2
- package/dist/{InputComp-90kAsSUc.js → InputComp-BUhhYfS_.js} +3 -3
- package/dist/{LoadRoute-D9IO_K77.js → LoadRoute-B9EnT59x.js} +4 -4
- package/dist/{QuotesProgress-BoWKVDeg.js → QuotesProgress-DMyLQ_Iw.js} +1 -1
- package/dist/{SwapAsset-BWDjgwJW.js → SwapAsset-mgONO1Wh.js} +1 -1
- package/dist/{Tooltip-SvgmfCp2.js → Tooltip-CCwWxndh.js} +3 -3
- package/dist/{TxnButton-DVWpwZmv.js → TxnButton-CqL_9AIV.js} +22 -23
- package/dist/{add-CsVPUZji.js → add-DgNWpTbE.js} +1 -1
- package/dist/{all-wallets-CFmAxEw7.js → all-wallets-DbLggbFH.js} +1 -1
- package/dist/{app-store-B4mtp1mU.js → app-store-BM-3bzwt.js} +1 -1
- package/dist/{apple-C-vXA_-Q.js → apple-DGgkQglq.js} +1 -1
- package/dist/{arrow-bottom-6CDjU1eE.js → arrow-bottom-BCcsiVDf.js} +1 -1
- package/dist/{arrow-bottom-circle-DN9qZO8D.js → arrow-bottom-circle-BxnEnxCv.js} +1 -1
- package/dist/{arrow-left-CjJLmw6Y.js → arrow-left-BajNw8Bo.js} +1 -1
- package/dist/{arrow-right-BpTLDTMX.js → arrow-right-Kqyf83Ue.js} +1 -1
- package/dist/{arrow-top-DU1aEYkh.js → arrow-top-P0YZuCsS.js} +1 -1
- package/dist/{bank-CtT_v4OA.js → bank-BdBlTjok.js} +1 -1
- package/dist/{basic-CQ9dw-89.js → basic-B7dsMTNk.js} +3 -3
- package/dist/{browser-BzC416Ga.js → browser-CiQFAZ4t.js} +1 -1
- package/dist/{card-D9RpFcx0.js → card-D94MFuQu.js} +1 -1
- package/dist/{ccip-Dzss3Y16.js → ccip-vv5r0Apm.js} +55 -55
- package/dist/{checkmark-CtUAX8EG.js → checkmark-Cucqq4L6.js} +1 -1
- package/dist/{checkmark-bold-VZL2SuxB.js → checkmark-bold-C5WgesjY.js} +1 -1
- package/dist/{chevron-bottom-CV_Ifosh.js → chevron-bottom-CyfhotQQ.js} +1 -1
- package/dist/{chevron-left-vauViuBF.js → chevron-left-CXJ7R3iS.js} +1 -1
- package/dist/{chevron-right-Ch0-iP-t.js → chevron-right-4ex-g3or.js} +1 -1
- package/dist/{chevron-top-fvIkVky4.js → chevron-top-BDfgSTbr.js} +1 -1
- package/dist/{chrome-store-CgMxFYMx.js → chrome-store-CX9plHu3.js} +1 -1
- package/dist/{clock-CD_Be9u1.js → clock-CtQPqpVc.js} +1 -1
- package/dist/{close-CuvWjYvJ.js → close-CYlyCBrT.js} +1 -1
- package/dist/{coinPlaceholder-UVXPM539.js → coinPlaceholder-DS0YfqOM.js} +1 -1
- package/dist/{compass-DORfxdqQ.js → compass-DVktgTZ-.js} +1 -1
- package/dist/{copy-BWAfHXcr.js → copy-Bk0qGavv.js} +1 -1
- package/dist/{core-CxJ55_hm.js → core-DgJB3Qno.js} +16 -17
- package/dist/{cursor-hvQCvuY0.js → cursor-CCqfxECm.js} +1 -1
- package/dist/{cursor-transparent-BdJs-4PE.js → cursor-transparent-CPbYJ9jd.js} +1 -1
- package/dist/{desktop-C16HW3Xx.js → desktop-DAykpsO7.js} +1 -1
- package/dist/{disconnect-DRUAX0I2.js → disconnect-DL8vRZg2.js} +1 -1
- package/dist/{discord-I752GmaU.js → discord-BS8TPANA.js} +1 -1
- package/dist/{down-ZnYZwmwQ.js → down-D6aGpC9P.js} +2 -2
- package/dist/{etherscan--xkrRjIS.js → etherscan-YSjUjqH5.js} +1 -1
- package/dist/{exclamation-triangle-DXj7lIwe.js → exclamation-triangle-Cd8s_lsN.js} +1 -1
- package/dist/{extension-DBPkceL0.js → extension-BfYpl1LK.js} +1 -1
- package/dist/{external-link-CbPqDFzI.js → external-link-uF5MV_9t.js} +1 -1
- package/dist/{facebook-CFI3uzSu.js → facebook-DO648yaX.js} +1 -1
- package/dist/{farcaster-DN93zQp8.js → farcaster-DZF64pQM.js} +1 -1
- package/dist/{filters-C6BY9h_R.js → filters-DMTGJi0Y.js} +1 -1
- package/dist/{getChainIds-DP8l1FCH.js → getChainIds-DUKOh0Kp.js} +2 -2
- package/dist/getCosmosAddress-Cb98patK.js +6075 -0
- package/dist/{github-DD1Wyw9Y.js → github-DQDrN0RZ.js} +1 -1
- package/dist/{google-D1E_G9Jw.js → google-DRrIdyFk.js} +1 -1
- package/dist/{hamburger-DPRWU8rW.js → hamburger-DFh0u4ls.js} +454 -461
- package/dist/{help-circle-MjewM8fh.js → help-circle-n5Ls2-2F.js} +1 -1
- package/dist/{id-DWrEAL0Y.js → id-DbShnIoD.js} +1 -1
- package/dist/{image-B1OlMZ_D.js → image-B5YOEd-c.js} +1 -1
- package/dist/{index-CkvOQTTa.js → index-BC_WzIG-.js} +1 -1
- package/dist/index-BIN4LE_6.js +42277 -0
- package/dist/{index-ByE0Pqgp.js → index-BwAuNUFT.js} +2600 -2625
- package/dist/{index-B5AWUOpG.js → index-CDBWyjo1.js} +11 -11
- package/dist/{index-B8t6PLz8.js → index-CL2LZuVL.js} +2 -2
- package/dist/{index-8FeyhkrZ.js → index-CktG1k9u.js} +1 -1
- package/dist/{index-D7pkN4od.js → index-D4uRM0hD.js} +4 -4
- package/dist/index-DEecyVOZ.js +6711 -0
- package/dist/{index-BtSjpRJE.js → index-DuTB7F2j.js} +257 -259
- package/dist/{index-CztKubZB.js → index-DvR1iioL.js} +78 -78
- package/dist/index-VUJh-JIq.js +206 -0
- package/dist/{index.es-COEAI0x5.js → index.es-BRVISbr4.js} +1625 -1712
- package/dist/{index.es-leDx9_0K.js → index.es-DD1q2x58.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-BIglQyok.js → info-5rQx4FCT.js} +1 -1
- package/dist/{info-circle-ygUHgPMr.js → info-circle-DnNqx9Fu.js} +1 -1
- package/dist/{lightbulb-n3p60wb2.js → lightbulb-DEa_QXWk.js} +1 -1
- package/dist/{mail-CvJFMwVR.js → mail-DNWPpemE.js} +1 -1
- package/dist/{mobile-2Q4FMkp7.js → mobile-CsmBvAG0.js} +1 -1
- package/dist/{more-Dl6UNVYf.js → more-Bjd7dOWF.js} +1 -1
- package/dist/{network-placeholder-BHa-8IYu.js → network-placeholder-DsQ_HMHG.js} +1 -1
- package/dist/{nftPlaceholder-C-kNqpt7.js → nftPlaceholder-KsQSrTt2.js} +1 -1
- package/dist/{off-vA0xiDBU.js → off-B0hqloiu.js} +1 -1
- package/dist/{play-store-BdESAvn7.js → play-store-DseAgFmo.js} +1 -1
- package/dist/{plus-CI5D39lI.js → plus-BJCNDRM3.js} +1 -1
- package/dist/{qr-code-DLg6lOTi.js → qr-code-lEBAtsO4.js} +1 -1
- package/dist/{recycle-horizontal-3J42KsWq.js → recycle-horizontal-K4rUQslN.js} +1 -1
- package/dist/{refresh-BEgbmmM1.js → refresh-DEZrriLV.js} +1 -1
- package/dist/{reown-logo-ATUFBzuh.js → reown-logo-BHbe-CUO.js} +1 -1
- package/dist/{search-Dz34DwRb.js → search-CIK9XN0-.js} +1 -1
- package/dist/{send-B57ao-nU.js → send-Bxpdb3Vf.js} +1 -1
- package/dist/{swapHorizontal-po0eESEE.js → swapHorizontal-BBHEuYx1.js} +1 -1
- package/dist/{swapHorizontalBold-jdwjn6I2.js → swapHorizontalBold-t0VsiN4I.js} +1 -1
- package/dist/{swapHorizontalMedium-DFkcNnL0.js → swapHorizontalMedium-PzUH_Th4.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-BDIZiNDG.js → swapHorizontalRoundedBold-EyDyL2Bj.js} +1 -1
- package/dist/{swapVertical-CCv4s5uT.js → swapVertical-CusOd1Kd.js} +1 -1
- package/dist/{telegram-GAjmXYBs.js → telegram-DfP_Unfg.js} +1 -1
- package/dist/{three-dots-DcqTLEOU.js → three-dots-BcnJZFUd.js} +1 -1
- package/dist/{twitch-BGYB_svY.js → twitch-CN0F2VUn.js} +1 -1
- package/dist/{twitterIcon-BmqcVfVS.js → twitterIcon-DDA3Skm-.js} +1 -1
- package/dist/{unsupportedProp-AqCr28aR.js → unsupportedProp-CIQ48Cx8.js} +1 -1
- package/dist/{useRegisterError-pQkE1Atn.js → useRegisterError-DuNi8RxR.js} +1 -1
- package/dist/{verify-C6RCoVYC.js → verify-BVsIUy32.js} +1 -1
- package/dist/{verify-filled-BqhB0MZC.js → verify-filled-bQ1f0Y-d.js} +1 -1
- package/dist/{w3m-modal-DZ52Gjxh.js → w3m-modal-Cg8vnNGL.js} +2 -2
- package/dist/{wallet-XsxVSYSp.js → wallet-OISOAGe9.js} +1 -1
- package/dist/{wallet-placeholder-CTkFMX8-.js → wallet-placeholder-DZD3tMxc.js} +1 -1
- package/dist/{walletconnect-BwzMMj6O.js → walletconnect-CCANKmqY.js} +1 -1
- package/dist/{warning-circle-Ri_DXk1y.js → warning-circle-C_uh-wB2.js} +1 -1
- package/dist/{x-Dfc3V8pm.js → x-BpuzG7VO.js} +1 -1
- package/package.json +4 -2
- package/dist/EstGas-M3tvG2C0.js +0 -12724
- package/dist/getCosmosAddress-B5ISgLr5.js +0 -9565
- package/dist/index-BGoawJS_.js +0 -206
- package/dist/index-DRmMe_Lj.js +0 -30453
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/index-Ga_wsstH.js +0 -159
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as D from "react";
|
2
2
|
import kt from "react";
|
3
|
-
import { p as J, P as i,
|
3
|
+
import { p as J, P as i, aR 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-BIN4LE_6.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-DuNi8RxR.js";
|
6
6
|
let nt = 0;
|
7
7
|
function Jt(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-BIN4LE_6.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-DuNi8RxR.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-DuTB7F2j.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-BIN4LE_6.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-D6aGpC9P.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-BC_WzIG-.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-DuNi8RxR.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-BIN4LE_6.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-BIN4LE_6.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-Qzfjlf_b.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-DuNi8RxR.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -1,37 +1,36 @@
|
|
1
1
|
import { jsx as N } from "react/jsx-runtime";
|
2
2
|
import { useState as q, useEffect as P } from "react";
|
3
3
|
import { useSwitchNetwork as je, useDynamicContext as Ae, useIsLoggedIn as ve } from "@dynamic-labs/sdk-react-core";
|
4
|
-
import { a as we, u as
|
4
|
+
import { a as we, u as T, aI as ze, aJ as Me } from "./index-BIN4LE_6.js";
|
5
5
|
import { s as f } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
6
|
import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as qe } from "wagmi";
|
7
|
-
import { u as ae, d as Pe, c as _e, C as oe } from "./useRegisterError-
|
8
|
-
import "./
|
9
|
-
import {
|
10
|
-
import { u as He, p as Je } from "./index-BtSjpRJE.js";
|
7
|
+
import { u as ae, d as Pe, c as _e, C as oe } from "./useRegisterError-DuNi8RxR.js";
|
8
|
+
import { v as Je } from "./validError-CDlJpg_f.js";
|
9
|
+
import { u as Qe, p as He } from "./index-DuTB7F2j.js";
|
11
10
|
function Ke(n) {
|
12
11
|
const { wallet: g, address: y } = we(), [E, S] = q(0);
|
13
|
-
async function
|
12
|
+
async function m() {
|
14
13
|
const A = await window.tronWeb.trx.getBalance(y);
|
15
14
|
S(A / Math.pow(10, 6));
|
16
15
|
}
|
17
16
|
return P(() => {
|
18
|
-
y && (n == null ? void 0 : n.networkType) === "tron" &&
|
17
|
+
y && (n == null ? void 0 : n.networkType) === "tron" && m();
|
19
18
|
}, [y, n == null ? void 0 : n.networkType]), { tronBal: E };
|
20
19
|
}
|
21
20
|
function j(n) {
|
22
21
|
if (n.key.toLowerCase() === "backpacksol")
|
23
22
|
return !0;
|
24
23
|
}
|
25
|
-
function
|
24
|
+
function ct({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: m, handleConfirmClose: A, balanceSol: F, getCoinBalance: be, handleSuccess: ue }) {
|
26
25
|
var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
|
27
|
-
const o =
|
26
|
+
const o = T((s) => s.gradient), I = T((s) => s.configuration), e = T((s) => s.fromChain), i = T((s) => s.fromCoin), r = T((s) => s.toChain), w = T((s) => s.toCoin), { isConnected: L, address: _, chain: h } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
|
28
27
|
chainData: e
|
29
|
-
}), { connected:
|
28
|
+
}), { connected: J, address: Q, disconnect: Ue } = we(), v = T((s) => s.toDisconnect), d = T((s) => s.customWallet), { getWallet: Ie } = ae({ chainData: e }), he = xe(e, r), [z, Te] = q("101"), { tronBal: M } = Ke(e), { cosmosBalance: H } = Qe(), O = ((Y = e.chain) == null ? void 0 : Y.length) && ((Z = r.chain) == null ? void 0 : Z.length), R = ((W = i.address) == null ? void 0 : W.length) && ((k = w.address) == null ? void 0 : k.length), me = Pe(), Ne = ze(), { switchChain: Xe, switchChainAsync: fe, isPending: Be } = Ve({
|
30
29
|
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
31
30
|
config: pe,
|
32
31
|
throwForSwitchChainNotSupported: !0,
|
33
32
|
onError(s) {
|
34
|
-
|
33
|
+
Je(s.message) && me({ module: "wallet-error-switch", error: s.message });
|
35
34
|
}
|
36
35
|
}), x = qe({
|
37
36
|
address: _,
|
@@ -44,7 +43,7 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
44
43
|
color: "bw-bg-border-primary"
|
45
44
|
});
|
46
45
|
async function Ge() {
|
47
|
-
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (
|
46
|
+
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (h == null ? void 0 : h.id))
|
48
47
|
try {
|
49
48
|
await fe({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
50
49
|
} catch {
|
@@ -60,11 +59,11 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
60
59
|
...n
|
61
60
|
}), B && (ue(!1), A());
|
62
61
|
}
|
63
|
-
const { primaryWallet: b } = Ae(), V = ve(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D =
|
62
|
+
const { primaryWallet: b } = Ae(), V = ve(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = Ie(e)) == null ? void 0 : D.address) != null && C.length) : ye(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), U = async () => {
|
64
63
|
if (b)
|
65
64
|
try {
|
66
65
|
const s = await b.getNetwork();
|
67
|
-
|
66
|
+
Te(s);
|
68
67
|
} catch {
|
69
68
|
}
|
70
69
|
else
|
@@ -83,7 +82,7 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
83
82
|
}
|
84
83
|
function $e(s) {
|
85
84
|
var u;
|
86
|
-
return Number(((u =
|
85
|
+
return Number(((u = H[He(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
|
87
86
|
}
|
88
87
|
function Ee() {
|
89
88
|
var $;
|
@@ -170,7 +169,7 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
170
169
|
text: "Failed to fetch Quotes",
|
171
170
|
isGradient: !1,
|
172
171
|
color: "bw-bg-border-primary"
|
173
|
-
}) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (
|
172
|
+
}) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (h == null ? void 0 : h.id) && (e == null ? void 0 : e.networkType) === "evm" || V && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== z && (e == null ? void 0 : e.networkType) === "sol" ? l({
|
174
173
|
text: `Switch Chain to ${e.chain}`,
|
175
174
|
isGradient: !0,
|
176
175
|
color: o || f.gradientbutton
|
@@ -183,7 +182,7 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
183
182
|
isGradient: !0,
|
184
183
|
color: o || f.gradientbutton
|
185
184
|
});
|
186
|
-
}, [z, b, i, w, y, e, r, (ee = x.data) == null ? void 0 : ee.formatted, n, x.isFetching, x.isLoading, L, K, B, g.isFetching,
|
185
|
+
}, [z, b, i, w, y, e, r, (ee = x.data) == null ? void 0 : ee.formatted, n, x.isFetching, x.isLoading, L, K, B, g.isFetching, h == null ? void 0 : h.id, E, M, F, d, H]);
|
187
186
|
let Fe = [`switch chain to ${(te = e.chain) == null ? void 0 : te.toLowerCase()}`, `select ${(se = e.chain) == null ? void 0 : se.toLowerCase()} wallet`, "connect custom wallet", "enter recipient wallet address"];
|
188
187
|
function Le() {
|
189
188
|
var s, u, p, $;
|
@@ -194,19 +193,19 @@ function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowW
|
|
194
193
|
{
|
195
194
|
disabled: Le(),
|
196
195
|
style: a != null && a.isGradient && O && R ? {
|
197
|
-
...
|
198
|
-
boxShadow:
|
196
|
+
...I == null ? void 0 : I.gradientStyle,
|
197
|
+
boxShadow: I && I.customTheme && ((ce = (re = I.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
199
198
|
} : {
|
200
|
-
boxShadow:
|
199
|
+
boxShadow: I && I.customTheme && ((ie = (ne = I.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
201
200
|
},
|
202
201
|
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${a != null && a.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${O && R && a.color} ${a.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${a != null && a.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
|
203
202
|
onClick: () => {
|
204
|
-
B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && V && b !== null || (e == null ? void 0 : e.networkType) !== "tron" &&
|
203
|
+
B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && V && b !== null || (e == null ? void 0 : e.networkType) !== "tron" && J && Q) && !v ? m("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && J && Q || v ? m("to") : m("from")), e.chainId === "eclipse-svm" && !j(b) ? (S(!0), m("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (S(!0), m("to")) : Ge();
|
205
204
|
},
|
206
|
-
children: /* @__PURE__ */ N("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__ */ N("p", { className: "bw-relative bw-z-20", children: O && R ? Be ? /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) : B ? a.text.length ? a.text : "Start Transaction" : `Connect ${
|
205
|
+
children: /* @__PURE__ */ N("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__ */ N("p", { className: "bw-relative bw-z-20", children: O && R ? Be ? /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) : B ? a.text.length ? a.text : "Start Transaction" : `Connect ${he} Wallet` : /* @__PURE__ */ N("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ N(oe, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
207
206
|
}
|
208
207
|
);
|
209
208
|
}
|
210
209
|
export {
|
211
|
-
|
210
|
+
ct as default
|
212
211
|
};
|
@@ -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 {
|
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-DgJB3Qno.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-DvR1iioL.js";
|
3
|
+
import { n as Wn } from "./index-BIN4LE_6.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|
@@ -1,56 +1,56 @@
|
|
1
|
-
import {
|
1
|
+
import { al as L, am as b, an as F, ao as N, ap as P, aq as w, ar as S, as as E, at as $, au as C, av as G, aw as m, ax as I, ay as A, az as R, aA as y, aB as O, aC as q, aD as D, aE as T, aF as v, aG as k, aH as H } from "./index-BIN4LE_6.js";
|
2
2
|
const h = "/docs/contract/encodeErrorResult";
|
3
3
|
function x(t) {
|
4
|
-
const { abi: s, errorName: a, args:
|
4
|
+
const { abi: s, errorName: a, args: r } = t;
|
5
5
|
let e = s[0];
|
6
6
|
if (a) {
|
7
|
-
const u = L({ abi: s, args:
|
7
|
+
const u = L({ abi: s, args: r, name: a });
|
8
8
|
if (!u)
|
9
9
|
throw new b(a, { docsPath: h });
|
10
10
|
e = u;
|
11
11
|
}
|
12
12
|
if (e.type !== "error")
|
13
13
|
throw new b(void 0, { docsPath: h });
|
14
|
-
const c =
|
14
|
+
const c = F(e), n = N(c);
|
15
15
|
let o = "0x";
|
16
|
-
if (
|
16
|
+
if (r && r.length > 0) {
|
17
17
|
if (!e.inputs)
|
18
|
-
throw new
|
19
|
-
o = w(e.inputs,
|
18
|
+
throw new P(e.name, { docsPath: h });
|
19
|
+
o = w(e.inputs, r);
|
20
20
|
}
|
21
|
-
return
|
21
|
+
return S([n, o]);
|
22
22
|
}
|
23
23
|
const p = "/docs/contract/encodeFunctionResult";
|
24
24
|
function B(t) {
|
25
|
-
const { abi: s, functionName: a, result:
|
25
|
+
const { abi: s, functionName: a, result: r } = t;
|
26
26
|
let e = s[0];
|
27
27
|
if (a) {
|
28
|
-
const
|
29
|
-
if (!
|
28
|
+
const n = L({ abi: s, name: a });
|
29
|
+
if (!n)
|
30
30
|
throw new E(a, { docsPath: p });
|
31
|
-
e =
|
31
|
+
e = n;
|
32
32
|
}
|
33
33
|
if (e.type !== "function")
|
34
34
|
throw new E(void 0, { docsPath: p });
|
35
35
|
if (!e.outputs)
|
36
|
-
throw new
|
36
|
+
throw new $(e.name, { docsPath: p });
|
37
37
|
const c = (() => {
|
38
38
|
if (e.outputs.length === 0)
|
39
39
|
return [];
|
40
40
|
if (e.outputs.length === 1)
|
41
|
-
return [
|
42
|
-
if (Array.isArray(
|
43
|
-
return
|
44
|
-
throw new
|
41
|
+
return [r];
|
42
|
+
if (Array.isArray(r))
|
43
|
+
return r;
|
44
|
+
throw new C(r);
|
45
45
|
})();
|
46
46
|
return w(e.outputs, c);
|
47
47
|
}
|
48
|
-
const
|
49
|
-
async function
|
50
|
-
const { data: s, ccipRequest: a } = t, { args: [
|
51
|
-
return await Promise.all(
|
48
|
+
const U = "x-batch-gateway:true";
|
49
|
+
async function j(t) {
|
50
|
+
const { data: s, ccipRequest: a } = t, { args: [r] } = G({ abi: m, data: s }), e = [], c = [];
|
51
|
+
return await Promise.all(r.map(async (n, o) => {
|
52
52
|
try {
|
53
|
-
c[o] =
|
53
|
+
c[o] = await a(n), e[o] = !1;
|
54
54
|
} catch (u) {
|
55
55
|
e[o] = !0, c[o] = _(u);
|
56
56
|
}
|
@@ -66,20 +66,20 @@ function _(t) {
|
|
66
66
|
errorName: "HttpError",
|
67
67
|
args: [t.status, t.shortMessage]
|
68
68
|
}) : x({
|
69
|
-
abi: [
|
69
|
+
abi: [I],
|
70
70
|
errorName: "Error",
|
71
71
|
args: ["shortMessage" in t ? t.shortMessage : t.message]
|
72
72
|
});
|
73
73
|
}
|
74
74
|
function z(t, s) {
|
75
|
-
if (!
|
76
|
-
throw new
|
77
|
-
if (!
|
78
|
-
throw new
|
75
|
+
if (!A(t, { strict: !1 }))
|
76
|
+
throw new R({ address: t });
|
77
|
+
if (!A(s, { strict: !1 }))
|
78
|
+
throw new R({ address: s });
|
79
79
|
return t.toLowerCase() === s.toLowerCase();
|
80
80
|
}
|
81
81
|
class J extends y {
|
82
|
-
constructor({ callbackSelector: s, cause: a, data:
|
82
|
+
constructor({ callbackSelector: s, cause: a, data: r, extraData: e, sender: c, urls: n }) {
|
83
83
|
var o;
|
84
84
|
super(a.shortMessage || "An error occurred while fetching for an offchain result.", {
|
85
85
|
cause: a,
|
@@ -87,12 +87,12 @@ class J extends y {
|
|
87
87
|
...a.metaMessages || [],
|
88
88
|
(o = a.metaMessages) != null && o.length ? "" : [],
|
89
89
|
"Offchain Gateway Call:",
|
90
|
-
|
90
|
+
n && [
|
91
91
|
" Gateway URL(s):",
|
92
|
-
...
|
92
|
+
...n.map((u) => ` ${O(u)}`)
|
93
93
|
],
|
94
94
|
` Sender: ${c}`,
|
95
|
-
` Data: ${
|
95
|
+
` Data: ${r}`,
|
96
96
|
` Callback selector: ${s}`,
|
97
97
|
` Extra data: ${e}`
|
98
98
|
].flat(),
|
@@ -105,7 +105,7 @@ class W extends y {
|
|
105
105
|
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
106
106
|
metaMessages: [
|
107
107
|
`Gateway URL: ${O(a)}`,
|
108
|
-
`Response: ${
|
108
|
+
`Response: ${q(s)}`
|
109
109
|
],
|
110
110
|
name: "OffchainLookupResponseMalformedError"
|
111
111
|
});
|
@@ -148,77 +148,77 @@ const Y = "0x556f1830", Q = {
|
|
148
148
|
}
|
149
149
|
]
|
150
150
|
};
|
151
|
-
async function Z(t, { blockNumber: s, blockTag: a, data:
|
151
|
+
async function Z(t, { blockNumber: s, blockTag: a, data: r, to: e }) {
|
152
152
|
const { args: c } = D({
|
153
|
-
data:
|
153
|
+
data: r,
|
154
154
|
abi: [Q]
|
155
|
-
}), [
|
155
|
+
}), [n, o, u, f, d] = c, { ccipRead: i } = t, g = i && typeof (i == null ? void 0 : i.request) == "function" ? i.request : V;
|
156
156
|
try {
|
157
|
-
if (!z(e,
|
158
|
-
throw new K({ sender:
|
159
|
-
const l = o.includes(
|
157
|
+
if (!z(e, n))
|
158
|
+
throw new K({ sender: n, to: e });
|
159
|
+
const l = o.includes(U) ? await j({
|
160
160
|
data: u,
|
161
161
|
ccipRequest: g
|
162
|
-
}) : await g({ data: u, sender:
|
162
|
+
}) : await g({ data: u, sender: n, urls: o }), { data: M } = await T(t, {
|
163
163
|
blockNumber: s,
|
164
164
|
blockTag: a,
|
165
|
-
data:
|
165
|
+
data: v([
|
166
166
|
f,
|
167
167
|
w([{ type: "bytes" }, { type: "bytes" }], [l, d])
|
168
168
|
]),
|
169
169
|
to: e
|
170
170
|
});
|
171
|
-
return
|
171
|
+
return M;
|
172
172
|
} catch (l) {
|
173
173
|
throw new J({
|
174
174
|
callbackSelector: f,
|
175
175
|
cause: l,
|
176
|
-
data:
|
176
|
+
data: r,
|
177
177
|
extraData: d,
|
178
|
-
sender:
|
178
|
+
sender: n,
|
179
179
|
urls: o
|
180
180
|
});
|
181
181
|
}
|
182
182
|
}
|
183
183
|
async function V({ data: t, sender: s, urls: a }) {
|
184
184
|
var e;
|
185
|
-
let
|
185
|
+
let r = new Error("An unknown error occurred.");
|
186
186
|
for (let c = 0; c < a.length; c++) {
|
187
|
-
const
|
187
|
+
const n = a[c], o = n.includes("{data}") ? "GET" : "POST", u = o === "POST" ? { data: t, sender: s } : void 0, f = o === "POST" ? { "Content-Type": "application/json" } : {};
|
188
188
|
try {
|
189
|
-
const d = await fetch(
|
189
|
+
const d = await fetch(n.replace("{sender}", s.toLowerCase()).replace("{data}", t), {
|
190
190
|
body: JSON.stringify(u),
|
191
191
|
headers: f,
|
192
192
|
method: o
|
193
193
|
});
|
194
194
|
let i;
|
195
195
|
if ((e = d.headers.get("Content-Type")) != null && e.startsWith("application/json") ? i = (await d.json()).data : i = await d.text(), !d.ok) {
|
196
|
-
|
196
|
+
r = new k({
|
197
197
|
body: u,
|
198
|
-
details: i != null && i.error ?
|
198
|
+
details: i != null && i.error ? q(i.error) : d.statusText,
|
199
199
|
headers: d.headers,
|
200
200
|
status: d.status,
|
201
|
-
url:
|
201
|
+
url: n
|
202
202
|
});
|
203
203
|
continue;
|
204
204
|
}
|
205
|
-
if (!
|
206
|
-
|
205
|
+
if (!H(i)) {
|
206
|
+
r = new W({
|
207
207
|
result: i,
|
208
|
-
url:
|
208
|
+
url: n
|
209
209
|
});
|
210
210
|
continue;
|
211
211
|
}
|
212
212
|
return i;
|
213
213
|
} catch (d) {
|
214
|
-
|
214
|
+
r = new k({
|
215
215
|
body: u,
|
216
216
|
details: d.message,
|
217
|
-
url:
|
217
|
+
url: n
|
218
218
|
});
|
219
219
|
}
|
220
220
|
}
|
221
|
-
throw
|
221
|
+
throw r;
|
222
222
|
}
|
223
223
|
export {
|
224
224
|
V as ccipRequest,
|