@blockend/widget 1.0.60-beta.1 → 1.0.61-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdvancedSettings-BSHVKOx8.js +60 -0
- package/dist/{AllRoutes-B-tqwmhZ.js → AllRoutes-3rJ_6MZA.js} +9 -9
- package/dist/{Box-B9dKcT71.js → Box-k1E75YNB.js} +14 -14
- package/dist/EstGas-NmdlnuTV.js +1688 -0
- package/dist/{Grow-DGNIagcL.js → Grow-DHSmig3g.js} +28 -28
- package/dist/{InputComp-C0BYsYO2.js → InputComp-Q8pjLoPE.js} +3 -3
- package/dist/{LoadRoute-BejmZs2l.js → LoadRoute-C2z-mW9G.js} +4 -4
- package/dist/{QuotesProgress-DUtmb0H1.js → QuotesProgress-BD5CQpZ-.js} +1 -1
- package/dist/{SwapAsset-C6q38SfB.js → SwapAsset-Kx0ombNP.js} +1 -1
- package/dist/{Tooltip-B9eQU87E.js → Tooltip-Dx9YIENU.js} +3 -3
- package/dist/{TxnButton-B7erQoe9.js → TxnButton-CWOz7URH.js} +32 -33
- package/dist/{add-BDXnG29B.js → add-D_aca-vE.js} +1 -1
- package/dist/{all-wallets-A5aRDDSX.js → all-wallets-D4BSWfpK.js} +1 -1
- package/dist/{app-store-CRNlWthG.js → app-store-ST0Ravfg.js} +1 -1
- package/dist/{apple-Bk9AlpJi.js → apple-DaFtNkdI.js} +1 -1
- package/dist/{arrow-bottom-Wyw-Sjsd.js → arrow-bottom-CuRXWFcr.js} +1 -1
- package/dist/{arrow-bottom-circle-F5a-Pm5A.js → arrow-bottom-circle-xfTEwf8w.js} +1 -1
- package/dist/{arrow-left-xa8Yhbw7.js → arrow-left-Z346mTvE.js} +1 -1
- package/dist/{arrow-right-DHehfJb9.js → arrow-right-CUIO0t26.js} +1 -1
- package/dist/{arrow-top-Zr4NTjGQ.js → arrow-top-DmqPBsC5.js} +1 -1
- package/dist/{bank-hQuILOEh.js → bank-BO1ZejV3.js} +1 -1
- package/dist/{basic-DtnxLRWd.js → basic-P5IuMVWt.js} +3 -3
- package/dist/{browser-DdzWWRtF.js → browser-R_yTVBVl.js} +1 -1
- package/dist/{card-CgYBeEF3.js → card-CmQJzq49.js} +1 -1
- package/dist/{ccip-fwzPvAXp.js → ccip-Vdbs2YPx.js} +1 -1
- package/dist/{checkmark-CRSJVI7P.js → checkmark-BUj82mTz.js} +1 -1
- package/dist/{checkmark-bold-Chu-2qTS.js → checkmark-bold-4sXAvyEi.js} +1 -1
- package/dist/{chevron-bottom-CWuEnub2.js → chevron-bottom-BHRgOLsC.js} +1 -1
- package/dist/{chevron-left-h2_syVI8.js → chevron-left-eVq5zb9x.js} +1 -1
- package/dist/{chevron-right-Ct4j2Leu.js → chevron-right-BqbdhgX8.js} +1 -1
- package/dist/{chevron-top-DcBzaR2h.js → chevron-top-lFcz1Dk9.js} +1 -1
- package/dist/{chrome-store-CXn4JMj-.js → chrome-store-CJjs0q6Z.js} +1 -1
- package/dist/{clock-JZPADmeK.js → clock-LxWBSJ_V.js} +1 -1
- package/dist/{close-DtXi8BhO.js → close-CJEyeA8d.js} +1 -1
- package/dist/{coinPlaceholder-BK6alFNE.js → coinPlaceholder-A0px2L1V.js} +1 -1
- package/dist/{compass-DWhtsJev.js → compass-CKpEE3QF.js} +1 -1
- package/dist/{copy-D-MDSgUX.js → copy-BGAVbyLK.js} +1 -1
- package/dist/{core-BwKgmZsH.js → core-UMj0YuPY.js} +6124 -4570
- package/dist/{cursor-Dh3mFu9G.js → cursor-CdRK37lV.js} +1 -1
- package/dist/{cursor-transparent-NB0LxFUO.js → cursor-transparent-DCtZPn6M.js} +1 -1
- package/dist/{desktop-BgF9XEMs.js → desktop-BpmiexI7.js} +1 -1
- package/dist/{disconnect-Dq0GPLgW.js → disconnect-CmRL6rxR.js} +1 -1
- package/dist/{discord-Dx0EuHuU.js → discord-CgA8etyT.js} +1 -1
- package/dist/{down-D_76LJ5o.js → down-veMPztmj.js} +2 -2
- package/dist/{etherscan-CNIjXg_f.js → etherscan-B0Iz4J9k.js} +1 -1
- package/dist/{exclamation-triangle-Bhp8mAG7.js → exclamation-triangle-Box_8laE.js} +1 -1
- package/dist/{extension-BKqqIj7b.js → extension-CT5kynXr.js} +1 -1
- package/dist/{external-link-DbGPs34E.js → external-link-BmAqCUs9.js} +1 -1
- package/dist/{facebook-DRG1zLmw.js → facebook-CzlMPtlk.js} +1 -1
- package/dist/{farcaster-DDWwjMH9.js → farcaster-Z3KYAnFk.js} +1 -1
- package/dist/{filters-Bj10QvW6.js → filters-CVtviD0v.js} +1 -1
- package/dist/{getChainIds-eeGoWwbI.js → getChainIds-DDKgS0TA.js} +2 -2
- package/dist/{getCosmosAddress-DlgoXFw9.js → getCosmosAddress-D-BxI1sZ.js} +1589 -1574
- package/dist/{github-ZPlB-Utk.js → github-KjnPjzGN.js} +1 -1
- package/dist/{google-CCKsdggZ.js → google-CnyCazMS.js} +1 -1
- package/dist/{hamburger-DPe9Xfjf.js → hamburger-DkyOLKDt.js} +5 -5
- package/dist/{help-circle-IpogiYkd.js → help-circle-BoN3xTWx.js} +1 -1
- package/dist/{id--1TM5fr0.js → id-tq8aEw5U.js} +1 -1
- package/dist/{image-DUfvu2wM.js → image-DBC1q2_n.js} +1 -1
- package/dist/{index-Bb3Owdat.js → index-37soHOzC.js} +2 -2
- package/dist/{index-BAuHi89Z.js → index-B6Hd7MNh.js} +3111 -3034
- package/dist/{index-HXseE2Nv.js → index-BMJemt0T.js} +1 -1
- package/dist/{index-BEzLzd5e.js → index-BnfXeC9U.js} +11 -11
- package/dist/{index-C5XuDvkl.js → index-BrUFU9w4.js} +587 -578
- package/dist/{index-BqAYNgz8.js → index-C57ebjbd.js} +78 -78
- package/dist/index-CrdvyxIs.js +6713 -0
- package/dist/{index-BThpYFL-.js → index-Dq-7CifU.js} +332 -352
- package/dist/{index-DThyqr43.js → index-DwgdKTri.js} +1 -1
- package/dist/index-nbo2VFYc.js +206 -0
- package/dist/{index-CIxU6QQf.js → index-u8Ded5qw.js} +2604 -2625
- package/dist/index.es-CXA8FwxC.js +14904 -0
- package/dist/{index.es-D28h__ZD.js → index.es-CwOZPtUM.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-CRK9yM3q.js → info-B-ADkq2O.js} +1 -1
- package/dist/{info-circle-DroAdDav.js → info-circle-CzjFim13.js} +1 -1
- package/dist/{lightbulb-DGwzaoxs.js → lightbulb-BzGUazBJ.js} +1 -1
- package/dist/{mail-BQSCf__h.js → mail-CEB7w3xW.js} +1 -1
- package/dist/{mobile-4chCtN_4.js → mobile-D2As9Lxy.js} +1 -1
- package/dist/{more-uiMKzNjJ.js → more-B3qgSPHK.js} +1 -1
- package/dist/{network-placeholder-CVOcWHRh.js → network-placeholder-D3v1VNVd.js} +1 -1
- package/dist/{nftPlaceholder-CakfkypA.js → nftPlaceholder-7uzR-QgE.js} +1 -1
- package/dist/{off-CoYWNQqe.js → off-B5fhwDTB.js} +1 -1
- package/dist/{play-store-q5l7DaBe.js → play-store-fmnI2qeP.js} +1 -1
- package/dist/{plus-CR0bo3Ss.js → plus-BPrwB2BV.js} +1 -1
- package/dist/{qr-code-FNoqG2yJ.js → qr-code-DRh63vJj.js} +1 -1
- package/dist/{recycle-horizontal-BsU3dW8b.js → recycle-horizontal-DGw86E5g.js} +1 -1
- package/dist/{refresh-DyJzaQLK.js → refresh-Dg7iaYhB.js} +1 -1
- package/dist/{reown-logo-BFbpXVCB.js → reown-logo-tiOXXURu.js} +1 -1
- package/dist/{search-CoIHCx8n.js → search-eG23Hr6c.js} +1 -1
- package/dist/{send-CT0RLtYP.js → send-BOwE6eLM.js} +1 -1
- package/dist/{swapHorizontal-2UEy_VbL.js → swapHorizontal-ywv205Wi.js} +1 -1
- package/dist/{swapHorizontalBold-BwLgMdQd.js → swapHorizontalBold-CzmBehA5.js} +1 -1
- package/dist/{swapHorizontalMedium-Wwd3Subk.js → swapHorizontalMedium-BLbLZusS.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-CbSALTi8.js → swapHorizontalRoundedBold-N_SHWa3r.js} +1 -1
- package/dist/{swapVertical-B5GizA1j.js → swapVertical-EAZRQhGp.js} +1 -1
- package/dist/{telegram-BtJEmiFh.js → telegram-n36fCk1z.js} +1 -1
- package/dist/{three-dots-Bel3OYRL.js → three-dots-0tBgmH4A.js} +1 -1
- package/dist/{twitch-iJUsxLGs.js → twitch-BhZ8ahtd.js} +1 -1
- package/dist/{twitterIcon-5Bw6TNyI.js → twitterIcon-DfNmxt1B.js} +1 -1
- package/dist/{unsupportedProp-CtBHkzVs.js → unsupportedProp-D3sAzZYG.js} +1 -1
- package/dist/useRegisterError-Bo2lp0sa.js +8919 -0
- package/dist/{verify-9NPblyAz.js → verify-CWXFpftr.js} +1 -1
- package/dist/{verify-filled-BNVhfPkW.js → verify-filled-DP3y-Kx3.js} +1 -1
- package/dist/{w3m-modal-BoPsPieM.js → w3m-modal-CwwnoSKf.js} +2 -2
- package/dist/{wallet-DTIql0UA.js → wallet-pQYrlhSS.js} +1 -1
- package/dist/{wallet-placeholder-DXx_YU8N.js → wallet-placeholder-CFNKM5lP.js} +1 -1
- package/dist/{walletconnect-9eJmse3N.js → walletconnect-CAtjZJiV.js} +1 -1
- package/dist/{warning-circle-B3zxM-8-.js → warning-circle-BOE2EoE9.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-EqjvjF0s.js → x-BqcRzM19.js} +1 -1
- package/package.json +2 -1
- package/dist/EstGas-ZNdT7ZNT.js +0 -20281
- package/dist/index-Ds5cL5Tm.js +0 -160
- package/dist/index-Wj3B2hZ5.js +0 -206
- package/dist/index.es-DhjmbcLt.js +0 -13234
- package/dist/useRegisterError-UVP98oC5.js +0 -8912
package/dist/index-Ds5cL5Tm.js
DELETED
@@ -1,160 +0,0 @@
|
|
1
|
-
import { jsxs as n, jsx as s, Fragment as X } from "react/jsx-runtime";
|
2
|
-
import { T as se, a as ae, H as oe, b as Y, c as ne, E as ie, d as ce } from "./EstGas-ZNdT7ZNT.js";
|
3
|
-
import { useState as q, useEffect as k } from "react";
|
4
|
-
import { d as we, i as be } from "./useRegisterError-UVP98oC5.js";
|
5
|
-
import { u as c, l as ee, c as Z, F as ue } from "./index-BAuHi89Z.js";
|
6
|
-
import { useQuery as _ } from "@tanstack/react-query";
|
7
|
-
import "./down-D_76LJ5o.js";
|
8
|
-
import "wagmi";
|
9
|
-
import "@dynamic-labs/sdk-react-core";
|
10
|
-
import "./getCosmosAddress-DlgoXFw9.js";
|
11
|
-
import "@dynamic-labs/solana";
|
12
|
-
function le({ details: F }) {
|
13
|
-
var T, N, I, w, d, p, D, b, u, E, t;
|
14
|
-
const a = {
|
15
|
-
route: {
|
16
|
-
...F
|
17
|
-
}
|
18
|
-
}, m = c((f) => f.configuration);
|
19
|
-
return ee.isEmpty(a.route) ? /* @__PURE__ */ s("div", { className: "bw-relative bw-w-full bw-h-[41px] bw-mt-4 bw-flex bw-justify-center" }) : /* @__PURE__ */ n("div", { className: "bw-relative bw-mt-4 bw-flex bw-justify-center ", children: [
|
20
|
-
/* @__PURE__ */ s(
|
21
|
-
"div",
|
22
|
-
{
|
23
|
-
style: {
|
24
|
-
boxShadow: m && m.customTheme && ((N = (T = m.customTheme) == null ? void 0 : T.shadow) == null ? void 0 : N.boxShadow) || "1px 1px 10px 3px rgba(0, 0, 0, 0.15)"
|
25
|
-
},
|
26
|
-
className: "bw-w-[200px] bw-rounded-[50%] bw-absolute bw-right-auto bw-z-0 bw-left-auto bw-h-[40px]"
|
27
|
-
}
|
28
|
-
),
|
29
|
-
/* @__PURE__ */ n("div", { className: "bw-flex bw-relative bw-bg-background-container bw-z-10 bw-mx-auto bw-h-[41px] bw-w-[70%] bw-border-[0.5px] bw-border-border-primary bw-border-r-0 bw-border-l-0 bw-items-center bw-gap-x-1", children: [
|
30
|
-
" ",
|
31
|
-
/* @__PURE__ */ n("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-primary", children: [
|
32
|
-
/* @__PURE__ */ s("span", { className: "bw-text-sm bw-font-light", children: "via" }),
|
33
|
-
" ",
|
34
|
-
/* @__PURE__ */ s(
|
35
|
-
"img",
|
36
|
-
{
|
37
|
-
src: (w = (I = a == null ? void 0 : a.route) == null ? void 0 : I.providerDetails) == null ? void 0 : w.logoUrl,
|
38
|
-
className: "bw-rounded-[50%] bw-mx-[4px] bw-min-w-[18px] bw-max-h-[18px] bw-min-h-[18px]",
|
39
|
-
width: 18,
|
40
|
-
height: 18
|
41
|
-
}
|
42
|
-
),
|
43
|
-
((p = (d = a == null ? void 0 : a.route) == null ? void 0 : d.providerDetails) == null ? void 0 : p.name) || "",
|
44
|
-
":",
|
45
|
-
" ",
|
46
|
-
(D = a == null ? void 0 : a.route) == null ? void 0 : D.protocolsUsed[0],
|
47
|
-
((u = (b = a == null ? void 0 : a.route) == null ? void 0 : b.protocolsUsed) == null ? void 0 : u.length) <= 1 ? "" : /* @__PURE__ */ n("span", { className: "bw-ml-1 bw-text-xs bw-font-normal bw-leading-6", children: [
|
48
|
-
`+${((t = (E = a == null ? void 0 : a.route) == null ? void 0 : E.protocolsUsed) == null ? void 0 : t.length) - 1}`,
|
49
|
-
" More"
|
50
|
-
] }),
|
51
|
-
" "
|
52
|
-
] }),
|
53
|
-
" "
|
54
|
-
] })
|
55
|
-
] });
|
56
|
-
}
|
57
|
-
const me = () => {
|
58
|
-
var z, A, R;
|
59
|
-
const F = c((r) => r.setRoute), a = c((r) => r.txnDetails), [m, T] = q(!1), [N, I] = q(!1), [w, d] = q(!1), [p, D] = q({}), b = c((r) => r.setPersist), u = c((r) => r.persist);
|
60
|
-
we();
|
61
|
-
const { txnupdate: E } = be, t = _({
|
62
|
-
queryKey: ["txnDetails", a == null ? void 0 : a.routeId],
|
63
|
-
queryFn: async () => await (await Z.fetchTxnDetails(a == null ? void 0 : a.routeId)).json(),
|
64
|
-
refetchOnWindowFocus: !1
|
65
|
-
});
|
66
|
-
k(() => {
|
67
|
-
var r, h, x, y, S, g, v, j, l, U, B, M, O, K, W, $, G, L, Q, J, V;
|
68
|
-
if (t.data) {
|
69
|
-
let e = t.data;
|
70
|
-
e.status == "error";
|
71
|
-
let C = [];
|
72
|
-
((r = e == null ? void 0 : e.data) == null ? void 0 : r.currentStepStatus) === "success" ? (x = (h = e == null ? void 0 : e.data) == null ? void 0 : h.steps) == null || x.forEach((i) => {
|
73
|
-
C.push({ type: "preText" });
|
74
|
-
}) : ((y = e == null ? void 0 : e.data) == null ? void 0 : y.currentStepStatus) === "failed" && (d(!0), (g = (S = e == null ? void 0 : e.data) == null ? void 0 : S.steps) == null || g.forEach((i) => {
|
75
|
-
(i == null ? void 0 : i.status) === "success" ? C.push({ type: "preText" }) : (i == null ? void 0 : i.status) === "failed" && C.push({ type: "failed" });
|
76
|
-
})), b({
|
77
|
-
...(v = c.getState()) == null ? void 0 : v.persist,
|
78
|
-
stepData: (l = e == null ? void 0 : e.data) == null ? void 0 : l.steps[(j = e == null ? void 0 : e.data) == null ? void 0 : j.currentStepIndex],
|
79
|
-
routeId: (U = e == null ? void 0 : e.data) == null ? void 0 : U.routeId,
|
80
|
-
allSteps: {
|
81
|
-
steps: (B = e == null ? void 0 : e.data) == null ? void 0 : B.steps,
|
82
|
-
currentStep: ((M = e == null ? void 0 : e.data) == null ? void 0 : M.currentStepStatus) === "success" ? ((O = e == null ? void 0 : e.data) == null ? void 0 : O.currentStepIndex) + 1 : (K = e == null ? void 0 : e.data) == null ? void 0 : K.currentStepIndex,
|
83
|
-
type: "preText"
|
84
|
-
},
|
85
|
-
stepStatus: C,
|
86
|
-
statusData: {
|
87
|
-
status: (W = e == null ? void 0 : e.data) == null ? void 0 : W.currentStepStatus
|
88
|
-
},
|
89
|
-
historyData: e == null ? void 0 : e.data,
|
90
|
-
fromCoin: ($ = e == null ? void 0 : e.data) == null ? void 0 : $.from,
|
91
|
-
toCoin: (G = e == null ? void 0 : e.data) == null ? void 0 : G.to,
|
92
|
-
route: e == null ? void 0 : e.data,
|
93
|
-
isHistory: !0,
|
94
|
-
hash: ((L = e == null ? void 0 : e.data) == null ? void 0 : L.currentStepStatus) == "in-progress" ? (V = (J = e == null ? void 0 : e.data) == null ? void 0 : J.steps[(Q = e == null ? void 0 : e.data) == null ? void 0 : Q.currentStepIndex]) == null ? void 0 : V.srcTxnHash : null
|
95
|
-
});
|
96
|
-
}
|
97
|
-
}, [t.data]), k(() => {
|
98
|
-
if (t.error) {
|
99
|
-
let r = t.error;
|
100
|
-
r.details || r.message;
|
101
|
-
}
|
102
|
-
}, [t.error]);
|
103
|
-
const f = _({
|
104
|
-
queryKey: ["chains"],
|
105
|
-
queryFn: async () => await (await Z.fetchChain()).json(),
|
106
|
-
refetchOnWindowFocus: !1,
|
107
|
-
enabled: t.isSuccess
|
108
|
-
});
|
109
|
-
k(() => {
|
110
|
-
var r, h, x, y, S, g, v;
|
111
|
-
if (f.data) {
|
112
|
-
let j = f.data, l = { ...ee.keyBy(j.data, "chainId") };
|
113
|
-
D(l), b({
|
114
|
-
...(r = c.getState()) == null ? void 0 : r.persist,
|
115
|
-
fromChain: l[(y = (x = (h = t == null ? void 0 : t.data) == null ? void 0 : h.data) == null ? void 0 : x.from) == null ? void 0 : y.chainId],
|
116
|
-
toChain: l[(v = (g = (S = t == null ? void 0 : t.data) == null ? void 0 : S.data) == null ? void 0 : g.to) == null ? void 0 : v.chainId]
|
117
|
-
});
|
118
|
-
}
|
119
|
-
}, [f.data, t.data]);
|
120
|
-
function H() {
|
121
|
-
F("history"), b({});
|
122
|
-
}
|
123
|
-
let o = ((z = t == null ? void 0 : t.data) == null ? void 0 : z.data) || {};
|
124
|
-
function te(r) {
|
125
|
-
T(r);
|
126
|
-
}
|
127
|
-
function re(r) {
|
128
|
-
d(r);
|
129
|
-
}
|
130
|
-
function P(r) {
|
131
|
-
I(r);
|
132
|
-
}
|
133
|
-
return /* @__PURE__ */ s(se.Provider, { value: { isTxnSuccessful: m, handleTxnSuccess: te }, children: /* @__PURE__ */ s(ae.Provider, { value: { isErrorMessage: w, handleErrorMessage: re }, children: /* @__PURE__ */ s("div", { className: "bw-w-full bw-relative bw-min-h-[610px] ", children: t.isSuccess ? /* @__PURE__ */ n(X, { children: [
|
134
|
-
/* @__PURE__ */ s(oe, { handleBack: H }),
|
135
|
-
/* @__PURE__ */ s("div", { className: "bw-mt-[-20px]", children: /* @__PURE__ */ s(le, { details: o }) }),
|
136
|
-
/* @__PURE__ */ s("div", { className: "bw-flex bw-justify-between bw-items-center" }),
|
137
|
-
/* @__PURE__ */ n("div", { className: "bw-flex bw-mt-4 bw-w-full bw-justify-between bw-items-center", children: [
|
138
|
-
/* @__PURE__ */ n("div", { className: "bw-w-[40%] md:bw-w-auto", children: [
|
139
|
-
/* @__PURE__ */ s("p", { className: "bw-text-xs bw-mb-1 bw-text-text-secondary bw-font-medium", children: "Send" }),
|
140
|
-
/* @__PURE__ */ s(Y, { amount: o.inputAmountDisplay, coinData: o.from, chainData: p[(A = o == null ? void 0 : o.from) == null ? void 0 : A.chainId] || {}, field: "from" })
|
141
|
-
] }),
|
142
|
-
w ? /* @__PURE__ */ s("div", { className: "bw-border bw-mt-5 bw-w-[65px] bw-h-[65px] bw-flex bw-items-center bw-justify-center bw-rounded-[50%] bw-bg-background-container bw-relative bw-z-10 hover:bw-opacity-100 bw-border-border-primary ", children: /* @__PURE__ */ s("img", { src: E, width: 33, height: 30, alt: "img" }) }) : /* @__PURE__ */ s(ne, { isTimerStarted: (u == null ? void 0 : u.isTimerStarted) || N, startTimer: P, error: w }),
|
143
|
-
/* @__PURE__ */ s("div", { className: "bw-w-full bw-z-0 md:bw-w-full bw-mt-5 bw-absolute bw-h-[1px] bw-bg-border-primary " }),
|
144
|
-
/* @__PURE__ */ n("div", { className: "bw-w-[40%] md:bw-w-auto", children: [
|
145
|
-
/* @__PURE__ */ s("p", { className: "bw-text-xs bw-mb-1 bw-text-text-secondary bw-font-medium", children: "Receive" }),
|
146
|
-
/* @__PURE__ */ s(Y, { amount: o.outputAmountDisplay, coinData: o.to, chainData: p[(R = o == null ? void 0 : o.to) == null ? void 0 : R.chainId] || {}, field: "to" })
|
147
|
-
] })
|
148
|
-
] }),
|
149
|
-
/* @__PURE__ */ n("div", { className: "bw-h-[320px] bw-pr-1 bw-flex bw-flex-col bw-mt-8 bw-overflow-y-auto", children: [
|
150
|
-
t.isLoading ? /* @__PURE__ */ s(X, {}) : /* @__PURE__ */ s(ie, {}),
|
151
|
-
/* @__PURE__ */ s(ce, { amount: t == null ? void 0 : t.inputAmountDisplay, startTimer: P, handleBack: H, isHistory: !0 })
|
152
|
-
] })
|
153
|
-
] }) : /* @__PURE__ */ s(ue, {}) }) }) });
|
154
|
-
};
|
155
|
-
function Ie() {
|
156
|
-
return /* @__PURE__ */ s(me, {});
|
157
|
-
}
|
158
|
-
export {
|
159
|
-
Ie as default
|
160
|
-
};
|
package/dist/index-Wj3B2hZ5.js
DELETED
@@ -1,206 +0,0 @@
|
|
1
|
-
import { jsxs as w, jsx as n, Fragment as A } from "react/jsx-runtime";
|
2
|
-
import _, { useContext as $, useState as E, useEffect as v, useRef as O } from "react";
|
3
|
-
import { a as U, T as J, H as K, b as L, c as V, E as W, d as X } from "./EstGas-ZNdT7ZNT.js";
|
4
|
-
import { u as l, l as Y } from "./index-BAuHi89Z.js";
|
5
|
-
import { i as M, C as Q, A as Z } from "./useRegisterError-UVP98oC5.js";
|
6
|
-
import { B as R } from "./Box-B9dKcT71.js";
|
7
|
-
function ee() {
|
8
|
-
var d, b, i, e, u, c, m, g, x, s, h, y, p, C;
|
9
|
-
const t = l((T) => T.persist), r = l((T) => T.configuration), { defaultCoin: a } = M;
|
10
|
-
let f = (i = (b = (d = t == null ? void 0 : t.route) == null ? void 0 : d.providerDetails) == null ? void 0 : b.logoUrl) != null && i.length ? (u = (e = t == null ? void 0 : t.route) == null ? void 0 : e.providerDetails) == null ? void 0 : u.logoUrl : a;
|
11
|
-
return Y.isEmpty(t.route) ? /* @__PURE__ */ n(A, {}) : /* @__PURE__ */ w("div", { className: "bw-relative bw-mt-4 bw-flex bw-justify-center ", children: [
|
12
|
-
/* @__PURE__ */ n(
|
13
|
-
"div",
|
14
|
-
{
|
15
|
-
style: {
|
16
|
-
boxShadow: r && r.customTheme && ((m = (c = r.customTheme) == null ? void 0 : c.shadow) == null ? void 0 : m.boxShadow) || "1px 1px 10px 3px rgba(0, 0, 0, 0.15)"
|
17
|
-
},
|
18
|
-
className: "bw-w-[200px] bw-rounded-[50%] bw-absolute bw-right-auto bw-z-0 bw-left-auto bw-h-[40px]"
|
19
|
-
}
|
20
|
-
),
|
21
|
-
/* @__PURE__ */ w("div", { className: "bw-flex bw-relative bw-bg-background-container bw-z-10 bw-mx-auto bw-h-[41px] bw-w-[70%] bw-border-[0.5px] bw-border-border-primary bw-border-r-0 bw-border-l-0 bw-items-center bw-gap-x-1", children: [
|
22
|
-
" ",
|
23
|
-
/* @__PURE__ */ w("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-primary", children: [
|
24
|
-
/* @__PURE__ */ n("span", { className: "bw-text-sm bw-font-light", children: "via" }),
|
25
|
-
" ",
|
26
|
-
/* @__PURE__ */ n("img", { src: f, className: "bw-rounded-[50%] bw-mx-[4px] bw-min-w-[18px] bw-max-h-[18px] bw-min-h-[18px]", width: 18, height: 18 }),
|
27
|
-
((x = (g = t == null ? void 0 : t.route) == null ? void 0 : g.providerDetails) == null ? void 0 : x.name) || "",
|
28
|
-
": ",
|
29
|
-
(s = t == null ? void 0 : t.route) == null ? void 0 : s.protocolsUsed[0],
|
30
|
-
((y = (h = t == null ? void 0 : t.route) == null ? void 0 : h.protocolsUsed) == null ? void 0 : y.length) <= 1 ? "" : /* @__PURE__ */ w("span", { className: "bw-ml-1 bw-text-xs bw-font-normal bw-leading-6", children: [
|
31
|
-
`+${((C = (p = t == null ? void 0 : t.route) == null ? void 0 : p.protocolsUsed) == null ? void 0 : C.length) - 1}`,
|
32
|
-
" More"
|
33
|
-
] }),
|
34
|
-
" "
|
35
|
-
] }),
|
36
|
-
" "
|
37
|
-
] })
|
38
|
-
] });
|
39
|
-
}
|
40
|
-
let N;
|
41
|
-
function te() {
|
42
|
-
var u, c, m, g, x;
|
43
|
-
const t = l((s) => s.configuration), r = l((s) => s.persist), a = l((s) => s.setPersist), { isErrorMessage: f } = $(U), d = Math.floor(((/* @__PURE__ */ new Date()).getTime() - r.quoteStartTime) / 1e3);
|
44
|
-
let b = ((u = r == null ? void 0 : r.route) == null ? void 0 : u.deadline) || 60;
|
45
|
-
const [i, e] = E(b);
|
46
|
-
return v(() => {
|
47
|
-
d && e(b - d);
|
48
|
-
}, []), v(() => (N = setInterval(() => {
|
49
|
-
e((s) => {
|
50
|
-
var h;
|
51
|
-
return s <= 0 ? (clearInterval(N), a({
|
52
|
-
...(h = l.getState()) == null ? void 0 : h.persist,
|
53
|
-
isQuoteTimer: !1,
|
54
|
-
showAcceptQuote: !0,
|
55
|
-
quoteStartTime: (/* @__PURE__ */ new Date()).getTime()
|
56
|
-
}), 0) : s - 1;
|
57
|
-
});
|
58
|
-
}, 1e3), () => clearInterval(N)), []), v(() => {
|
59
|
-
(f || !r.isQuoteTimer) && clearInterval(N);
|
60
|
-
}, [f, r.isQuoteTimer]), !(r != null && r.hash) && r.quote === "enable" ? /* @__PURE__ */ w("div", { className: "bw-absolute bw-top-0 bw-right-0 ", children: [
|
61
|
-
/* @__PURE__ */ n("svg", { className: "bw-absolute bw-w-[20px] bw-h-[20px]", children: /* @__PURE__ */ w("linearGradient", { id: "linearColors", x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
62
|
-
/* @__PURE__ */ n("stop", { offset: "1%", stopColor: (c = t == null ? void 0 : t.gradientStyle) != null && c.spinnerColor ? (m = t == null ? void 0 : t.gradientStyle) == null ? void 0 : m.spinnerColor : "#A45EFF" }),
|
63
|
-
/* @__PURE__ */ n("stop", { offset: "90%", stopColor: (g = t == null ? void 0 : t.gradientStyle) != null && g.spinnerColor ? (x = t == null ? void 0 : t.gradientStyle) == null ? void 0 : x.stopColor : "#2CFFE4" })
|
64
|
-
] }) }),
|
65
|
-
/* @__PURE__ */ w(
|
66
|
-
R,
|
67
|
-
{
|
68
|
-
sx: {
|
69
|
-
position: "relative",
|
70
|
-
display: "inline-flex"
|
71
|
-
},
|
72
|
-
children: [
|
73
|
-
/* @__PURE__ */ n(
|
74
|
-
Q,
|
75
|
-
{
|
76
|
-
variant: "determinate",
|
77
|
-
sx: {
|
78
|
-
color: "var(--tw-border-primary)"
|
79
|
-
},
|
80
|
-
size: 20,
|
81
|
-
thickness: 2,
|
82
|
-
value: 100
|
83
|
-
}
|
84
|
-
),
|
85
|
-
/* @__PURE__ */ n(
|
86
|
-
Q,
|
87
|
-
{
|
88
|
-
variant: "determinate",
|
89
|
-
size: 20,
|
90
|
-
thickness: 5,
|
91
|
-
value: i / b * 100,
|
92
|
-
sx: {
|
93
|
-
"svg circle": { stroke: "url(#linearColors)" },
|
94
|
-
position: "absolute",
|
95
|
-
left: 0,
|
96
|
-
[`& .${Z.circle}`]: {
|
97
|
-
strokeLinecap: "round"
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
)
|
102
|
-
]
|
103
|
-
}
|
104
|
-
)
|
105
|
-
] }) : /* @__PURE__ */ n(A, {});
|
106
|
-
}
|
107
|
-
const ne = _.memo(function({ handleOpenExchange: t, amount: r, route: a, resetAmount: f, resetBalance: d, setExchange: b }) {
|
108
|
-
var k, j;
|
109
|
-
const i = l((o) => o.setPersist), e = l((o) => o.persist), u = l((o) => o.fromChain), c = l((o) => o.fromCoin), m = l((o) => o.toChain), g = l((o) => o.toCoin), [x, s] = E(!1), [h, y] = E(!1), [p, C] = E(!1), T = !e.stepData, { txnupdate: q, refunded: B } = M;
|
110
|
-
v(() => {
|
111
|
-
var o, z, D, F;
|
112
|
-
a != null && a.routeId && i({
|
113
|
-
...(o = l.getState()) == null ? void 0 : o.persist,
|
114
|
-
routeId: a == null ? void 0 : a.routeId,
|
115
|
-
route: a,
|
116
|
-
toChain: m,
|
117
|
-
toCoin: g,
|
118
|
-
fromChain: u,
|
119
|
-
fromCoin: c,
|
120
|
-
amount: r,
|
121
|
-
quote: "enable",
|
122
|
-
openAt: (/* @__PURE__ */ new Date()).getTime(),
|
123
|
-
startTime: ((F = (D = (z = l) == null ? void 0 : z.getState()) == null ? void 0 : D.persist) == null ? void 0 : F.startTime) || (/* @__PURE__ */ new Date()).getTime()
|
124
|
-
});
|
125
|
-
}, [a]);
|
126
|
-
function I(o) {
|
127
|
-
s(o);
|
128
|
-
}
|
129
|
-
function S() {
|
130
|
-
((e == null ? void 0 : e.openAt) + 60 * 60 * 1e3 - (/* @__PURE__ */ new Date()).getTime()) / 1e3 / 60 <= 0 && document.visibilityState === "visible" && (i({}), t(), f());
|
131
|
-
}
|
132
|
-
v(() => (e != null && e.openAt && window.addEventListener("visibilitychange", S), () => {
|
133
|
-
window.removeEventListener("visibilitychange", S);
|
134
|
-
}), [e == null ? void 0 : e.openAt]), v(() => (e != null && e.openAt && window.addEventListener("load", S), () => {
|
135
|
-
window.removeEventListener("load", S);
|
136
|
-
}), [e == null ? void 0 : e.openAt]);
|
137
|
-
function G(o) {
|
138
|
-
y(o);
|
139
|
-
}
|
140
|
-
function H(o) {
|
141
|
-
C(o);
|
142
|
-
}
|
143
|
-
function P() {
|
144
|
-
t(), i({}), h && d();
|
145
|
-
}
|
146
|
-
return /* @__PURE__ */ n(J.Provider, { value: { isTxnSuccessful: h, handleTxnSuccess: G }, children: /* @__PURE__ */ n(U.Provider, { value: { isErrorMessage: p, handleErrorMessage: H }, children: /* @__PURE__ */ w("div", { className: "bw-w-full bw-relative bw-min-h-[610px] ", children: [
|
147
|
-
/* @__PURE__ */ n(K, { handleBack: P }),
|
148
|
-
/* @__PURE__ */ n("div", { className: "bw-mt-[-20px] ", children: /* @__PURE__ */ n(ee, {}) }),
|
149
|
-
e != null && e.isQuoteTimer ? /* @__PURE__ */ n(te, {}) : /* @__PURE__ */ n(A, {}),
|
150
|
-
/* @__PURE__ */ n("div", { className: "bw-flex bw-justify-between bw-items-center" }),
|
151
|
-
/* @__PURE__ */ w("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: [
|
152
|
-
/* @__PURE__ */ w("div", { className: "bw-w-[40%] md:bw-w-auto", children: [
|
153
|
-
/* @__PURE__ */ n("p", { className: "bw-text-xs bw-mb-1 bw-text-text-secondary bw-font-medium", children: "Send" }),
|
154
|
-
/* @__PURE__ */ n(L, { amount: e == null ? void 0 : e.amount, coinData: e.fromCoin, chainData: e.fromChain, field: "from" })
|
155
|
-
] }),
|
156
|
-
p ? /* @__PURE__ */ n("div", { className: "bw-border bw-mt-5 bw-w-[65px] bw-h-[65px] bw-flex bw-items-center bw-justify-center bw-rounded-[50%] bw-bg-background-container bw-relative bw-z-10 hover:bw-opacity-100 bw-border-border-primary ", children: ((k = e == null ? void 0 : e.statusData) == null ? void 0 : k.status) === "refunded" ? /* @__PURE__ */ n("img", { src: B, width: 33, height: 30, alt: "img" }) : /* @__PURE__ */ n("img", { src: q, width: 33, height: 30, alt: "img" }) }) : /* @__PURE__ */ n(V, { isTimerStarted: (e == null ? void 0 : e.isTimerStarted) || x, startTimer: I, error: p }),
|
157
|
-
/* @__PURE__ */ n("div", { className: "bw-w-full bw-z-0 md:bw-w-full bw-mt-5 bw-absolute bw-h-[1px] bw-bg-border-primary " }),
|
158
|
-
/* @__PURE__ */ w("div", { className: "bw-w-[40%] md:bw-w-auto", children: [
|
159
|
-
/* @__PURE__ */ n("p", { className: "bw-text-xs bw-mb-1 bw-text-text-secondary bw-font-medium", children: "Receive" }),
|
160
|
-
/* @__PURE__ */ n(L, { amount: Number(((j = e == null ? void 0 : e.route) == null ? void 0 : j.outputAmountDisplay) || ""), coinData: e == null ? void 0 : e.toCoin, chainData: e == null ? void 0 : e.toChain, field: "to" })
|
161
|
-
] })
|
162
|
-
] }),
|
163
|
-
/* @__PURE__ */ w("div", { className: "bw-h-[320px] bw-pr-1 bw-flex bw-flex-col bw-mt-8 bw-overflow-y-auto", children: [
|
164
|
-
T ? /* @__PURE__ */ n(A, {}) : /* @__PURE__ */ n(W, {}),
|
165
|
-
/* @__PURE__ */ n(X, { handleOpenExchange: t, setExchange: b, amount: r, startTimer: I, handleBack: P, isTimerStarted: (e == null ? void 0 : e.isTimerStarted) || x })
|
166
|
-
] })
|
167
|
-
] }) }) });
|
168
|
-
});
|
169
|
-
function we({
|
170
|
-
handleConfirmClose: t,
|
171
|
-
routesData: r,
|
172
|
-
amount: a,
|
173
|
-
resetAmount: f,
|
174
|
-
resetBalance: d,
|
175
|
-
handleStopRoute: b
|
176
|
-
}) {
|
177
|
-
const i = O();
|
178
|
-
v(() => {
|
179
|
-
var c, m;
|
180
|
-
!i.current && Number(
|
181
|
-
((c = i == null ? void 0 : i.current) == null ? void 0 : c.minOutputAmount) || ((m = i == null ? void 0 : i.current) == null ? void 0 : m.outputAmountDisplay)
|
182
|
-
) !== Number((r == null ? void 0 : r.minOutputAmount) || (r == null ? void 0 : r.outputAmountDisplay)) && (i.current = r);
|
183
|
-
}, [r]), v(() => {
|
184
|
-
b(!0);
|
185
|
-
}, []);
|
186
|
-
function e() {
|
187
|
-
b(!1), t(!1);
|
188
|
-
}
|
189
|
-
function u() {
|
190
|
-
t(!1);
|
191
|
-
}
|
192
|
-
return /* @__PURE__ */ n(
|
193
|
-
ne,
|
194
|
-
{
|
195
|
-
handleOpenExchange: e,
|
196
|
-
amount: a,
|
197
|
-
route: r,
|
198
|
-
resetAmount: f,
|
199
|
-
resetBalance: d,
|
200
|
-
setExchange: u
|
201
|
-
}
|
202
|
-
);
|
203
|
-
}
|
204
|
-
export {
|
205
|
-
we as default
|
206
|
-
};
|