@blockend/widget 1.0.54 → 1.0.55-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-CZLcXz0H.js → AllRoutes-DIde2MHr.js} +910 -929
- package/dist/{Box-DeJ0aAds.js → Box-DQB1ZyEK.js} +16 -16
- package/dist/EstGas-C7sLxEX_.js +1523 -0
- package/dist/{Grow-CAO6QGlH.js → Grow-CxaAxl6-.js} +300 -303
- package/dist/InputComp-CDuJJKaD.js +105 -0
- package/dist/LoadRoute-CVas28CM.js +123 -0
- package/dist/QuotesProgress-DaL4L4Db.js +27 -0
- package/dist/{SwapAsset-CkPNtJ5Z.js → SwapAsset-DSV6l90O.js} +13 -14
- package/dist/{Tooltip-Du4SfKmq.js → Tooltip-PAQ9gquY.js} +35 -35
- package/dist/TxnButton-BiO4vJ-y.js +207 -0
- package/dist/ccip-B6-4PQvj.js +226 -0
- package/dist/core-SB441dD5.js +13166 -0
- package/dist/{down-DbUDTC9S.js → down-DJH_apvy.js} +267 -270
- package/dist/{getChainIds-Dnj79lnq.js → getChainIds-CBclVfs9.js} +178 -180
- package/dist/getCosmosAddress-CI7CTn-0.js +57 -0
- package/dist/{hamburger-BtEtsv7a.js → hamburger-Dp-PI6Yn.js} +153 -153
- package/dist/{index-ZDMBVRLP.js → index-5WTwgH9q.js} +3 -3
- package/dist/index-B-FRPlBv.js +3240 -0
- package/dist/index-B158Vaz9.js +146 -0
- package/dist/{index-ZzUKHS4f.js → index-B9PIELoY.js} +5115 -5260
- package/dist/{index-B03PUlPY.js → index-BGt3GtoG.js} +1 -1
- package/dist/index-BuGCRLd5.js +198 -0
- package/dist/index-CRhXLwtt.js +7445 -0
- package/dist/{index-C4AhSjEZ.js → index-Dmf6i8k4.js} +3 -4
- package/dist/{index-BQ82b0Bz.js → index-PxQusjX0.js} +3368 -3415
- package/dist/index-UFdEurQ_.js +48579 -0
- package/dist/{index.es-eZ31W0zo.js → index.es-AaEds8Wm.js} +81 -83
- package/dist/index.es-Df0KTgu4.js +13127 -0
- package/dist/index.es.js +1 -1
- package/dist/{unsupportedProp-9RcsuuVU.js → unsupportedProp-BlS305Lt.js} +1 -1
- package/dist/{useRegisterError-lBlc4VLM.js → useRegisterError-BvjIv1Yc.js} +1668 -1701
- package/dist/widget.css +1 -1
- package/package.json +3 -2
- package/dist/EstGas-oDFlpjSW.js +0 -20281
- package/dist/InputComp-Dvng88xF.js +0 -105
- package/dist/LoadRoute-Cd75OEeT.js +0 -125
- package/dist/QuotesProgress-DLkS2eIB.js +0 -28
- package/dist/TxnButton-B1GkXFSh.js +0 -223
- package/dist/add-Dy-pn86L.js +0 -19
- package/dist/all-wallets-DA1Z5Cop.js +0 -10
- package/dist/app-store-x_6nCb7H.js +0 -21
- package/dist/apple-9Ay4GKtb.js +0 -22
- package/dist/arrow-bottom-18IDuPdg.js +0 -12
- package/dist/arrow-bottom-circle-C-WRrwmS.js +0 -15
- package/dist/arrow-left-DWFV43Cf.js +0 -12
- package/dist/arrow-right-CDRqwfO1.js +0 -12
- package/dist/arrow-top-DpR9F1Zo.js +0 -12
- package/dist/bank-Crxq2thP.js +0 -18
- package/dist/basic-PUh1GfJc.js +0 -5783
- package/dist/browser-Dfq6PNhC.js +0 -18
- package/dist/card-B9qMqocN.js +0 -18
- package/dist/ccip-Cf2jO5BW.js +0 -228
- package/dist/checkmark-BpwBRy8u.js +0 -15
- package/dist/checkmark-bold-CWJMusMr.js +0 -12
- package/dist/chevron-bottom-CEM1QdIG.js +0 -12
- package/dist/chevron-left-8vrWG4Fd.js +0 -12
- package/dist/chevron-right-DUaL3bYu.js +0 -12
- package/dist/chevron-top-4yRnski9.js +0 -12
- package/dist/chrome-store-BrR0Mo1P.js +0 -65
- package/dist/clock-CtzcJX1M.js +0 -12
- package/dist/close-B8P3E47p.js +0 -12
- package/dist/coinPlaceholder-DhDuAiLE.js +0 -12
- package/dist/compass-BPPWXJ9J.js +0 -12
- package/dist/copy-CoDhu1Ub.js +0 -19
- package/dist/core-sNzLDgNd.js +0 -14967
- package/dist/cursor-CtGaAByR.js +0 -7
- package/dist/cursor-transparent-DzDZGaUH.js +0 -16
- package/dist/desktop-Cj6KJIR5.js +0 -13
- package/dist/disconnect-0YabDe1z.js +0 -12
- package/dist/discord-BliaK0NG.js +0 -21
- package/dist/etherscan-Bu-d0d8T.js +0 -10
- package/dist/exclamation-triangle-CkhIEkFa.js +0 -8
- package/dist/extension-2PmFOLpz.js +0 -12
- package/dist/external-link-D5PBXR8n.js +0 -12
- package/dist/facebook-DvVHhnfi.js +0 -30
- package/dist/farcaster-DhlI9PJI.js +0 -16
- package/dist/filters-D4VXGXuc.js +0 -12
- package/dist/getCosmosAddress-D5-u0UJp.js +0 -9566
- package/dist/github-DZzzrfMb.js +0 -22
- package/dist/google-BJIEVX0w.js +0 -22
- package/dist/help-circle-BZN3LxgA.js +0 -16
- package/dist/id-qpbgew6W.js +0 -16
- package/dist/image-BaqsaTku.js +0 -8
- package/dist/index-Bk1RmZa6.js +0 -992
- package/dist/index-Bp8U0z_r.js +0 -206
- package/dist/index-DIhlHD0K.js +0 -1491
- package/dist/index-DKVwgDNZ.js +0 -29422
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/index-bGQWpwjq.js +0 -3190
- package/dist/index-xuyPmNnz.js +0 -160
- package/dist/index.es-CvlSpQGV.js +0 -11678
- package/dist/info-CT1yToBP.js +0 -7
- package/dist/info-circle-CMum6ujM.js +0 -16
- package/dist/lightbulb-e5tzYo3T.js +0 -7
- package/dist/mail-Cotk1RnP.js +0 -12
- package/dist/mobile-BQMdX8sa.js +0 -13
- package/dist/more-B7uYy_Eq.js +0 -15
- package/dist/network-placeholder-CIPNNK4H.js +0 -18
- package/dist/nftPlaceholder-D2GoBPY-.js +0 -12
- package/dist/off-BK14JFh_.js +0 -12
- package/dist/play-store-DwBENt3_.js +0 -36
- package/dist/plus-C0y88Ad4.js +0 -17
- package/dist/qr-code-CMdrrElE.js +0 -10
- package/dist/recycle-horizontal-BNN5ndLG.js +0 -13
- package/dist/refresh-ByH9t7MU.js +0 -12
- package/dist/reown-logo-cDM3ybDW.js +0 -16
- package/dist/search-vSwnIemK.js +0 -12
- package/dist/send-DxaTA9HH.js +0 -19
- package/dist/swapHorizontal-C3T9QpOz.js +0 -12
- package/dist/swapHorizontalBold-NoD7qi56.js +0 -12
- package/dist/swapHorizontalMedium-BdCnGCU3.js +0 -20
- package/dist/swapHorizontalRoundedBold-DOvYr1PV.js +0 -12
- package/dist/swapVertical-B_QsPb4Z.js +0 -12
- package/dist/telegram-Cgehpwsc.js +0 -20
- package/dist/three-dots-XdbxmzC6.js +0 -9
- package/dist/twitch-BGHF2xBF.js +0 -22
- package/dist/twitterIcon-DRtvBUSa.js +0 -10
- package/dist/verify-Cha1vhGY.js +0 -12
- package/dist/verify-filled-CpQ_9swy.js +0 -12
- package/dist/w3m-modal-BbwlJ8yr.js +0 -1471
- package/dist/wallet-DhTEGAG5.js +0 -12
- package/dist/wallet-placeholder-CBEwQiaT.js +0 -18
- package/dist/walletconnect-MNB_N68_.js +0 -36
- package/dist/warning-circle-CyvNTyr_.js +0 -16
- package/dist/x-CLNpY2cT.js +0 -16
@@ -1,105 +0,0 @@
|
|
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-DKVwgDNZ.js";
|
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-lBlc4VLM.js";
|
5
|
-
import { useAccount as T, useBalance as A } from "wagmi";
|
6
|
-
import "@dynamic-labs/sdk-react-core";
|
7
|
-
import { c as B, r as G } from "./index-DIhlHD0K.js";
|
8
|
-
function H({ amount: w, setAmount: l, fetchBalance: M, getCoinBalance: h, isBalanceLoading: f }) {
|
9
|
-
var d, o;
|
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;
|
11
|
-
A({
|
12
|
-
address: N,
|
13
|
-
token: B((e == null ? void 0 : e.address) || ""),
|
14
|
-
chainId: Number((r == null ? void 0 : r.chainId) || 0),
|
15
|
-
enabled: (r == null ? void 0 : r.networkType) == "evm"
|
16
|
-
});
|
17
|
-
const c = x(), i = h;
|
18
|
-
return /* @__PURE__ */ b("div", { className: " bw-mb-5 bw-mt-4", children: [
|
19
|
-
/* @__PURE__ */ b("p", { className: "bw-text-sm bw-text-left bw-font-medium bw-mb-1 bw-text-text-secondary", children: [
|
20
|
-
"Give ",
|
21
|
-
(e == null ? void 0 : e.name) || ""
|
22
|
-
] }),
|
23
|
-
/* @__PURE__ */ b(
|
24
|
-
"div",
|
25
|
-
{
|
26
|
-
style: {
|
27
|
-
boxShadow: s && s.customTheme && ((o = (d = s.customTheme) == null ? void 0 : d.shadow) == null ? void 0 : o.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
28
|
-
},
|
29
|
-
className: "bw-w-full bw-h-[80px] bw-flex bw-gap-x-1 bw-items-center bw-px-2 bw-bg-background-container bw-rounded-md bw-border bw-border-border-primary",
|
30
|
-
children: [
|
31
|
-
/* @__PURE__ */ b("div", { className: "bw-w-full bw-flex bw-gap-x-2 bw-mt-5 bw-items-start bw-h-full", children: [
|
32
|
-
/* @__PURE__ */ t("div", { className: " bw-flex bw-items-center", children: e != null && e.image ? /* @__PURE__ */ t("div", { className: "bw-rounded-[50%] bw-bg-background-secondary bw-min-w-[40px] bw-w-[40px] bw-min-h-[40px] bw-flex bw-justify-center bw-items-center bw-border bw-border-border-primary", children: /* @__PURE__ */ t("img", { src: e == null ? void 0 : e.image, width: 39, height: 39, alt: "img", className: "bw-rounded-[50%] bw-max-w-[39px] bw-max-h-[39px] bw-object-contain bw-min-w-[39px] bw-min-h-[39px]" }) }) : /* @__PURE__ */ t("div", { className: "bw-min-w-[40px] bw-w-[40px] bw-border bw-border-border-primary bw-min-h-[40px] bw-rounded-[50%] ", children: /* @__PURE__ */ t("img", { src: y, width: 39, height: 39, alt: "img", className: "bw-rounded-[50%] bw-min-w-[38px] bw-min-h-[39px]" }) }) }),
|
33
|
-
/* @__PURE__ */ b("div", { className: "bw-w-full", children: [
|
34
|
-
/* @__PURE__ */ t(
|
35
|
-
"div",
|
36
|
-
{
|
37
|
-
onClick: () => {
|
38
|
-
c.current.focus();
|
39
|
-
},
|
40
|
-
className: " ",
|
41
|
-
children: /* @__PURE__ */ b("div", { className: "bw-text-left", children: [
|
42
|
-
/* @__PURE__ */ b("span", { className: "bw-invisible bw-absolute", ref: v, children: [
|
43
|
-
w,
|
44
|
-
"0"
|
45
|
-
] }),
|
46
|
-
/* @__PURE__ */ t(
|
47
|
-
"input",
|
48
|
-
{
|
49
|
-
ref: c,
|
50
|
-
pattern: "[0-9]*",
|
51
|
-
inputMode: "decimal",
|
52
|
-
autoFocus: !0,
|
53
|
-
onWheel: (a) => a.target.blur(),
|
54
|
-
type: "number",
|
55
|
-
value: w,
|
56
|
-
onChange: (a) => {
|
57
|
-
let m = a.target.value;
|
58
|
-
m.length <= 11 && l(m);
|
59
|
-
},
|
60
|
-
onKeyDown: (a) => {
|
61
|
-
G(a);
|
62
|
-
},
|
63
|
-
placeholder: "0.0",
|
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
|
-
}
|
66
|
-
)
|
67
|
-
] })
|
68
|
-
}
|
69
|
-
),
|
70
|
-
/* @__PURE__ */ t("div", { children: e.coin.length && g ? f ? /* @__PURE__ */ t(W, { className: "bw-bg-background-secondary bw-rounded-md bw-h-[18px] bw-w-[100px]" }) : /* @__PURE__ */ b("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
71
|
-
/* @__PURE__ */ t(D, { fill: "var(--tw-text-secondary)" }),
|
72
|
-
/* @__PURE__ */ t("p", { className: "bw-text-xs bw-font-medium bw-text-text-secondary", children: /* @__PURE__ */ t(
|
73
|
-
F,
|
74
|
-
{
|
75
|
-
value: p(i),
|
76
|
-
options: {
|
77
|
-
maxDecimals: 10
|
78
|
-
}
|
79
|
-
}
|
80
|
-
) }),
|
81
|
-
/* @__PURE__ */ t(
|
82
|
-
"button",
|
83
|
-
{
|
84
|
-
className: "bw-text-xs bw-font-normal bw-min-w-[37px] bw-h-[18px] bw-rounded-[4px] bw-px-1 bw-border bw-border-border-primary bw-text-text-secondary",
|
85
|
-
onClick: () => {
|
86
|
-
l(u(p(i), 10));
|
87
|
-
},
|
88
|
-
children: "MAX"
|
89
|
-
}
|
90
|
-
)
|
91
|
-
] }) : /* @__PURE__ */ t(k, {}) })
|
92
|
-
] })
|
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-xs md:bw-text-sm" : "bw-text-text-placeholder bw-text-[10px]"}`, children: [
|
95
|
-
"$",
|
96
|
-
u(R(w * (e == null ? void 0 : e.lastPrice)), 10)
|
97
|
-
] }) }) })
|
98
|
-
]
|
99
|
-
}
|
100
|
-
)
|
101
|
-
] });
|
102
|
-
}
|
103
|
-
export {
|
104
|
-
H as default
|
105
|
-
};
|
@@ -1,125 +0,0 @@
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as m } from "react/jsx-runtime";
|
2
|
-
import { t as te } from "./truncate-D9t92mVX.js";
|
3
|
-
import { u as r, S as o, l as we } from "./index-DKVwgDNZ.js";
|
4
|
-
import { useState as ie, useEffect as le } from "react";
|
5
|
-
import { s as a } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
-
import { G as ce, C as de, S as me } from "./clockIcon-C2W5xvyt.js";
|
7
|
-
import { S as re } from "./down-DbUDTC9S.js";
|
8
|
-
import { e as se } from "./ethertousd-CC_ezooz.js";
|
9
|
-
import { O as H } from "./index-C4AhSjEZ.js";
|
10
|
-
import { F as J, i as ae } from "./useRegisterError-lBlc4VLM.js";
|
11
|
-
function oe({ fill: n }) {
|
12
|
-
return /* @__PURE__ */ e(
|
13
|
-
"svg",
|
14
|
-
{
|
15
|
-
width: "14",
|
16
|
-
height: "13",
|
17
|
-
viewBox: "0 0 14 13",
|
18
|
-
fill: "none",
|
19
|
-
xmlns: "http://www.w3.org/2000/svg",
|
20
|
-
children: /* @__PURE__ */ e(
|
21
|
-
"path",
|
22
|
-
{
|
23
|
-
d: "M8.96762 0.608257C9.75204 0.81844 10.4162 1.32448 10.8223 2.02798C11.1795 2.64657 11.3164 3.35994 11.2014 4.05707C11.8556 4.29389 12.405 4.76918 12.7621 5.38777L12.7691 5.3999C13.1753 6.10339 13.2814 6.93156 13.0713 7.71597C12.8611 8.50039 12.355 9.16451 11.6515 9.57067L6.18127 12.7289C5.64759 13.0371 4.95884 12.8525 4.65071 12.3188C4.34259 11.7851 4.52714 11.0964 5.06083 10.7883L10.5311 7.63C10.9192 7.40591 11.0525 6.90848 10.8284 6.52034L10.8214 6.50821C10.5973 6.12008 10.0999 5.98679 9.71177 6.21088L4.2415 9.36915C3.70781 9.67727 3.01906 9.49272 2.71094 8.95903C2.39581 8.41322 2.58736 7.7366 3.12105 7.42847L8.59132 4.27021C8.97946 4.04612 9.11274 3.54869 8.88165 3.14842C8.65756 2.76029 8.16013 2.627 7.77199 2.85109L2.30172 6.00936C1.76804 6.31748 1.08629 6.14506 0.771161 5.59924C0.463038 5.06556 0.647589 4.37681 1.18127 4.06868L6.65155 0.910419C7.35504 0.504257 8.18321 0.398074 8.96762 0.608257Z",
|
24
|
-
fill: n,
|
25
|
-
"fill-opacity": "1"
|
26
|
-
}
|
27
|
-
)
|
28
|
-
}
|
29
|
-
);
|
30
|
-
}
|
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
|
-
le(() => {
|
35
|
-
var i;
|
36
|
-
if (b) {
|
37
|
-
let f = { amountInUSD: 0, amountInNative: 0 }, Z = {};
|
38
|
-
(i = b == null ? void 0 : b.fee) == null || i.forEach((s) => {
|
39
|
-
s.source == "FROM_SOURCE_WALLET" && (f.amountInUSD += Number(s.amountInUSD), f.amountInNative += Number(se(s.amountInToken, s.token.decimals)), Z = { ...s });
|
40
|
-
}), Y({ tempGasObj: f, token: Z });
|
41
|
-
}
|
42
|
-
}, [b]);
|
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
|
-
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-justify-between", children: [
|
46
|
-
" ",
|
47
|
-
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: [
|
48
|
-
"Get ",
|
49
|
-
d.name
|
50
|
-
] }),
|
51
|
-
n.isFetching ? /* @__PURE__ */ e(m, {}) : /* @__PURE__ */ e("div", { onClick: K, style: { ...w.gradientStyle }, className: `bw-w-[130px] bw-cursor-pointer bw-relative bw-p-[1px] bw-text-transparent bw-text-sm bw-font-normal bw-h-[18px] bw-rounded-xl ${l || `${a.overlayshow} ${(I = w.gradientStyle) != null && I.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"}`}`, children: /* @__PURE__ */ e("div", { className: " bw-w-full bw-h-full bw-text-text-secondary bw-relative bw-z-10 bw-bg-background-container bw-flex bw-justify-center bw-items-center bw-text-xs bw-font-normal bw-rounded-xl", children: "Show All Routes" }) })
|
52
|
-
] }),
|
53
|
-
/* @__PURE__ */ t("div", { className: " bw-mt-2", children: [
|
54
|
-
/* @__PURE__ */ t("div", { style: n.isFetching ? {} : { ...w.gradientStyle }, className: ` ${n.isFetching ? "bw-bg-background-secondary" : ` ${l || `${(L = w.gradientStyle) != null && L.background ? "" : "bw-bg-gradient-to-r bw-from-[#A45EFF] bw-to-[#2CFFE4]"} ${a.overlay}`} `} bw-relative bw-flex bw-justify-center bw-rounded-[8px] bw-w-full bw-p-[1px] bw-h-[86px] `, children: [
|
55
|
-
/* @__PURE__ */ t("div", { className: "bw-w-full bw-h-full bw-flex bw-px-2 bw-pb-3 bw-items-center bw-justify-between bw-bg-background-container rbw-elative bw-z-10 bw-rounded-[8px]", children: [
|
56
|
-
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-start bw-gap-x-2", children: [
|
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
|
-
/* @__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-2xl md:bw-text-3xl bw-mb-1 bw-font-medium bw-text-text-primary", children: /* @__PURE__ */ e(H, { value: ee, decimal: 12 }) }),
|
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
|
-
/* @__PURE__ */ e(ce, { fill: "var(--tw-text-primary)" }),
|
62
|
-
/* @__PURE__ */ t("p", { className: "bw-text-xs md:bw-text-sm bw-font-medium bw-text-text-primary", children: [
|
63
|
-
"Total Fee:",
|
64
|
-
" $",
|
65
|
-
/* @__PURE__ */ e(J, { value: ((U = c == null ? void 0 : c.tempGasObj) == null ? void 0 : U.amountInUSD) || 0, options: { maxDecimals: 8 } }),
|
66
|
-
" (",
|
67
|
-
/* @__PURE__ */ e(J, { value: ((A = c == null ? void 0 : c.tempGasObj) == null ? void 0 : A.amountInNative) || 0, options: { maxDecimals: 8 } }),
|
68
|
-
` ${((O = (G = c == null ? void 0 : c.token) == null ? void 0 : G.token) == null ? void 0 : O.symbol) || ""})`
|
69
|
-
] })
|
70
|
-
] })
|
71
|
-
] })
|
72
|
-
] }),
|
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-xs md:bw-text-sm", children: [
|
75
|
-
"$",
|
76
|
-
/* @__PURE__ */ e(H, { value: be, decimal: 10 })
|
77
|
-
] }),
|
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
|
-
] })
|
80
|
-
] }),
|
81
|
-
n.isFetching ? /* @__PURE__ */ e("div", { className: "bw-absolute bw-w-[40px] bw-h-[40px] bw-bottom-[-35%] bw-z-20 ", children: /* @__PURE__ */ e(re, {}) }) : /* @__PURE__ */ e(m, {}),
|
82
|
-
/* @__PURE__ */ t("div", { className: "bw-h-[18px] bw-w-max bw-z-10 bw-min-w-[200px] bw-bg-background-container bw-flex bw-items-center bw-absolute bw-bottom-[-10%]", children: [
|
83
|
-
!n.isFetching && !we.isEmpty(b) ? /* @__PURE__ */ t("div", { className: "bw-flex bw-w-full bw-px-6 bw-items-center bw-gap-x-1", children: [
|
84
|
-
" ",
|
85
|
-
/* @__PURE__ */ t("p", { className: "bw-text-sm bw-w-full bw-text-center bw-flex bw-justify-center bw-items-center bw-font-normal bw-my-1 bw-text-text-secondary", children: [
|
86
|
-
/* @__PURE__ */ e("span", { className: "bw-text-sm bw-font-light", children: "via" }),
|
87
|
-
" ",
|
88
|
-
/* @__PURE__ */ e("img", { src: ne, className: "bw-rounded-[50%] bw-mx-[4px] bw-min-w-[18px] bw-max-h-[18px] bw-min-h-[18px]", width: 18, height: 18 }),
|
89
|
-
((_ = b == null ? void 0 : b.providerDetails) == null ? void 0 : _.name) || "",
|
90
|
-
": ",
|
91
|
-
b == null ? void 0 : b.protocolsUsed[0],
|
92
|
-
((B = b == null ? void 0 : b.protocolsUsed) == null ? void 0 : B.length) <= 1 ? "" : /* @__PURE__ */ t("span", { className: "bw-ml-1 bw-text-xs bw-font-normal", children: [
|
93
|
-
`+${((V = b == null ? void 0 : b.protocolsUsed) == null ? void 0 : V.length) - 1}`,
|
94
|
-
" More"
|
95
|
-
] }),
|
96
|
-
" "
|
97
|
-
] }),
|
98
|
-
" "
|
99
|
-
] }) : /* @__PURE__ */ e(m, {}),
|
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} ${(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
|
-
] })
|
103
|
-
] }),
|
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
|
-
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
106
|
-
/* @__PURE__ */ e(oe, { fill: "var(--tw-text-secondary)" }),
|
107
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "Fee" }),
|
108
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-line-through bw-font-medium bw-text-text-secondary", children: "0.1%" }),
|
109
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: "0" })
|
110
|
-
] }),
|
111
|
-
/* @__PURE__ */ t("div", { className: "bw-flex bw-items-center bw-gap-x-1", children: [
|
112
|
-
/* @__PURE__ */ e(de, { fill: "var(--tw-text-secondary)" }),
|
113
|
-
/* @__PURE__ */ e("p", { className: "bw-text-sm bw-font-medium bw-text-text-secondary", children: (b == null ? void 0 : b.estimatedTimeInSeconds) >= 90 ? `${Math.round(te(((b == null ? void 0 : b.estimatedTimeInSeconds) || 60) / 60, 2) || 0)}min` : `${(b == null ? void 0 : b.estimatedTimeInSeconds) || 60} secs` })
|
114
|
-
] }),
|
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
|
-
/* @__PURE__ */ e(me, { fill: "var(--tw-text-secondary)" }),
|
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
|
-
] })
|
119
|
-
] }) })
|
120
|
-
] })
|
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
|
-
}
|
123
|
-
export {
|
124
|
-
ue as default
|
125
|
-
};
|
@@ -1,28 +0,0 @@
|
|
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-DKVwgDNZ.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,223 +0,0 @@
|
|
1
|
-
import { jsx as G } from "react/jsx-runtime";
|
2
|
-
import { useState as v, useEffect as z } from "react";
|
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-DKVwgDNZ.js";
|
5
|
-
import { s as S } from "./WidgetForm.module-QHJ0-m5f.js";
|
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-lBlc4VLM.js";
|
8
|
-
import "./getCosmosAddress-D5-u0UJp.js";
|
9
|
-
import { v as Je } from "./validError-CDlJpg_f.js";
|
10
|
-
import { u as Ke, g as Ue, p as Xe } from "./index-DIhlHD0K.js";
|
11
|
-
function Ye(n) {
|
12
|
-
const { wallet: u, address: l } = _(), [f, N] = v(0);
|
13
|
-
async function x() {
|
14
|
-
const F = await window.tronWeb.trx.getBalance(l);
|
15
|
-
N(F / Math.pow(10, 6));
|
16
|
-
}
|
17
|
-
return z(() => {
|
18
|
-
l && (n == null ? void 0 : n.networkType) === "tron" && x();
|
19
|
-
}, [l, n == null ? void 0 : n.networkType]), { tronBal: f };
|
20
|
-
}
|
21
|
-
function A(n) {
|
22
|
-
if (n.key.toLowerCase() === "backpacksol")
|
23
|
-
return !0;
|
24
|
-
}
|
25
|
-
function Ze() {
|
26
|
-
const [n, u] = v(0), l = h((x) => x.fromChain), { primaryWallet: f } = xe();
|
27
|
-
async function N() {
|
28
|
-
let x = await f.getBalance();
|
29
|
-
u(Number(x) || 0);
|
30
|
-
}
|
31
|
-
return z(() => {
|
32
|
-
(l.networkType === "btc" || l.networkType === "sui") && N();
|
33
|
-
}, [l.networkType, f]), n;
|
34
|
-
}
|
35
|
-
function ot({ routesData: n, routes: u, amount: l, isAmountTyped: f, handleShowWallet: N, setConnectWalletField: x, handleConfirmClose: F, balanceSol: L, getCoinBalance: Te, handleSuccess: Q }) {
|
36
|
-
var C, ee, te, se, re, ce, ne, ie, de, ae, le, oe, we;
|
37
|
-
const w = h((s) => s.gradient), m = 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: I } = Ve(), { address: J, isConnected: We } = _(), me = qe(), Ie = Me(), { getBothWalletConnection: he, getConnectWallet: fe } = ge({
|
38
|
-
chainData: e
|
39
|
-
}), { connected: K, address: U, disconnect: De } = _(), M = h((s) => s.toDisconnect), d = h((s) => s.customWallet), { getWallet: Ne } = ge({ chainData: e }), Be = fe(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({
|
40
|
-
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
41
|
-
config: me,
|
42
|
-
throwForSwitchChainNotSupported: !0,
|
43
|
-
onError(s) {
|
44
|
-
Je(s.message) && Se({ module: "wallet-error-switch", error: s.message });
|
45
|
-
}
|
46
|
-
}), T = _e({
|
47
|
-
address: H,
|
48
|
-
token: "",
|
49
|
-
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
50
|
-
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
51
|
-
}), W = He(Te || 0, 11), [o, a] = v({
|
52
|
-
text: "",
|
53
|
-
isGradient: !1,
|
54
|
-
color: "bw-bg-border-primary"
|
55
|
-
});
|
56
|
-
async function Fe() {
|
57
|
-
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.id))
|
58
|
-
try {
|
59
|
-
await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
60
|
-
} catch {
|
61
|
-
}
|
62
|
-
else if ((e == null ? void 0 : e.networkType) === "sol" && O !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
63
|
-
try {
|
64
|
-
let s = await Ie({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
65
|
-
D();
|
66
|
-
} catch {
|
67
|
-
}
|
68
|
-
else (e == null ? void 0 : e.networkType) === "sui" ? (Z.emit(pe.TransactionStarted, {
|
69
|
-
...n
|
70
|
-
}), B && (Q(!1), F())) : (Z.emit(pe.TransactionStarted, {
|
71
|
-
...n
|
72
|
-
}), B && (Q(!1), F()));
|
73
|
-
}
|
74
|
-
const { primaryWallet: p } = xe(), P = Oe(), B = (e == null ? void 0 : e.networkType) === r.networkType ? !!((ce = (re = Ne(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 () => {
|
75
|
-
if (p)
|
76
|
-
try {
|
77
|
-
const s = await p.getNetwork();
|
78
|
-
Ge(s);
|
79
|
-
} catch {
|
80
|
-
}
|
81
|
-
else
|
82
|
-
return;
|
83
|
-
};
|
84
|
-
z(() => {
|
85
|
-
D();
|
86
|
-
}, [p]);
|
87
|
-
function k(s, g) {
|
88
|
-
let y = s / Math.pow(10, g);
|
89
|
-
return y < 1e-6 ? y.toFixed(20) : y;
|
90
|
-
}
|
91
|
-
function Le() {
|
92
|
-
var s;
|
93
|
-
return Number(((s = T == null ? void 0 : T.data) == null ? void 0 : s.formatted) || 0);
|
94
|
-
}
|
95
|
-
function je(s) {
|
96
|
-
var g;
|
97
|
-
return Number(((g = X[Xe(s.address)]) == null ? void 0 : g.amount) || 0) / Math.pow(10, s.decimals);
|
98
|
-
}
|
99
|
-
function Ae() {
|
100
|
-
var E;
|
101
|
-
let s = {};
|
102
|
-
async function g(t, c) {
|
103
|
-
let $ = Object.keys(s);
|
104
|
-
s[t == null ? void 0 : t.chainId] ? (s[t == null ? void 0 : t.chainId].amountInToken += c.amountInToken, s[t == null ? void 0 : t.chainId].gas += k(c.amountInToken, t == null ? void 0 : t.decimals)) : s[t == null ? void 0 : t.chainId] = {
|
105
|
-
amountInToken: c.amountInToken,
|
106
|
-
gas: k(c.amountInToken, t == null ? void 0 : t.decimals),
|
107
|
-
token: t,
|
108
|
-
nativeBal: (d == null ? void 0 : d.length) > 30 && !M && (t == null ? void 0 : t.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (t == null ? void 0 : t.networkType) == "sol" ? L : (t == null ? void 0 : t.networkType) == "tron" ? R : (t == null ? void 0 : t.networkType) == "btc" || (t == null ? void 0 : t.networkType) == "sui" ? Y : (t == null ? void 0 : t.networkType) == "cosmos" ? je(t) : (t == null ? void 0 : t.networkType) == "tron" ? Ue(J) : Le(),
|
109
|
-
isFromChain: (e == null ? void 0 : e.chainId) === (t == null ? void 0 : t.chainId.toString()),
|
110
|
-
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 : $.length > 2 ? 3 : 2
|
111
|
-
};
|
112
|
-
}
|
113
|
-
(E = n == null ? void 0 : n.fee) == null || E.forEach((t) => {
|
114
|
-
const { token: c } = t;
|
115
|
-
t.source.toLowerCase() == "from_source_wallet" && g(c, t);
|
116
|
-
});
|
117
|
-
let y = W;
|
118
|
-
if (Number(l) > Number(y))
|
119
|
-
a({
|
120
|
-
text: `Insufficient Balance ${i.coin || ""}`,
|
121
|
-
isGradient: !1,
|
122
|
-
color: "bw-bg-border-primary"
|
123
|
-
});
|
124
|
-
else if ((T != null && T.isLoading || T.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof L > "u" || L === null) && (e == null ? void 0 : e.networkType) === "sol" || !R && (e == null ? void 0 : e.networkType) === "tron")
|
125
|
-
a({
|
126
|
-
text: "Fetching Balance..",
|
127
|
-
isGradient: !1,
|
128
|
-
color: "bw-bg-border-primary"
|
129
|
-
});
|
130
|
-
else {
|
131
|
-
let t = Object.values(s).sort((c, $) => c.order - $.order);
|
132
|
-
t.some((c) => {
|
133
|
-
var $, be, ue;
|
134
|
-
return c != null && c.isFromChain && Number(l) <= Number(y) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(y) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
|
135
|
-
text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
|
136
|
-
isGradient: !1,
|
137
|
-
color: "bw-bg-border-primary"
|
138
|
-
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
|
139
|
-
text: `Insufficient ${((ue = c == null ? void 0 : c.token) == null ? void 0 : ue.symbol) || ""} for gas on ${c.token.blockchain}`,
|
140
|
-
isGradient: !1,
|
141
|
-
color: "bw-bg-border-primary"
|
142
|
-
}), !0) : (a({
|
143
|
-
text: "",
|
144
|
-
isGradient: !0,
|
145
|
-
color: w || S.gradientbutton
|
146
|
-
}), !0);
|
147
|
-
}), t.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
148
|
-
text: "",
|
149
|
-
isGradient: !0,
|
150
|
-
color: w || S.gradientbutton
|
151
|
-
});
|
152
|
-
}
|
153
|
-
}
|
154
|
-
z(() => {
|
155
|
-
var s, g, y;
|
156
|
-
!i.coin.length || !(b != null && b.coin.length) ? a({
|
157
|
-
text: "Select Token",
|
158
|
-
isGradient: !0,
|
159
|
-
color: w || S.gradientbutton
|
160
|
-
}) : B ? typeof l < "u" && Number(l || 0) <= 0 ? a({
|
161
|
-
text: "Enter Amount",
|
162
|
-
isGradient: !1,
|
163
|
-
color: "bw-bg-border-primary"
|
164
|
-
}) : u.isFetching || !f ? a({
|
165
|
-
text: "Loading Routes...",
|
166
|
-
isGradient: !1,
|
167
|
-
color: "bw-bg-border-primary"
|
168
|
-
}) : e.chainId === "eclipse-svm" && !A(p) ? a({
|
169
|
-
text: `Select ${e.name} wallet`,
|
170
|
-
isGradient: !0,
|
171
|
-
color: w || S.gradientbutton
|
172
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? a({
|
173
|
-
text: "Enter recipient wallet address",
|
174
|
-
isGradient: !0,
|
175
|
-
color: w || S.gradientbutton
|
176
|
-
}) : (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.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (b == null ? void 0 : b.address) ? a({
|
177
|
-
text: "From and To asset can not be the same!",
|
178
|
-
isGradient: !1,
|
179
|
-
color: "bw-bg-border-primary"
|
180
|
-
}) : (y = (g = (s = u == null ? void 0 : u.data) == null ? void 0 : s.data) == null ? void 0 : g.quotes) != null && y.length ? u != null && u.error ? a({
|
181
|
-
text: "Failed to fetch Quotes",
|
182
|
-
isGradient: !1,
|
183
|
-
color: "bw-bg-border-primary"
|
184
|
-
}) : j && Number((e == null ? void 0 : e.chainId) || "0") !== (I == null ? void 0 : I.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({
|
185
|
-
text: `Switch Chain to ${e.chain}`,
|
186
|
-
isGradient: !0,
|
187
|
-
color: w || S.gradientbutton
|
188
|
-
}) : Ae() : a({
|
189
|
-
text: "No Routes Found",
|
190
|
-
isGradient: !1,
|
191
|
-
color: "bw-bg-border-primary"
|
192
|
-
}) : a({
|
193
|
-
text: "",
|
194
|
-
isGradient: !0,
|
195
|
-
color: w || S.gradientbutton
|
196
|
-
});
|
197
|
-
}, [O, p, i, b, l, e, r, (ne = T.data) == null ? void 0 : ne.formatted, n, T.isFetching, T.isLoading, j, W, B, u.isFetching, I == null ? void 0 : I.id, f, R, L, d, Y, X, J]);
|
198
|
-
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"];
|
199
|
-
function ze() {
|
200
|
-
var s, g, y, E;
|
201
|
-
return B ? 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;
|
202
|
-
}
|
203
|
-
return /* @__PURE__ */ G(
|
204
|
-
"button",
|
205
|
-
{
|
206
|
-
disabled: ze(),
|
207
|
-
style: o != null && o.isGradient && V && q ? {
|
208
|
-
...m == null ? void 0 : m.gradientStyle,
|
209
|
-
boxShadow: m && m.customTheme && ((le = (ae = m.customTheme) == null ? void 0 : ae.shadow) == null ? void 0 : le.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
210
|
-
} : {
|
211
|
-
boxShadow: m && m.customTheme && ((we = (oe = m.customTheme) == null ? void 0 : oe.shadow) == null ? void 0 : we.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
212
|
-
},
|
213
|
-
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"}`,
|
214
|
-
onClick: () => {
|
215
|
-
B || (N(!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) ? (N(!0), x("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !A(p) && d.length < 30 ? (N(!0), x("to")) : Fe();
|
216
|
-
},
|
217
|
-
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" }) }) : B ? o.text.length ? o.text : "Start Transaction" : `Connect ${Be} 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" }) }) }) })
|
218
|
-
}
|
219
|
-
);
|
220
|
-
}
|
221
|
-
export {
|
222
|
-
ot as default
|
223
|
-
};
|
package/dist/add-Dy-pn86L.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { m as l } from "./core-sNzLDgNd.js";
|
2
|
-
const o = l`<svg
|
3
|
-
width="14"
|
4
|
-
height="14"
|
5
|
-
viewBox="0 0 14 14"
|
6
|
-
fill="none"
|
7
|
-
xmlns="http://www.w3.org/2000/svg"
|
8
|
-
>
|
9
|
-
<path
|
10
|
-
fill="currentColor"
|
11
|
-
fill-rule="evenodd"
|
12
|
-
clip-rule="evenodd"
|
13
|
-
d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
|
14
|
-
fill="#667dff"
|
15
|
-
/></svg
|
16
|
-
>`;
|
17
|
-
export {
|
18
|
-
o as addSvg
|
19
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { m as a } from "./core-sNzLDgNd.js";
|
2
|
-
const o = a`<svg fill="none" viewBox="0 0 24 24">
|
3
|
-
<path
|
4
|
-
style="fill: var(--wui-color-accent-100);"
|
5
|
-
d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
|
6
|
-
/>
|
7
|
-
</svg>`;
|
8
|
-
export {
|
9
|
-
o as allWalletsSvg
|
10
|
-
};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { m as a } from "./core-sNzLDgNd.js";
|
2
|
-
const e = a`
|
3
|
-
<svg width="36" height="36">
|
4
|
-
<path
|
5
|
-
d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
|
6
|
-
fill="url(#a)"
|
7
|
-
/>
|
8
|
-
<path
|
9
|
-
d="m17.845 8.271.729-1.26a1.64 1.64 0 1 1 2.843 1.638l-7.023 12.159h5.08c1.646 0 2.569 1.935 1.853 3.276H6.434a1.632 1.632 0 0 1-1.638-1.638c0-.909.73-1.638 1.638-1.638h4.176l5.345-9.265-1.67-2.898a1.642 1.642 0 0 1 2.844-1.638l.716 1.264Zm-6.317 17.5-1.575 2.732a1.64 1.64 0 1 1-2.844-1.638l1.17-2.025c1.323-.41 2.398-.095 3.249.931Zm13.56-4.954h4.262c.909 0 1.638.729 1.638 1.638 0 .909-.73 1.638-1.638 1.638h-2.367l1.597 2.772c.45.788.185 1.782-.602 2.241a1.642 1.642 0 0 1-2.241-.603c-2.69-4.666-4.711-8.159-6.052-10.485-1.372-2.367-.391-4.743.576-5.549 1.075 1.846 2.682 4.631 4.828 8.348Z"
|
10
|
-
fill="#fff"
|
11
|
-
/>
|
12
|
-
<defs>
|
13
|
-
<linearGradient id="a" x1="18" y1="0" x2="18" y2="36" gradientUnits="userSpaceOnUse">
|
14
|
-
<stop stop-color="#18BFFB" />
|
15
|
-
<stop offset="1" stop-color="#2072F3" />
|
16
|
-
</linearGradient>
|
17
|
-
</defs>
|
18
|
-
</svg>`;
|
19
|
-
export {
|
20
|
-
e as appStoreSvg
|
21
|
-
};
|
package/dist/apple-9Ay4GKtb.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { m as l } from "./core-sNzLDgNd.js";
|
2
|
-
const f = l`<svg fill="none" viewBox="0 0 40 40">
|
3
|
-
<g clip-path="url(#a)">
|
4
|
-
<g clip-path="url(#b)">
|
5
|
-
<circle cx="20" cy="19.89" r="20" fill="#000" />
|
6
|
-
<g clip-path="url(#c)">
|
7
|
-
<path
|
8
|
-
fill="#fff"
|
9
|
-
d="M28.77 23.3c-.69 1.99-2.75 5.52-4.87 5.56-1.4.03-1.86-.84-3.46-.84-1.61 0-2.12.81-3.45.86-2.25.1-5.72-5.1-5.72-9.62 0-4.15 2.9-6.2 5.42-6.25 1.36-.02 2.64.92 3.47.92.83 0 2.38-1.13 4.02-.97.68.03 2.6.28 3.84 2.08-3.27 2.14-2.76 6.61.75 8.25ZM24.2 7.88c-2.47.1-4.49 2.69-4.2 4.84 2.28.17 4.47-2.39 4.2-4.84Z"
|
10
|
-
/>
|
11
|
-
</g>
|
12
|
-
</g>
|
13
|
-
</g>
|
14
|
-
<defs>
|
15
|
-
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
16
|
-
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
17
|
-
<clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
|
18
|
-
</defs>
|
19
|
-
</svg>`;
|
20
|
-
export {
|
21
|
-
f as appleSvg
|
22
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { m as o } from "./core-sNzLDgNd.js";
|
2
|
-
const e = o`<svg fill="none" viewBox="0 0 14 15">
|
3
|
-
<path
|
4
|
-
fill="currentColor"
|
5
|
-
fill-rule="evenodd"
|
6
|
-
d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
|
7
|
-
clip-rule="evenodd"
|
8
|
-
/>
|
9
|
-
</svg>`;
|
10
|
-
export {
|
11
|
-
e as arrowBottomSvg
|
12
|
-
};
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { m as C } from "./core-sNzLDgNd.js";
|
2
|
-
const e = C`<svg
|
3
|
-
fill="none"
|
4
|
-
viewBox="0 0 21 20"
|
5
|
-
>
|
6
|
-
<path
|
7
|
-
fill="currentColor"
|
8
|
-
fill-rule="evenodd"
|
9
|
-
d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
|
10
|
-
clip-rule="evenodd"
|
11
|
-
/></svg
|
12
|
-
>`;
|
13
|
-
export {
|
14
|
-
e as arrowBottomCircleSvg
|
15
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { m as e } from "./core-sNzLDgNd.js";
|
2
|
-
const o = e`<svg fill="none" viewBox="0 0 14 15">
|
3
|
-
<path
|
4
|
-
fill="currentColor"
|
5
|
-
fill-rule="evenodd"
|
6
|
-
d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
|
7
|
-
clip-rule="evenodd"
|
8
|
-
/>
|
9
|
-
</svg>`;
|
10
|
-
export {
|
11
|
-
o as arrowLeftSvg
|
12
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { m as l } from "./core-sNzLDgNd.js";
|
2
|
-
const e = l`<svg fill="none" viewBox="0 0 14 15">
|
3
|
-
<path
|
4
|
-
fill="currentColor"
|
5
|
-
fill-rule="evenodd"
|
6
|
-
d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
|
7
|
-
clip-rule="evenodd"
|
8
|
-
/>
|
9
|
-
</svg>`;
|
10
|
-
export {
|
11
|
-
e as arrowRightSvg
|
12
|
-
};
|