@blockend/widget 1.0.46 → 1.0.48
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-ebEKf9Ro.js → AllRoutes-GG915rBw.js} +9 -9
- package/dist/{Box-CiCWnabh.js → Box-DdtDQFy9.js} +11 -11
- package/dist/{EstGas-BVEriilK.js → EstGas-M3tvG2C0.js} +335 -304
- package/dist/{Grow-C6PHu0yK.js → Grow-BUfBvEgN.js} +2 -2
- package/dist/{InputComp-BXSYOI6T.js → InputComp-90kAsSUc.js} +5 -5
- package/dist/{LoadRoute-BNZMhjBq.js → LoadRoute-D9IO_K77.js} +18 -18
- package/dist/QuotesProgress-BoWKVDeg.js +28 -0
- package/dist/{SwapAsset-5fGa7RI7.js → SwapAsset-BWDjgwJW.js} +1 -1
- package/dist/{Tooltip-DZnPQjew.js → Tooltip-SvgmfCp2.js} +3 -3
- package/dist/{TxnButton-BmnXiTl8.js → TxnButton-DVWpwZmv.js} +58 -54
- package/dist/{add-DliAEKbR.js → add-CsVPUZji.js} +1 -1
- package/dist/{all-wallets-9YBmSsEh.js → all-wallets-CFmAxEw7.js} +1 -1
- package/dist/{app-store-cLc_fbJp.js → app-store-B4mtp1mU.js} +1 -1
- package/dist/{apple-DmGlSCW4.js → apple-C-vXA_-Q.js} +1 -1
- package/dist/{arrow-bottom-BNKn4j5U.js → arrow-bottom-6CDjU1eE.js} +1 -1
- package/dist/{arrow-bottom-circle-CZL2vTc2.js → arrow-bottom-circle-DN9qZO8D.js} +1 -1
- package/dist/{arrow-left-D9JcV0Q-.js → arrow-left-CjJLmw6Y.js} +1 -1
- package/dist/{arrow-right-DOHZnmbU.js → arrow-right-BpTLDTMX.js} +1 -1
- package/dist/{arrow-top-Dyu4OO_u.js → arrow-top-DU1aEYkh.js} +1 -1
- package/dist/{bank-CtB7x5WX.js → bank-CtT_v4OA.js} +1 -1
- package/dist/{basic-sgi7m0S-.js → basic-CQ9dw-89.js} +3 -3
- package/dist/{browser-CPMV76Fc.js → browser-BzC416Ga.js} +1 -1
- package/dist/{card-DZrjJpNd.js → card-D9RpFcx0.js} +1 -1
- package/dist/{ccip-rz-h0ONe.js → ccip-Dzss3Y16.js} +58 -58
- package/dist/{checkmark-CO1kXDe-.js → checkmark-CtUAX8EG.js} +1 -1
- package/dist/{checkmark-bold-g1JkiOD4.js → checkmark-bold-VZL2SuxB.js} +1 -1
- package/dist/{chevron-bottom-CeJz8Reo.js → chevron-bottom-CV_Ifosh.js} +1 -1
- package/dist/{chevron-left-BcYg2UPw.js → chevron-left-vauViuBF.js} +1 -1
- package/dist/{chevron-right-BsBn3zrb.js → chevron-right-Ch0-iP-t.js} +1 -1
- package/dist/{chevron-top-CMxkT0uL.js → chevron-top-fvIkVky4.js} +1 -1
- package/dist/{chrome-store-CkCy-7ku.js → chrome-store-CgMxFYMx.js} +1 -1
- package/dist/{clock-DMc_CWtO.js → clock-CD_Be9u1.js} +1 -1
- package/dist/{close-CryuK1CT.js → close-CuvWjYvJ.js} +1 -1
- package/dist/{coinPlaceholder-DvVl4DoH.js → coinPlaceholder-UVXPM539.js} +1 -1
- package/dist/{compass-D03r7VwG.js → compass-DORfxdqQ.js} +1 -1
- package/dist/{copy-DMvE_6eP.js → copy-BWAfHXcr.js} +1 -1
- package/dist/{core-DCInaJVR.js → core-CxJ55_hm.js} +3 -3
- package/dist/{cursor-95Nxz9_g.js → cursor-hvQCvuY0.js} +1 -1
- package/dist/{cursor-transparent-D8DY5_j7.js → cursor-transparent-BdJs-4PE.js} +1 -1
- package/dist/{desktop-CRGnR_c9.js → desktop-C16HW3Xx.js} +1 -1
- package/dist/{disconnect-JWp74w81.js → disconnect-DRUAX0I2.js} +1 -1
- package/dist/{discord-BRXfeglo.js → discord-I752GmaU.js} +1 -1
- package/dist/{down-RANbXRSh.js → down-ZnYZwmwQ.js} +2 -2
- package/dist/{etherscan-pfbXsPpq.js → etherscan--xkrRjIS.js} +1 -1
- package/dist/{exclamation-triangle-BWZ21L0p.js → exclamation-triangle-DXj7lIwe.js} +1 -1
- package/dist/{extension-CmXIVuOr.js → extension-DBPkceL0.js} +1 -1
- package/dist/{external-link-CAybzTlO.js → external-link-CbPqDFzI.js} +1 -1
- package/dist/{facebook-DcDQpXBA.js → facebook-CFI3uzSu.js} +1 -1
- package/dist/{farcaster-CGXV2sTr.js → farcaster-DN93zQp8.js} +1 -1
- package/dist/{filters-4PzOF6Y_.js → filters-C6BY9h_R.js} +1 -1
- package/dist/{getChainIds-DHE0M6xN.js → getChainIds-DP8l1FCH.js} +2 -2
- package/dist/{getCosmosAddress-BkiMb5Ws.js → getCosmosAddress-B5ISgLr5.js} +4 -4
- package/dist/{github-z1VaBQpb.js → github-DD1Wyw9Y.js} +1 -1
- package/dist/{google-DDDXhxRD.js → google-D1E_G9Jw.js} +1 -1
- package/dist/{hamburger-x__CpQ8N.js → hamburger-DPRWU8rW.js} +461 -454
- package/dist/{help-circle-Hk0xQlw5.js → help-circle-MjewM8fh.js} +1 -1
- package/dist/{id-BPRiRQQi.js → id-DWrEAL0Y.js} +1 -1
- package/dist/{image-CZ26oTkB.js → image-B1OlMZ_D.js} +1 -1
- package/dist/{index-DrCKZb_R.js → index-8FeyhkrZ.js} +1 -1
- package/dist/{index-CAsUs2fN.js → index-B5AWUOpG.js} +11 -11
- package/dist/{index-ChjHLLtj.js → index-B8t6PLz8.js} +2 -2
- package/dist/{index-DxSSO5f_.js → index-BGoawJS_.js} +4 -4
- package/dist/{index-DA6hSPnv.js → index-BtSjpRJE.js} +114 -114
- package/dist/{index-BaJGH0Wo.js → index-ByE0Pqgp.js} +16 -13
- package/dist/{index-D6p8qIoR.js → index-CkvOQTTa.js} +1 -1
- package/dist/{index-D6rJMZnJ.js → index-CztKubZB.js} +78 -78
- package/dist/{index-DSkfxRgh.js → index-D7pkN4od.js} +4 -4
- package/dist/{index-Bd6WahOg.js → index-DRmMe_Lj.js} +8046 -8011
- package/dist/{index-2nKvQV6S.js → index-Ga_wsstH.js} +19 -19
- package/dist/{index.es-D7A4rCjT.js → index.es-COEAI0x5.js} +2 -2
- package/dist/{index.es-9vMrGsMN.js → index.es-leDx9_0K.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-nXKAaGnK.js → info-BIglQyok.js} +1 -1
- package/dist/{info-circle-DBRsyv1V.js → info-circle-ygUHgPMr.js} +1 -1
- package/dist/{lightbulb-B1ByE_z3.js → lightbulb-n3p60wb2.js} +1 -1
- package/dist/{mail-BEh53yuD.js → mail-CvJFMwVR.js} +1 -1
- package/dist/{mobile-BTInaRxp.js → mobile-2Q4FMkp7.js} +1 -1
- package/dist/{more-BdkhRCT0.js → more-Dl6UNVYf.js} +1 -1
- package/dist/{network-placeholder-_q940_Fj.js → network-placeholder-BHa-8IYu.js} +1 -1
- package/dist/{nftPlaceholder-C_vMI1Zq.js → nftPlaceholder-C-kNqpt7.js} +1 -1
- package/dist/{off-CjN7QcgJ.js → off-vA0xiDBU.js} +1 -1
- package/dist/{play-store-D0oSbUK-.js → play-store-BdESAvn7.js} +1 -1
- package/dist/{plus-lZsdp6Eh.js → plus-CI5D39lI.js} +1 -1
- package/dist/{qr-code-CQEDt6E5.js → qr-code-DLg6lOTi.js} +1 -1
- package/dist/{recycle-horizontal-BPR3n_8r.js → recycle-horizontal-3J42KsWq.js} +1 -1
- package/dist/{refresh-BJkQe_FG.js → refresh-BEgbmmM1.js} +1 -1
- package/dist/{reown-logo-Bevkr0xz.js → reown-logo-ATUFBzuh.js} +1 -1
- package/dist/{search-BfGI_53c.js → search-Dz34DwRb.js} +1 -1
- package/dist/{send-CqRHFlOm.js → send-B57ao-nU.js} +1 -1
- package/dist/{swapHorizontal-uS8nbcBj.js → swapHorizontal-po0eESEE.js} +1 -1
- package/dist/{swapHorizontalBold-rzZa_A7L.js → swapHorizontalBold-jdwjn6I2.js} +1 -1
- package/dist/{swapHorizontalMedium-DmxWOlid.js → swapHorizontalMedium-DFkcNnL0.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-Bh4Bsx-4.js → swapHorizontalRoundedBold-BDIZiNDG.js} +1 -1
- package/dist/{swapVertical-B30qm7WO.js → swapVertical-CCv4s5uT.js} +1 -1
- package/dist/{telegram-CITR-rqw.js → telegram-GAjmXYBs.js} +1 -1
- package/dist/{three-dots-DvMlVtkk.js → three-dots-DcqTLEOU.js} +1 -1
- package/dist/{twitch-Cg70CCVs.js → twitch-BGYB_svY.js} +1 -1
- package/dist/{twitterIcon-lUQKP1xi.js → twitterIcon-BmqcVfVS.js} +1 -1
- package/dist/{unsupportedProp-BEw61JH6.js → unsupportedProp-AqCr28aR.js} +1 -1
- package/dist/{useRegisterError-FSrH_Jvm.js → useRegisterError-pQkE1Atn.js} +1 -1
- package/dist/{verify-Dr2B20vD.js → verify-C6RCoVYC.js} +1 -1
- package/dist/{verify-filled-Bc-tpntt.js → verify-filled-BqhB0MZC.js} +1 -1
- package/dist/{w3m-modal-BW_yp0bM.js → w3m-modal-DZ52Gjxh.js} +2 -2
- package/dist/{wallet-LyIKSgXv.js → wallet-XsxVSYSp.js} +1 -1
- package/dist/{wallet-placeholder-Dofecbxd.js → wallet-placeholder-CTkFMX8-.js} +1 -1
- package/dist/{walletconnect-CIiBCeU4.js → walletconnect-BwzMMj6O.js} +1 -1
- package/dist/{warning-circle-DSqqePjX.js → warning-circle-Ri_DXk1y.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-Bw4KtWr5.js → x-Dfc3V8pm.js} +1 -1
- package/package.json +1 -1
- package/dist/QuotesProgress-BuNSdVaQ.js +0 -28
@@ -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, aE as St, m as Bt, g as Wt, b as Lt, _ as Te, d as z, h as Nt, i as Ht, s as Vt } from "./index-DRmMe_Lj.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-pQkE1Atn.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-DRmMe_Lj.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-pQkE1Atn.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-BtSjpRJE.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;
|
@@ -61,7 +61,7 @@ function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBala
|
|
61
61
|
G(a);
|
62
62
|
},
|
63
63
|
placeholder: "0.0",
|
64
|
-
className: "bw-text-3xl bw-border-none focus:bw-placeholder:bw-opacity-0 placeholder:bw-text-left bw-h-[36px] bw-ml-auto bw-mb-1 bw-pl-1 bw-min-w-[45px] bw-max-w-[200px] bw-font-medium placeholder:bw-text-text-placeholder bw-text-text-primary bw-bg-transparent"
|
64
|
+
className: "bw-text-2xl md:bw-text-3xl bw-border-none focus:bw-placeholder:bw-opacity-0 placeholder:bw-text-left bw-h-[36px] bw-ml-auto bw-mb-1 bw-pl-1 bw-min-w-[45px] bw-max-w-[200px] bw-font-medium placeholder:bw-text-text-placeholder bw-text-text-primary bw-bg-transparent"
|
65
65
|
}
|
66
66
|
)
|
67
67
|
] })
|
@@ -91,7 +91,7 @@ function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBala
|
|
91
91
|
] }) : /* @__PURE__ */ t(k, {}) })
|
92
92
|
] })
|
93
93
|
] }),
|
94
|
-
/* @__PURE__ */ t("div", { className: "bw-flex bw-justify-between bw-items-center", children: /* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: /* @__PURE__ */ b("p", { className: ` bw-font-normal bw-pl-2 ${w.length ? "bw-text-text-secondary bw-text-sm" : "bw-text-text-placeholder bw-text-[10px]"}`, children: [
|
94
|
+
/* @__PURE__ */ t("div", { className: "bw-flex bw-justify-between bw-items-center", children: /* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: /* @__PURE__ */ b("p", { className: ` bw-font-normal bw-pl-2 ${w.length ? "bw-text-text-secondary bw-text-xs md:bw-text-sm" : "bw-text-text-placeholder bw-text-[10px]"}`, children: [
|
95
95
|
"$",
|
96
96
|
u(R(w * (e == null ? void 0 : e.lastPrice)), 10)
|
97
97
|
] }) }) })
|
@@ -1,14 +1,14 @@
|
|
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-DRmMe_Lj.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-ZnYZwmwQ.js";
|
8
8
|
import { e as se } from "./ethertousd-CC_ezooz.js";
|
9
|
-
import { O as H } from "./index-
|
10
|
-
import {
|
11
|
-
function
|
9
|
+
import { O as H } from "./index-CkvOQTTa.js";
|
10
|
+
import { F as J, i as ae } from "./useRegisterError-pQkE1Atn.js";
|
11
|
+
function oe({ fill: n }) {
|
12
12
|
return /* @__PURE__ */ e(
|
13
13
|
"svg",
|
14
14
|
{
|
@@ -28,9 +28,9 @@ function xe({ fill: n }) {
|
|
28
28
|
}
|
29
29
|
);
|
30
30
|
}
|
31
|
-
function
|
32
|
-
var y, N, F,
|
33
|
-
const x = n.data, [c, Y] = 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 } =
|
31
|
+
function ue({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount: X, isRoutesEnabled: v }) {
|
32
|
+
var y, N, F, S, u, k, C, $, E, j, I, L, U, A, G, O, T, z, M, R, _, B, V, q, P, W;
|
33
|
+
const x = n.data, [c, Y] = 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;
|
34
34
|
le(() => {
|
35
35
|
var i;
|
36
36
|
if (b) {
|
@@ -40,8 +40,8 @@ function ke({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount
|
|
40
40
|
}), Y({ tempGasObj: f, token: Z });
|
41
41
|
}
|
42
42
|
}, [b]);
|
43
|
-
let ee = (b == null ? void 0 : b.outputAmountDisplay) || "", be =
|
44
|
-
return /* @__PURE__ */ e("div", { className: "bw-mt-2", children: (
|
43
|
+
let ee = (b == null ? void 0 : b.outputAmountDisplay) || "", be = Q.toString(), ne = (N = (y = b == null ? void 0 : b.providerDetails) == null ? void 0 : y.logoUrl) != null && N.length ? (F = b == null ? void 0 : b.providerDetails) == null ? void 0 : F.logoUrl : D;
|
44
|
+
return /* @__PURE__ */ e("div", { className: "bw-mt-2", children: (S = h == null ? void 0 : h.chain) != null && S.length && ((u = g == null ? void 0 : g.coin) != null && u.length) && ((k = p == null ? void 0 : p.chain) != null && k.length) && ((C = d == null ? void 0 : d.coin) != null && C.length) && X.length && v ? n.isSuccess && !((j = (E = ($ = n.data) == null ? void 0 : $.data) == null ? void 0 : E.quotes) != null && j.length) && !n.isFetching ? /* @__PURE__ */ e("div", { className: "bw-bg-background-container bw-text-text-secondary bw-flex bw-justify-center bw-items-center bw-h-[80px] bw-relative bw-flex-col bw-border bw-border-border-primary", children: "No Routes Available" }) : n.isSuccess || n.isLoading || n.isFetching ? /* @__PURE__ */ t("div", { children: [
|
45
45
|
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
46
46
|
" ",
|
47
47
|
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: [
|
@@ -56,10 +56,10 @@ function ke({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount
|
|
56
56
|
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-start bw-gap-x-2", children: [
|
57
57
|
d != null && d.image && !n.isFetching ? /* @__PURE__ */ e("img", { src: d.image, width: 30, height: 30, className: "bw-mt-1 bw-max-w-[30px] bw-max-h-[30px] bw-object-contain bw-bg-background-secondary bw-rounded-[50%]" }) : /* @__PURE__ */ e(m, {}),
|
58
58
|
/* @__PURE__ */ t("div", { children: [
|
59
|
-
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-mt-3 bw-rounded-sm bw-h-[36px] bw-min-h-[36px]", animation: "wave", variant: "rectangular", height: 36, width: 250 }) : /* @__PURE__ */ e("p", { className: "bw-text-3xl bw-mb-1 bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(H, { value: ee, decimal: 12 }) }),
|
59
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-mt-3 bw-rounded-sm bw-h-[36px] bw-min-h-[36px]", animation: "wave", variant: "rectangular", height: 36, width: 250 }) : /* @__PURE__ */ e("p", { className: "bw-text-2xl md:bw-text-3xl bw-mb-1 bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(H, { value: ee, decimal: 12 }) }),
|
60
60
|
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-mt-2 bw-rounded-sm bw-h-[20px] bw-w-[100px] bw-min-h-[20px]", variant: "rectangular", animation: "wave", height: 20, width: 100 }) : /* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
61
61
|
/* @__PURE__ */ e(ce, { fill: "var(--tw-text-primary)" }),
|
62
|
-
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-primary", children: [
|
62
|
+
/* @__PURE__ */ t("p", { className: "bw-text-xs md:bw-text-sm bw-font-medium bw-text-text-primary", children: [
|
63
63
|
"Total Fee:",
|
64
64
|
" $",
|
65
65
|
/* @__PURE__ */ e(J, { value: ((U = c == null ? void 0 : c.tempGasObj) == null ? void 0 : U.amountInUSD) || 0, options: { maxDecimals: 8 } }),
|
@@ -71,9 +71,9 @@ function ke({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount
|
|
71
71
|
] })
|
72
72
|
] }),
|
73
73
|
/* @__PURE__ */ t("div", { className: " bw-text-sm bw-font-medium bw-mt-2 bw-text-text-loaderbar ", children: [
|
74
|
-
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-w-[50px] bw-rounded-sm bw-h-[20px] bw-min-h-[20px]", variant: "rectangular", animation: "wave", height: 20, width: 50 }) : /* @__PURE__ */ t("p", { className: "bw-text-text-secondary bw-font-medium bw-text-sm", children: [
|
74
|
+
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-w-[50px] bw-rounded-sm bw-h-[20px] bw-min-h-[20px]", variant: "rectangular", animation: "wave", height: 20, width: 50 }) : /* @__PURE__ */ t("p", { className: "bw-text-text-secondary bw-font-medium bw-text-xs md:bw-text-sm", children: [
|
75
75
|
"$",
|
76
|
-
/* @__PURE__ */ e(H, { value: be, decimal:
|
76
|
+
/* @__PURE__ */ e(H, { value: be, decimal: 10 })
|
77
77
|
] }),
|
78
78
|
n.isFetching ? /* @__PURE__ */ e(o, { className: "bw-bg-background-secondary bw-w-[50px] bw-mt-2 bw-rounded-sm bw-h-[20px] bw-min-h-[20px] ", variant: "rectangular", animation: "wave", height: 20, width: 50 }) : ((M = (z = (T = x == null ? void 0 : x.data) == null ? void 0 : T.quotes) == null ? void 0 : z[0]) == null ? void 0 : M._id) === b._id ? /* @__PURE__ */ e("div", { style: { ...w.gradientStyle }, className: `${l || `${(R = w.gradientStyle) != null && R.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} `} bw-mt-3 bw-text-right bw-text-transparent bw-text-[10px] bw-font-bold bw-bg-clip-text ${a.gradienttext}`, children: "BEST" }) : /* @__PURE__ */ e(m, {})
|
79
79
|
] })
|
@@ -98,12 +98,12 @@ function ke({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount
|
|
98
98
|
" "
|
99
99
|
] }) : /* @__PURE__ */ e(m, {}),
|
100
100
|
/* @__PURE__ */ e("div", { style: n.isFetching ? {} : { ...w.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || ` ${a.overlay} ${(q = w == null ? void 0 : w.gradientStyle) != null && q.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`} bw-absolute bw-right-0 bw-rounded-[50%] bw-w-[4px] bw-h-[4px] ` }),
|
101
|
-
/* @__PURE__ */ e("div", { style: n.isFetching ? {} : { ...w.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || ` ${a.overlay} ${(
|
101
|
+
/* @__PURE__ */ e("div", { style: n.isFetching ? {} : { ...w.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || ` ${a.overlay} ${(P = w == null ? void 0 : w.gradientStyle) != null && P.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`} bw-absolute bw-rounded-[50%] bw-w-[4px] bw-h-[4px] ` })
|
102
102
|
] })
|
103
103
|
] }),
|
104
104
|
/* @__PURE__ */ e("div", { className: "bw-bg-background-container bw-flex bw-items-center bw-w-[85%] bw-mx-auto bw-rounded-b-md bw-justify-center bw-h-[60px]", children: n.isFetching ? /* @__PURE__ */ e("div", { className: "bw-mt-6 bw-w-full bw-h-[20px]" }) : /* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-4 bw-mt-2 bw-bg-background-container bw-justify-center ", children: [
|
105
105
|
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
106
|
-
/* @__PURE__ */ e(
|
106
|
+
/* @__PURE__ */ e(oe, { fill: "var(--tw-text-secondary)" }),
|
107
107
|
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "Fee" }),
|
108
108
|
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-line-through bw-font-medium bw-text-text-secondary", children: "0.1%" }),
|
109
109
|
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "0" })
|
@@ -114,12 +114,12 @@ function ke({ routes: n, handleShowAllRoutes: K, routesData: b, price: Q, amount
|
|
114
114
|
] }),
|
115
115
|
/* @__PURE__ */ t("div", { className: " bw-gap-x-1 bw-flex bw-items-center bw-text-xs bw-font-normal bw-text-text-primary", children: [
|
116
116
|
/* @__PURE__ */ e(me, { fill: "var(--tw-text-secondary)" }),
|
117
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: `${((
|
117
|
+
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: `${((W = b == null ? void 0 : b.steps) == null ? void 0 : W.length) || ""} step` })
|
118
118
|
] })
|
119
119
|
] }) })
|
120
120
|
] })
|
121
121
|
] }) : v ? /* @__PURE__ */ e("div", { className: "bw-bg-background-container bw-text-text-secondary bw-justify-center bw-items-center bw-h-[80px] bw-relative bw-flex bw-flex-col bw-border bw-border-border-primary", children: "Failed to load routes" }) : /* @__PURE__ */ e(m, {}) : /* @__PURE__ */ e(m, {}) });
|
122
122
|
}
|
123
123
|
export {
|
124
|
-
|
124
|
+
ue as default
|
125
125
|
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsxs as o, jsx as a, Fragment as m } from "react/jsx-runtime";
|
2
|
+
import { s as l } from "./WidgetForm.module-QHJ0-m5f.js";
|
3
|
+
import { u as g } from "./index-DRmMe_Lj.js";
|
4
|
+
function y({ routesData: x, routes: e, quoteTimer: n, amount: c }) {
|
5
|
+
var s, b, d, w;
|
6
|
+
const r = g((i) => i.configuration), t = g((i) => i.gradient);
|
7
|
+
return c && !e.isFetching && typeof e.data < "u" && ((d = (b = (s = e.data) == null ? void 0 : s.data) == null ? void 0 : b.quotes) != null && d.length) && !e.isError ? /* @__PURE__ */ o("div", { className: "bw-flex bw-items-center bw-gap-x-2 bw-justify-between", children: [
|
8
|
+
/* @__PURE__ */ a("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "New Quote in" }),
|
9
|
+
/* @__PURE__ */ a("div", { className: " bw-w-[250px] bw-flex-1 bw-bg-border-primary bw-h-[3px] bw-overflow-x-hidden", children: /* @__PURE__ */ a(
|
10
|
+
"div",
|
11
|
+
{
|
12
|
+
style: {
|
13
|
+
height: "100%",
|
14
|
+
...r.gradientStyle,
|
15
|
+
width: `${100 - n / x.deadline * 100}%`
|
16
|
+
},
|
17
|
+
className: ` ${t || `${(w = r.gradientStyle) != null && w.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${l.overlay}`} bw-relative `
|
18
|
+
}
|
19
|
+
) }),
|
20
|
+
/* @__PURE__ */ o("div", { style: { ...r.gradientStyle }, className: `${t ? `${t} bw-bg-clip-text bw-text-transparent` : l.gradienttext} bw-relative bw-text-right bw-w-max bw-text-2xl bw-font-semibold bw-text-transparent `, children: [
|
21
|
+
n,
|
22
|
+
"s"
|
23
|
+
] })
|
24
|
+
] }) : /* @__PURE__ */ a(m, {});
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
y as default
|
28
|
+
};
|
@@ -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-DRmMe_Lj.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-BUfBvEgN.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-pQkE1Atn.js";
|
6
6
|
function Lo(r) {
|
7
7
|
return To("MuiTooltip", r);
|
8
8
|
}
|
@@ -1,44 +1,44 @@
|
|
1
1
|
import { jsx as N } from "react/jsx-runtime";
|
2
2
|
import { useState as q, useEffect as P } from "react";
|
3
|
-
import { useSwitchNetwork as je, useDynamicContext as Ae, useIsLoggedIn as
|
4
|
-
import { a as we, u as
|
3
|
+
import { useSwitchNetwork as je, useDynamicContext as Ae, useIsLoggedIn as ve } from "@dynamic-labs/sdk-react-core";
|
4
|
+
import { a as we, u as m, aA as ze, aB as Me } from "./index-DRmMe_Lj.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 "./getCosmosAddress-
|
9
|
-
import { v as
|
10
|
-
import { u as
|
11
|
-
function
|
12
|
-
const { wallet:
|
13
|
-
async function
|
14
|
-
const A = await window.tronWeb.trx.getBalance(
|
7
|
+
import { u as ae, d as Pe, c as _e, C as oe } from "./useRegisterError-pQkE1Atn.js";
|
8
|
+
import "./getCosmosAddress-B5ISgLr5.js";
|
9
|
+
import { v as Qe } from "./validError-CDlJpg_f.js";
|
10
|
+
import { u as He, p as Je } from "./index-BtSjpRJE.js";
|
11
|
+
function Ke(n) {
|
12
|
+
const { wallet: g, address: y } = we(), [E, S] = q(0);
|
13
|
+
async function T() {
|
14
|
+
const A = await window.tronWeb.trx.getBalance(y);
|
15
15
|
S(A / Math.pow(10, 6));
|
16
16
|
}
|
17
17
|
return P(() => {
|
18
|
-
|
19
|
-
}, [
|
18
|
+
y && (n == null ? void 0 : n.networkType) === "tron" && T();
|
19
|
+
}, [y, n == null ? void 0 : n.networkType]), { tronBal: E };
|
20
20
|
}
|
21
21
|
function j(n) {
|
22
22
|
if (n.key.toLowerCase() === "backpacksol")
|
23
23
|
return !0;
|
24
24
|
}
|
25
|
-
function nt({ routesData: n, routes:
|
25
|
+
function nt({ routesData: n, routes: g, amount: y, isAmountTyped: E, handleShowWallet: S, setConnectWalletField: T, handleConfirmClose: A, balanceSol: F, getCoinBalance: be, handleSuccess: ue }) {
|
26
26
|
var Y, Z, W, k, D, C, ee, te, se, re, ce, ne, ie;
|
27
|
-
const o =
|
27
|
+
const o = m((s) => s.gradient), h = m((s) => s.configuration), e = m((s) => s.fromChain), i = m((s) => s.fromCoin), r = m((s) => s.toChain), w = m((s) => s.toCoin), { isConnected: L, address: _, chain: I } = Oe(), pe = Re(), ge = je(), { getBothWalletConnection: ye, getConnectWallet: xe } = ae({
|
28
28
|
chainData: e
|
29
|
-
}), { connected:
|
29
|
+
}), { connected: Q, address: H, disconnect: Ue } = we(), v = m((s) => s.toDisconnect), d = m((s) => s.customWallet), { getWallet: he } = ae({ chainData: e }), Ie = xe(e, r), [z, me] = q("101"), { tronBal: M } = Ke(e), { cosmosBalance: J } = He(), 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), Te = Pe(), Ne = ze(), { switchChain: Xe, switchChainAsync: fe, isPending: Be } = Ve({
|
30
30
|
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
31
31
|
config: pe,
|
32
32
|
throwForSwitchChainNotSupported: !0,
|
33
33
|
onError(s) {
|
34
|
-
|
34
|
+
Qe(s.message) && Te({ module: "wallet-error-switch", error: s.message });
|
35
35
|
}
|
36
|
-
}),
|
36
|
+
}), x = qe({
|
37
37
|
address: _,
|
38
38
|
token: "",
|
39
39
|
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
40
40
|
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
41
|
-
}),
|
41
|
+
}), K = _e(be || 0, 11), [a, l] = q({
|
42
42
|
text: "",
|
43
43
|
isGradient: !1,
|
44
44
|
color: "bw-bg-border-primary"
|
@@ -49,7 +49,7 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
49
49
|
await fe({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
50
50
|
} catch {
|
51
51
|
}
|
52
|
-
else if ((e == null ? void 0 : e.networkType) === "sol" &&
|
52
|
+
else if ((e == null ? void 0 : e.networkType) === "sol" && z !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
53
53
|
try {
|
54
54
|
let s = await ge({ wallet: b, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
55
55
|
U();
|
@@ -60,11 +60,11 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
60
60
|
...n
|
61
61
|
}), B && (ue(!1), A());
|
62
62
|
}
|
63
|
-
const { primaryWallet: b } = Ae(), V =
|
63
|
+
const { primaryWallet: b } = Ae(), V = ve(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((C = (D = he(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
64
|
if (b)
|
65
65
|
try {
|
66
66
|
const s = await b.getNetwork();
|
67
|
-
|
67
|
+
me(s);
|
68
68
|
} catch {
|
69
69
|
}
|
70
70
|
else
|
@@ -79,11 +79,11 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
79
79
|
}
|
80
80
|
function Se() {
|
81
81
|
var s;
|
82
|
-
return Number(((s =
|
82
|
+
return Number(((s = x == null ? void 0 : x.data) == null ? void 0 : s.formatted) || 0);
|
83
83
|
}
|
84
84
|
function $e(s) {
|
85
85
|
var u;
|
86
|
-
return Number(((u =
|
86
|
+
return Number(((u = J[Je(s.address)]) == null ? void 0 : u.amount) || 0) / Math.pow(10, s.decimals);
|
87
87
|
}
|
88
88
|
function Ee() {
|
89
89
|
var $;
|
@@ -94,7 +94,7 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
94
94
|
amountInToken: c.amountInToken,
|
95
95
|
gas: X(c.amountInToken, t == null ? void 0 : t.decimals),
|
96
96
|
token: t,
|
97
|
-
nativeBal: (d == null ? void 0 : d.length) > 30 && !
|
97
|
+
nativeBal: (d == null ? void 0 : d.length) > 30 && !v && (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" ? F : (t == null ? void 0 : t.networkType) == "tron" ? M : (t == null ? void 0 : t.networkType) == "cosmos" ? $e(t) : Se(),
|
98
98
|
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
99
99
|
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 : G.length > 2 ? 3 : 2
|
100
100
|
};
|
@@ -103,15 +103,15 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
103
103
|
const { token: c } = t;
|
104
104
|
t.source.toLowerCase() == "from_source_wallet" && u(c, t);
|
105
105
|
});
|
106
|
-
let p =
|
107
|
-
if (Number(
|
108
|
-
|
106
|
+
let p = K;
|
107
|
+
if (Number(y) > Number(p))
|
108
|
+
l({
|
109
109
|
text: `Insufficient Balance ${i.coin || ""}`,
|
110
110
|
isGradient: !1,
|
111
111
|
color: "bw-bg-border-primary"
|
112
112
|
});
|
113
|
-
else if ((
|
114
|
-
|
113
|
+
else if ((x != null && x.isLoading || x.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof F > "u" || F === null) && (e == null ? void 0 : e.networkType) === "sol" || !M && (e == null ? void 0 : e.networkType) === "tron")
|
114
|
+
l({
|
115
115
|
text: "Fetching Balance..",
|
116
116
|
isGradient: !1,
|
117
117
|
color: "bw-bg-border-primary"
|
@@ -120,20 +120,20 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
120
120
|
let t = Object.values(s).sort((c, G) => c.order - G.order);
|
121
121
|
t.some((c) => {
|
122
122
|
var G, de, le;
|
123
|
-
return c != null && c.isFromChain && Number(
|
123
|
+
return c != null && c.isFromChain && Number(y) <= Number(p) && Number(c.nativeBal) - Number(y) < c.gas && (i != null && i.isNative) || Number(y) <= Number(p) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (l({
|
124
124
|
text: `Insufficient ${((G = c == null ? void 0 : c.token) == null ? void 0 : G.symbol) || ""} for gas on ${c.token.blockchain}`,
|
125
125
|
isGradient: !1,
|
126
126
|
color: "bw-bg-border-primary"
|
127
|
-
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((de = c == null ? void 0 : c.token) == null ? void 0 : de.chainId) == (r == null ? void 0 : r.chainId)) ? (
|
127
|
+
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((de = c == null ? void 0 : c.token) == null ? void 0 : de.chainId) == (r == null ? void 0 : r.chainId)) ? (l({
|
128
128
|
text: `Insufficient ${((le = c == null ? void 0 : c.token) == null ? void 0 : le.symbol) || ""} for gas on ${c.token.blockchain}`,
|
129
129
|
isGradient: !1,
|
130
130
|
color: "bw-bg-border-primary"
|
131
|
-
}), !0) : (
|
131
|
+
}), !0) : (l({
|
132
132
|
text: "",
|
133
133
|
isGradient: !0,
|
134
134
|
color: o || f.gradientbutton
|
135
135
|
}), !0);
|
136
|
-
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") &&
|
136
|
+
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && l({
|
137
137
|
text: "",
|
138
138
|
isGradient: !0,
|
139
139
|
color: o || f.gradientbutton
|
@@ -142,64 +142,68 @@ function nt({ routesData: n, routes: h, amount: g, isAmountTyped: E, handleShowW
|
|
142
142
|
}
|
143
143
|
P(() => {
|
144
144
|
var s, u, p;
|
145
|
-
!i.coin.length || !(w != null && w.coin.length) ?
|
145
|
+
!i.coin.length || !(w != null && w.coin.length) ? l({
|
146
146
|
text: "Select Token",
|
147
147
|
isGradient: !0,
|
148
148
|
color: o || f.gradientbutton
|
149
|
-
}) : B ? typeof
|
149
|
+
}) : B ? typeof y < "u" && Number(y || 0) <= 0 ? l({
|
150
150
|
text: "Enter Amount",
|
151
151
|
isGradient: !1,
|
152
152
|
color: "bw-bg-border-primary"
|
153
|
-
}) :
|
153
|
+
}) : g.isFetching || !E ? l({
|
154
154
|
text: "Loading Routes...",
|
155
155
|
isGradient: !1,
|
156
156
|
color: "bw-bg-border-primary"
|
157
|
-
}) : e.chainId === "eclipse-svm" && !j(b) ?
|
157
|
+
}) : e.chainId === "eclipse-svm" && !j(b) ? l({
|
158
158
|
text: `Select ${e.name} wallet`,
|
159
159
|
isGradient: !0,
|
160
160
|
color: o || f.gradientbutton
|
161
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ?
|
161
|
+
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? l({
|
162
162
|
text: "Enter recipient wallet address",
|
163
163
|
isGradient: !0,
|
164
164
|
color: o || f.gradientbutton
|
165
|
-
}) : (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && _ === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (b == null ? void 0 : b.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ?
|
165
|
+
}) : (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) && (e == null ? void 0 : e.chainId) == (r == null ? void 0 : r.chainId) && !(d != null && d.length) || (e == null ? void 0 : e.networkType) == "evm" && _ === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (b == null ? void 0 : b.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? l({
|
166
166
|
text: "From and To asset can not be the same!",
|
167
167
|
isGradient: !1,
|
168
168
|
color: "bw-bg-border-primary"
|
169
|
-
}) : (p = (u = (s =
|
169
|
+
}) : (p = (u = (s = g == null ? void 0 : g.data) == null ? void 0 : s.data) == null ? void 0 : u.quotes) != null && p.length ? g != null && g.error ? l({
|
170
|
+
text: "Failed to fetch Quotes",
|
171
|
+
isGradient: !1,
|
172
|
+
color: "bw-bg-border-primary"
|
173
|
+
}) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.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({
|
170
174
|
text: `Switch Chain to ${e.chain}`,
|
171
175
|
isGradient: !0,
|
172
176
|
color: o || f.gradientbutton
|
173
|
-
}) : Ee() :
|
177
|
+
}) : Ee() : l({
|
174
178
|
text: "No Routes Found",
|
175
179
|
isGradient: !1,
|
176
180
|
color: "bw-bg-border-primary"
|
177
|
-
}) :
|
181
|
+
}) : l({
|
178
182
|
text: "",
|
179
183
|
isGradient: !0,
|
180
184
|
color: o || f.gradientbutton
|
181
185
|
});
|
182
|
-
}, [
|
183
|
-
let
|
184
|
-
function
|
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, I == null ? void 0 : I.id, E, M, F, d, J]);
|
187
|
+
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
|
+
function Le() {
|
185
189
|
var s, u, p, $;
|
186
|
-
return B ?
|
190
|
+
return B ? g.isFetching ? !0 : a.text.length ? !Fe.includes((s = a.text) == null ? void 0 : s.toLowerCase()) : !(($ = (p = (u = g.data) == null ? void 0 : u.data) == null ? void 0 : p.quotes) != null && $.length) : !1;
|
187
191
|
}
|
188
192
|
return /* @__PURE__ */ N(
|
189
193
|
"button",
|
190
194
|
{
|
191
|
-
disabled:
|
192
|
-
style:
|
193
|
-
...
|
194
|
-
boxShadow:
|
195
|
+
disabled: Le(),
|
196
|
+
style: a != null && a.isGradient && O && R ? {
|
197
|
+
...h == null ? void 0 : h.gradientStyle,
|
198
|
+
boxShadow: h && h.customTheme && ((ce = (re = h.customTheme) == null ? void 0 : re.shadow) == null ? void 0 : ce.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
195
199
|
} : {
|
196
|
-
boxShadow:
|
200
|
+
boxShadow: h && h.customTheme && ((ie = (ne = h.customTheme) == null ? void 0 : ne.shadow) == null ? void 0 : ie.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
197
201
|
},
|
198
|
-
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${
|
202
|
+
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"}`,
|
199
203
|
onClick: () => {
|
200
|
-
B || (S(!0), ((e == null ? void 0 : e.networkType) !== "evm" &&
|
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" && Q && H) && !v ? T("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || V && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && Q && H || v ? T("to") : T("from")), e.chainId === "eclipse-svm" && !j(b) ? (S(!0), T("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(b) && d.length < 30 ? (S(!0), T("to")) : Ge();
|
201
205
|
},
|
202
|
-
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 ?
|
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 ${Ie} 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" }) }) }) })
|
203
207
|
}
|
204
208
|
);
|
205
209
|
}
|
@@ -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 { m 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-CxJ55_hm.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-CztKubZB.js";
|
3
|
+
import { m as Wn } from "./index-DRmMe_Lj.js";
|
4
4
|
const Sn = D`
|
5
5
|
:host {
|
6
6
|
position: relative;
|