@blockend/widget 1.0.55-beta.1 → 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-D6S-NFxZ.js → AllRoutes-DIde2MHr.js} +910 -929
- package/dist/{Box-DESo1bHm.js → Box-DQB1ZyEK.js} +15 -15
- package/dist/EstGas-C7sLxEX_.js +1523 -0
- package/dist/{Grow-DzEr7XrA.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-MBXcdeBf.js → SwapAsset-DSV6l90O.js} +13 -14
- package/dist/{Tooltip-DSAJT2x7.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-BFx-Bg5Q.js → down-DJH_apvy.js} +267 -270
- package/dist/{getChainIds-CeLEUxe0.js → getChainIds-CBclVfs9.js} +221 -223
- package/dist/getCosmosAddress-CI7CTn-0.js +57 -0
- package/dist/{hamburger-BzMrQx9y.js → hamburger-Dp-PI6Yn.js} +153 -153
- package/dist/{index-DpHhW0_2.js → index-5WTwgH9q.js} +3 -3
- package/dist/index-B-FRPlBv.js +3240 -0
- package/dist/index-B158Vaz9.js +146 -0
- package/dist/{index-BK0BZT6j.js → index-B9PIELoY.js} +5118 -5241
- package/dist/{index-DHYWnqST.js → index-BGt3GtoG.js} +1 -1
- package/dist/index-BuGCRLd5.js +198 -0
- package/dist/index-CRhXLwtt.js +7445 -0
- package/dist/{index-A8ClQmZo.js → index-Dmf6i8k4.js} +3 -4
- package/dist/{index-SkYFFVLL.js → index-PxQusjX0.js} +3368 -3415
- package/dist/{index-C5bv1F_u.js → index-UFdEurQ_.js} +12086 -12350
- package/dist/{index.es-DB9y_DEM.js → index.es-AaEds8Wm.js} +81 -83
- package/dist/{index.es-vIyUKt0W.js → index.es-Df0KTgu4.js} +4523 -4628
- package/dist/index.es.js +1 -1
- package/dist/{unsupportedProp-BLzY2-w_.js → unsupportedProp-BlS305Lt.js} +1 -1
- package/dist/{useRegisterError-Cf6oylnR.js → useRegisterError-BvjIv1Yc.js} +1668 -1701
- package/dist/widget.css +1 -1
- package/package.json +4 -5
- package/dist/EstGas-Dy3XfCzY.js +0 -1496
- package/dist/InputComp-GcnDqx_s.js +0 -105
- package/dist/LoadRoute-BmUgvDid.js +0 -125
- package/dist/QuotesProgress-E5JnUMS0.js +0 -28
- package/dist/TxnButton-Br8R19rF.js +0 -215
- package/dist/add-BryKCrpI.js +0 -19
- package/dist/all-wallets-BMVOK2Ci.js +0 -10
- package/dist/app-store-3WurbJdI.js +0 -21
- package/dist/apple-eM872Ubz.js +0 -22
- package/dist/arrow-bottom-HMc73fJ8.js +0 -12
- package/dist/arrow-bottom-circle-B1N_R8Ux.js +0 -15
- package/dist/arrow-left-Q7GAZkD7.js +0 -12
- package/dist/arrow-right-ft3TcIM3.js +0 -12
- package/dist/arrow-top-C2xmF6tK.js +0 -12
- package/dist/bank-Bk-2ZR5E.js +0 -18
- package/dist/basic-CWrKgDAB.js +0 -5783
- package/dist/browser-BFB3TFfv.js +0 -18
- package/dist/card-DCx59si8.js +0 -18
- package/dist/ccip-CXr08uP1.js +0 -228
- package/dist/checkmark-BGsuJuhE.js +0 -15
- package/dist/checkmark-bold-DvjIl-51.js +0 -12
- package/dist/chevron-bottom-DAEnG7QP.js +0 -12
- package/dist/chevron-left-D33h2ppx.js +0 -12
- package/dist/chevron-right-C8Z_feNK.js +0 -12
- package/dist/chevron-top-DwDMd3p9.js +0 -12
- package/dist/chrome-store-B7ZDs2Fj.js +0 -65
- package/dist/clock-DnELUxSR.js +0 -12
- package/dist/close-Dnt29Pss.js +0 -12
- package/dist/coinPlaceholder-C09pzuXv.js +0 -12
- package/dist/compass-D8ZY16nH.js +0 -12
- package/dist/copy-DEh4RBKI.js +0 -19
- package/dist/core-CgIQaiRa.js +0 -14966
- package/dist/cursor-BtzkAOER.js +0 -7
- package/dist/cursor-transparent-B0nCflmb.js +0 -16
- package/dist/desktop-toTG92uH.js +0 -13
- package/dist/disconnect-C97lbAtY.js +0 -12
- package/dist/discord-BNJ3JePY.js +0 -21
- package/dist/etherscan-CK87TQMS.js +0 -10
- package/dist/exclamation-triangle-LWnOk0uz.js +0 -8
- package/dist/extension-5eIZU28A.js +0 -12
- package/dist/external-link-DDlCfigP.js +0 -12
- package/dist/facebook-1lTMXKeH.js +0 -30
- package/dist/farcaster-Di2TUKlZ.js +0 -16
- package/dist/filters-B_THnHaX.js +0 -12
- package/dist/getCosmosAddress-B8s9Ycj4.js +0 -6075
- package/dist/github-D5B1FE4K.js +0 -22
- package/dist/google-C8_WSUfw.js +0 -22
- package/dist/help-circle-C-ZOzjAP.js +0 -16
- package/dist/id-BynpKmej.js +0 -16
- package/dist/image-BRYUh760.js +0 -8
- package/dist/index-BFUVWgoD.js +0 -992
- package/dist/index-CN6pVc2G.js +0 -1483
- package/dist/index-CZwuzz6v.js +0 -6712
- package/dist/index-Dnyeih-W.js +0 -3261
- package/dist/index-krrwn6Pi.js +0 -206
- package/dist/info-DSQyHS8b.js +0 -7
- package/dist/info-circle-BfpWcI4c.js +0 -16
- package/dist/lightbulb-DEMYYsZd.js +0 -7
- package/dist/mail-DNZ2to_6.js +0 -12
- package/dist/mobile-qsyS8oMK.js +0 -13
- package/dist/more-CnBuKwll.js +0 -15
- package/dist/network-placeholder-DhJITakA.js +0 -18
- package/dist/nftPlaceholder-DD3-Cc9U.js +0 -12
- package/dist/off-CBApAdDk.js +0 -12
- package/dist/play-store-DDoeRc-b.js +0 -36
- package/dist/plus-C3J-XWCn.js +0 -17
- package/dist/qr-code-CEoOYtHk.js +0 -10
- package/dist/recycle-horizontal-BHJ_s9Yx.js +0 -13
- package/dist/refresh-CtzOoHls.js +0 -12
- package/dist/reown-logo-BOj4YDUQ.js +0 -16
- package/dist/search--Miza3A_.js +0 -12
- package/dist/send-Bhl1lz4j.js +0 -19
- package/dist/swapHorizontal-CCvKCngz.js +0 -12
- package/dist/swapHorizontalBold-B90V-dXL.js +0 -12
- package/dist/swapHorizontalMedium-CYjeHjnI.js +0 -20
- package/dist/swapHorizontalRoundedBold-DSMWeXdW.js +0 -12
- package/dist/swapVertical-DOJUNIvk.js +0 -12
- package/dist/telegram-CufEY_4d.js +0 -20
- package/dist/three-dots-J2ngva7G.js +0 -9
- package/dist/twitch-B4vTKVf5.js +0 -22
- package/dist/twitterIcon-DLrxpAGg.js +0 -10
- package/dist/verify-CbHqPQKs.js +0 -12
- package/dist/verify-filled-CzKx9Cph.js +0 -12
- package/dist/w3m-modal-DhpjK4cG.js +0 -1471
- package/dist/wallet-CvIeO6On.js +0 -12
- package/dist/wallet-placeholder-BqELXTBj.js +0 -18
- package/dist/walletconnect-BN4c4XQ5.js +0 -36
- package/dist/warning-circle--dqxXujk.js +0 -16
- package/dist/x-CkCp5gtL.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-C5bv1F_u.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-Cf6oylnR.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-CN6pVc2G.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-C5bv1F_u.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-BFx-Bg5Q.js";
|
8
|
-
import { e as se } from "./ethertousd-CC_ezooz.js";
|
9
|
-
import { O as H } from "./index-A8ClQmZo.js";
|
10
|
-
import { F as J, i as ae } from "./useRegisterError-Cf6oylnR.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-C5bv1F_u.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,215 +0,0 @@
|
|
1
|
-
import { jsx as B } from "react/jsx-runtime";
|
2
|
-
import { useState as A, useEffect as v } from "react";
|
3
|
-
import { useDynamicContext as xe, useSwitchNetwork as ve, useIsLoggedIn as ze } from "@dynamic-labs/sdk-react-core";
|
4
|
-
import { a as _, u as h, aI as Me, aJ as ue } from "./index-C5bv1F_u.js";
|
5
|
-
import { s as G } from "./WidgetForm.module-QHJ0-m5f.js";
|
6
|
-
import { useAccount as Oe, useConfig as Re, useSwitchChain as Ve, useBalance as Pe } from "wagmi";
|
7
|
-
import { u as ge, d as _e, c as qe, C as ye } from "./useRegisterError-Cf6oylnR.js";
|
8
|
-
import { v as Je } from "./validError-CDlJpg_f.js";
|
9
|
-
import { u as Qe, g as He, p as Ke } from "./index-CN6pVc2G.js";
|
10
|
-
function Ue(n) {
|
11
|
-
const { wallet: u, address: l } = _(), [N, f] = A(0);
|
12
|
-
async function g() {
|
13
|
-
const E = await window.tronWeb.trx.getBalance(l);
|
14
|
-
f(E / Math.pow(10, 6));
|
15
|
-
}
|
16
|
-
return v(() => {
|
17
|
-
l && (n == null ? void 0 : n.networkType) === "tron" && g();
|
18
|
-
}, [l, n == null ? void 0 : n.networkType]), { tronBal: N };
|
19
|
-
}
|
20
|
-
function j(n) {
|
21
|
-
if (n.key.toLowerCase() === "backpacksol")
|
22
|
-
return !0;
|
23
|
-
}
|
24
|
-
function Xe() {
|
25
|
-
const [n, u] = A(0), l = h((g) => g.fromChain), { primaryWallet: N } = xe();
|
26
|
-
async function f() {
|
27
|
-
let g = await N.getBalance();
|
28
|
-
u(Number(g) || 0);
|
29
|
-
}
|
30
|
-
return v(() => {
|
31
|
-
(l.networkType === "btc" || l.networkType === "sui") && f();
|
32
|
-
}, [l.networkType, N]), n;
|
33
|
-
}
|
34
|
-
function ds({ routesData: n, routes: u, amount: l, isAmountTyped: N, handleShowWallet: f, setConnectWalletField: g, handleConfirmClose: E, balanceSol: F, getCoinBalance: Te, handleSuccess: q }) {
|
35
|
-
var k, C, ee, se, te, re, ce, ne, ie, de, ae, le, oe;
|
36
|
-
const o = h((t) => t.gradient), I = h((t) => t.configuration), e = h((t) => t.fromChain), i = h((t) => t.fromCoin), r = h((t) => t.toChain), w = h((t) => t.toCoin), { isConnected: L, address: J, chain: m } = Oe(), { address: Q, isConnected: Ye } = _(), Ie = Re(), me = ve(), { getBothWalletConnection: he, getConnectWallet: Ne } = ge({
|
37
|
-
chainData: e
|
38
|
-
}), { connected: H, address: K, disconnect: Ze } = _(), z = h((t) => t.toDisconnect), d = h((t) => t.customWallet), { getWallet: fe } = ge({ chainData: e }), Be = Ne(e, r), [M, Ge] = A("101"), { tronBal: O } = Ue(e), { cosmosBalance: U } = Qe(), X = Xe(), R = ((k = e.chain) == null ? void 0 : k.length) && ((C = r.chain) == null ? void 0 : C.length), V = ((ee = i.address) == null ? void 0 : ee.length) && ((se = w.address) == null ? void 0 : se.length), Se = _e(), Y = Me(), { switchChain: We, switchChainAsync: $e, isPending: Ee } = Ve({
|
39
|
-
chainId: Number((e == null ? void 0 : e.chainId) || "0"),
|
40
|
-
config: Ie,
|
41
|
-
throwForSwitchChainNotSupported: !0,
|
42
|
-
onError(t) {
|
43
|
-
Je(t.message) && Se({ module: "wallet-error-switch", error: t.message });
|
44
|
-
}
|
45
|
-
}), y = Pe({
|
46
|
-
address: J,
|
47
|
-
token: "",
|
48
|
-
chainId: Number((e == null ? void 0 : e.chainId) || 0),
|
49
|
-
enabled: (e == null ? void 0 : e.networkType) == "evm"
|
50
|
-
}), Z = qe(Te || 0, 11), [b, a] = A({
|
51
|
-
text: "",
|
52
|
-
isGradient: !1,
|
53
|
-
color: "bw-bg-border-primary"
|
54
|
-
});
|
55
|
-
async function Fe() {
|
56
|
-
if ((e == null ? void 0 : e.networkType) === "evm" && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id))
|
57
|
-
try {
|
58
|
-
await $e({ chainId: Number((e == null ? void 0 : e.chainId) || "0") });
|
59
|
-
} catch {
|
60
|
-
}
|
61
|
-
else if ((e == null ? void 0 : e.networkType) === "sol" && M !== ((e == null ? void 0 : e.chainId) == "eclipse-svm" ? "201" : "101"))
|
62
|
-
try {
|
63
|
-
let t = await me({ wallet: p, network: e.chainId == "eclipse-svm" ? "201" : "101" });
|
64
|
-
W();
|
65
|
-
} catch {
|
66
|
-
}
|
67
|
-
else (e == null ? void 0 : e.networkType) === "sui" ? (Y.emit(ue.TransactionStarted, {
|
68
|
-
...n
|
69
|
-
}), S && (q(!1), E())) : (Y.emit(ue.TransactionStarted, {
|
70
|
-
...n
|
71
|
-
}), S && (q(!1), E()));
|
72
|
-
}
|
73
|
-
const { primaryWallet: p } = xe(), P = ze(), S = (e == null ? void 0 : e.networkType) === r.networkType ? !!((re = (te = fe(e)) == null ? void 0 : te.address) != null && re.length) : he(e == null ? void 0 : e.networkType, (d == null ? void 0 : d.length) > 30 ? "customWallet" : r == null ? void 0 : r.networkType), W = async () => {
|
74
|
-
if (p)
|
75
|
-
try {
|
76
|
-
const t = await p.getNetwork();
|
77
|
-
Ge(t);
|
78
|
-
} catch {
|
79
|
-
}
|
80
|
-
else
|
81
|
-
return;
|
82
|
-
};
|
83
|
-
v(() => {
|
84
|
-
W();
|
85
|
-
}, [p]);
|
86
|
-
function D(t, x) {
|
87
|
-
let T = t / Math.pow(10, x);
|
88
|
-
return T < 1e-6 ? T.toFixed(20) : T;
|
89
|
-
}
|
90
|
-
function Le() {
|
91
|
-
var t;
|
92
|
-
return Number(((t = y == null ? void 0 : y.data) == null ? void 0 : t.formatted) || 0);
|
93
|
-
}
|
94
|
-
function je(t) {
|
95
|
-
var x;
|
96
|
-
return Number(((x = U[Ke(t.address)]) == null ? void 0 : x.amount) || 0) / Math.pow(10, t.decimals);
|
97
|
-
}
|
98
|
-
function Ae() {
|
99
|
-
var we;
|
100
|
-
let t = {};
|
101
|
-
async function x(s, c) {
|
102
|
-
let $ = Object.keys(t);
|
103
|
-
t[s == null ? void 0 : s.chainId] ? (t[s == null ? void 0 : s.chainId].amountInToken += c.amountInToken, t[s == null ? void 0 : s.chainId].gas += D(c.amountInToken, s == null ? void 0 : s.decimals)) : t[s == null ? void 0 : s.chainId] = {
|
104
|
-
amountInToken: c.amountInToken,
|
105
|
-
gas: D(c.amountInToken, s == null ? void 0 : s.decimals),
|
106
|
-
token: s,
|
107
|
-
nativeBal: (d == null ? void 0 : d.length) > 30 && !z && (s == null ? void 0 : s.chainId) == (r == null ? void 0 : r.chainId) && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId) ? 0 : (s == null ? void 0 : s.networkType) == "sol" ? F : (s == null ? void 0 : s.networkType) == "tron" ? O : (s == null ? void 0 : s.networkType) == "btc" || (s == null ? void 0 : s.networkType) == "sui" ? X : (s == null ? void 0 : s.networkType) == "cosmos" ? je(s) : (s == null ? void 0 : s.networkType) == "tron" ? He(Q) : Le(),
|
108
|
-
isFromChain: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId.toString()),
|
109
|
-
order: (e == null ? void 0 : e.chainId) === (s == null ? void 0 : s.chainId) ? 1 : (r == null ? void 0 : r.chainId) === (s == null ? void 0 : s.chainId) ? 2 : $.length > 2 ? 3 : 2
|
110
|
-
};
|
111
|
-
}
|
112
|
-
(we = n == null ? void 0 : n.fee) == null || we.forEach((s) => {
|
113
|
-
const { token: c } = s;
|
114
|
-
s.source.toLowerCase() == "from_source_wallet" && x(c, s);
|
115
|
-
});
|
116
|
-
let T = Z;
|
117
|
-
if (Number(l) > Number(T))
|
118
|
-
a({
|
119
|
-
text: `Insufficient Balance ${i.coin || ""}`,
|
120
|
-
isGradient: !1,
|
121
|
-
color: "bw-bg-border-primary"
|
122
|
-
});
|
123
|
-
else if ((y != null && y.isLoading || y.isFetching) && (e == null ? void 0 : e.networkType) === "evm" || (typeof F > "u" || F === null) && (e == null ? void 0 : e.networkType) === "sol" || !O && (e == null ? void 0 : e.networkType) === "tron")
|
124
|
-
a({
|
125
|
-
text: "Fetching Balance..",
|
126
|
-
isGradient: !1,
|
127
|
-
color: "bw-bg-border-primary"
|
128
|
-
});
|
129
|
-
else {
|
130
|
-
let s = Object.values(t).sort((c, $) => c.order - $.order);
|
131
|
-
s.some((c) => {
|
132
|
-
var $, be, pe;
|
133
|
-
return c != null && c.isFromChain && Number(l) <= Number(T) && Number(c.nativeBal) - Number(l) < c.gas && (i != null && i.isNative) || Number(l) <= Number(T) && Number(c.nativeBal) < c.gas && !(i != null && i.isNative) && (c != null && c.isFromChain) ? (a({
|
134
|
-
text: `Insufficient ${(($ = c == null ? void 0 : c.token) == null ? void 0 : $.symbol) || ""} for gas on ${c.token.blockchain}`,
|
135
|
-
isGradient: !1,
|
136
|
-
color: "bw-bg-border-primary"
|
137
|
-
}), !0) : c.nativeBal < c.gas && !((d == null ? void 0 : d.length) > 30 && ((be = c == null ? void 0 : c.token) == null ? void 0 : be.chainId) == (r == null ? void 0 : r.chainId)) ? (a({
|
138
|
-
text: `Insufficient ${((pe = c == null ? void 0 : c.token) == null ? void 0 : pe.symbol) || ""} for gas on ${c.token.blockchain}`,
|
139
|
-
isGradient: !1,
|
140
|
-
color: "bw-bg-border-primary"
|
141
|
-
}), !0) : (a({
|
142
|
-
text: "",
|
143
|
-
isGradient: !0,
|
144
|
-
color: o || G.gradientbutton
|
145
|
-
}), !0);
|
146
|
-
}), s.length == 0 && (n != null && n.gasless || (n == null ? void 0 : n.provider) == "meson") && a({
|
147
|
-
text: "",
|
148
|
-
isGradient: !0,
|
149
|
-
color: o || G.gradientbutton
|
150
|
-
});
|
151
|
-
}
|
152
|
-
}
|
153
|
-
return v(() => {
|
154
|
-
var t, x, T;
|
155
|
-
!i.coin.length || !(w != null && w.coin.length) ? a({
|
156
|
-
text: "Select Token",
|
157
|
-
isGradient: !0,
|
158
|
-
color: o || G.gradientbutton
|
159
|
-
}) : S ? typeof l < "u" && Number(l || 0) <= 0 ? a({
|
160
|
-
text: "Enter Amount",
|
161
|
-
isGradient: !1,
|
162
|
-
color: "bw-bg-border-primary"
|
163
|
-
}) : u.isFetching || !N ? a({
|
164
|
-
text: "Loading Routes...",
|
165
|
-
isGradient: !1,
|
166
|
-
color: "bw-bg-border-primary"
|
167
|
-
}) : e.chainId === "eclipse-svm" && !j(p) ? a({
|
168
|
-
text: `Select ${e.name} wallet`,
|
169
|
-
isGradient: !0,
|
170
|
-
color: o || G.gradientbutton
|
171
|
-
}) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? a({
|
172
|
-
text: "Enter recipient wallet address",
|
173
|
-
isGradient: !0,
|
174
|
-
color: o || G.gradientbutton
|
175
|
-
}) : (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" && J === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) || (e == null ? void 0 : e.networkType) == "sol" && (p == null ? void 0 : p.address) === d && (i == null ? void 0 : i.address) == (w == null ? void 0 : w.address) ? a({
|
176
|
-
text: "From and To asset can not be the same!",
|
177
|
-
isGradient: !1,
|
178
|
-
color: "bw-bg-border-primary"
|
179
|
-
}) : (T = (x = (t = u == null ? void 0 : u.data) == null ? void 0 : t.data) == null ? void 0 : x.quotes) != null && T.length ? u != null && u.error ? a({
|
180
|
-
text: "Failed to fetch Quotes",
|
181
|
-
isGradient: !1,
|
182
|
-
color: "bw-bg-border-primary"
|
183
|
-
}) : L && Number((e == null ? void 0 : e.chainId) || "0") !== (m == null ? void 0 : m.id) && (e == null ? void 0 : e.networkType) === "evm" || P && ((e == null ? void 0 : e.chainId) === "eclipse-svm" ? "201" : "101") !== M && (e == null ? void 0 : e.networkType) === "sol" ? a({
|
184
|
-
text: `Switch Chain to ${e.chain}`,
|
185
|
-
isGradient: !0,
|
186
|
-
color: o || G.gradientbutton
|
187
|
-
}) : Ae() : a({
|
188
|
-
text: "No Routes Found",
|
189
|
-
isGradient: !1,
|
190
|
-
color: "bw-bg-border-primary"
|
191
|
-
}) : a({
|
192
|
-
text: "",
|
193
|
-
isGradient: !0,
|
194
|
-
color: o || G.gradientbutton
|
195
|
-
});
|
196
|
-
}, [M, p, i, w, l, e, r, (ce = y.data) == null ? void 0 : ce.formatted, n, y.isFetching, y.isLoading, L, Z, S, u.isFetching, m == null ? void 0 : m.id, N, O, F, d, X, U, Q]), `${(ne = e.chain) == null ? void 0 : ne.toLowerCase()}`, `${(ie = e.chain) == null ? void 0 : ie.toLowerCase()}`, /* @__PURE__ */ B(
|
197
|
-
"button",
|
198
|
-
{
|
199
|
-
style: b != null && b.isGradient && R && V ? {
|
200
|
-
...I == null ? void 0 : I.gradientStyle,
|
201
|
-
boxShadow: I && I.customTheme && ((ae = (de = I.customTheme) == null ? void 0 : de.shadow) == null ? void 0 : ae.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
202
|
-
} : {
|
203
|
-
boxShadow: I && I.customTheme && ((oe = (le = I.customTheme) == null ? void 0 : le.shadow) == null ? void 0 : oe.boxShadow) || "1px 1px 7px rgba(0, 0, 0, 0.15)"
|
204
|
-
},
|
205
|
-
className: `bw-w-full bw-rounded-sm bw-h-[52px] ${b != null && b.isGradient ? "bw-p-[3px]" : "bw-p-[1px]"} bw-mt-3 bw-border-0 bw-relative bw-z-0 disabled:bw-opacity-70 ${R && V && b.color} ${b.text.length > 29 ? "bw-text-xl" : "bw-text-2xl"} ${b != null && b.isGradient ? "bw-font-bold bw-text-text-primary" : "bw-font-normal bw-text-text-secondary"}`,
|
206
|
-
onClick: () => {
|
207
|
-
S || (f(!0), ((e == null ? void 0 : e.networkType) !== "evm" && L || (e == null ? void 0 : e.networkType) !== "sol" && P && p !== null || (e == null ? void 0 : e.networkType) !== "tron" && H && K) && !z ? g("from") : L && (r == null ? void 0 : r.networkType) !== "evm" || P && (r == null ? void 0 : r.networkType) !== "sol" || (r == null ? void 0 : r.networkType) !== "tron" && H && K || z ? g("to") : g("from")), e.chainId === "eclipse-svm" && !j(p) ? (f(!0), g("from")) : r.chainId === "eclipse-svm" && e.chainId !== "eclipse-svm" && !j(p) && d.length < 30 ? (f(!0), g("to")) : Fe();
|
208
|
-
},
|
209
|
-
children: /* @__PURE__ */ B("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__ */ B("p", { className: "bw-relative bw-z-20", children: R && V ? Ee ? /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) : S ? b.text.length ? b.text : "Start Transaction" : `Connect ${Be} Wallet` : /* @__PURE__ */ B("div", { className: "bw-w-[30px] bw-flex bw-text-text-secondary bw-justify-center bw-items-center bw-h-[30px]", children: /* @__PURE__ */ B(ye, { size: 22, thickness: 5, color: "inherit" }) }) }) })
|
210
|
-
}
|
211
|
-
);
|
212
|
-
}
|
213
|
-
export {
|
214
|
-
ds as default
|
215
|
-
};
|
package/dist/add-BryKCrpI.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { m as l } from "./core-CgIQaiRa.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-CgIQaiRa.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-CgIQaiRa.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-eM872Ubz.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { m as l } from "./core-CgIQaiRa.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-CgIQaiRa.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-CgIQaiRa.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-CgIQaiRa.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-CgIQaiRa.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
|
-
};
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { m as o } from "./core-CgIQaiRa.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 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
|
7
|
-
clip-rule="evenodd"
|
8
|
-
/>
|
9
|
-
</svg>`;
|
10
|
-
export {
|
11
|
-
e as arrowTopSvg
|
12
|
-
};
|