@blockend/widget 1.0.53 → 1.0.55-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/{AllRoutes-D7SQ_djS.js → AllRoutes-D6S-NFxZ.js} +9 -9
- package/dist/{Box-eYBli8DE.js → Box-DESo1bHm.js} +6 -6
- package/dist/EstGas-Dy3XfCzY.js +1496 -0
- package/dist/{Grow-DIpP1jgy.js → Grow-DzEr7XrA.js} +2 -2
- package/dist/{InputComp-CqKp9s9s.js → InputComp-GcnDqx_s.js} +3 -3
- package/dist/{LoadRoute-U-YYy2K3.js → LoadRoute-BmUgvDid.js} +4 -4
- package/dist/{QuotesProgress-zqHV9NVn.js → QuotesProgress-E5JnUMS0.js} +1 -1
- package/dist/{SwapAsset-BELTzo8V.js → SwapAsset-MBXcdeBf.js} +1 -1
- package/dist/{Tooltip-DHYTtHrE.js → Tooltip-DSAJT2x7.js} +3 -3
- package/dist/TxnButton-Br8R19rF.js +215 -0
- package/dist/{add-BwIWDVOf.js → add-BryKCrpI.js} +1 -1
- package/dist/{all-wallets-BV7E6F_5.js → all-wallets-BMVOK2Ci.js} +1 -1
- package/dist/{app-store-YEMLMArP.js → app-store-3WurbJdI.js} +1 -1
- package/dist/{apple-CgQVpLw3.js → apple-eM872Ubz.js} +1 -1
- package/dist/{arrow-bottom-CRrVrT6a.js → arrow-bottom-HMc73fJ8.js} +1 -1
- package/dist/{arrow-bottom-circle-uSjT8Rwu.js → arrow-bottom-circle-B1N_R8Ux.js} +1 -1
- package/dist/{arrow-left-CCnLL3nn.js → arrow-left-Q7GAZkD7.js} +1 -1
- package/dist/{arrow-right-DlnbfdJg.js → arrow-right-ft3TcIM3.js} +1 -1
- package/dist/{arrow-top-D-LM7HS0.js → arrow-top-C2xmF6tK.js} +1 -1
- package/dist/{bank-a2jDISgY.js → bank-Bk-2ZR5E.js} +1 -1
- package/dist/{basic-BPGeEjKa.js → basic-CWrKgDAB.js} +3 -3
- package/dist/{browser-CkPcErHl.js → browser-BFB3TFfv.js} +1 -1
- package/dist/{card-D7wnivhY.js → card-DCx59si8.js} +1 -1
- package/dist/{ccip-CHcnnTPb.js → ccip-CXr08uP1.js} +16 -16
- package/dist/{checkmark-Cs2cMRQF.js → checkmark-BGsuJuhE.js} +1 -1
- package/dist/{checkmark-bold-CqH2C5X1.js → checkmark-bold-DvjIl-51.js} +1 -1
- package/dist/{chevron-bottom-DgUwkJku.js → chevron-bottom-DAEnG7QP.js} +1 -1
- package/dist/{chevron-left-BcVL0AJj.js → chevron-left-D33h2ppx.js} +1 -1
- package/dist/{chevron-right-B2gAVYyw.js → chevron-right-C8Z_feNK.js} +1 -1
- package/dist/{chevron-top-CbzTNOsN.js → chevron-top-DwDMd3p9.js} +1 -1
- package/dist/{chrome-store-ClqKW_b4.js → chrome-store-B7ZDs2Fj.js} +1 -1
- package/dist/{clock-CZ61HTR5.js → clock-DnELUxSR.js} +1 -1
- package/dist/{close-BK4LD1ho.js → close-Dnt29Pss.js} +1 -1
- package/dist/{coinPlaceholder-BV1cYtd2.js → coinPlaceholder-C09pzuXv.js} +1 -1
- package/dist/{compass-DBPni3SF.js → compass-D8ZY16nH.js} +1 -1
- package/dist/{copy-DtT5Ilfh.js → copy-DEh4RBKI.js} +1 -1
- package/dist/{core-DW1LfS8S.js → core-CgIQaiRa.js} +16 -17
- package/dist/{cursor-DFsOHbuU.js → cursor-BtzkAOER.js} +1 -1
- package/dist/{cursor-transparent-B1EDdNh4.js → cursor-transparent-B0nCflmb.js} +1 -1
- package/dist/{desktop-BSVZc50y.js → desktop-toTG92uH.js} +1 -1
- package/dist/{disconnect-viKgGwNY.js → disconnect-C97lbAtY.js} +1 -1
- package/dist/{discord-CbPDNoe9.js → discord-BNJ3JePY.js} +1 -1
- package/dist/{down-BdHOrfT4.js → down-BFx-Bg5Q.js} +2 -2
- package/dist/{etherscan-BzCPwNdI.js → etherscan-CK87TQMS.js} +1 -1
- package/dist/{exclamation-triangle-BLtYhryv.js → exclamation-triangle-LWnOk0uz.js} +1 -1
- package/dist/{extension-D51cnS_y.js → extension-5eIZU28A.js} +1 -1
- package/dist/{external-link-1EdliA4O.js → external-link-DDlCfigP.js} +1 -1
- package/dist/{facebook-CFlh7Dpj.js → facebook-1lTMXKeH.js} +1 -1
- package/dist/{farcaster-mcqUptUZ.js → farcaster-Di2TUKlZ.js} +1 -1
- package/dist/{filters-3wQB0cY5.js → filters-B_THnHaX.js} +1 -1
- package/dist/{getChainIds-BANkCOEE.js → getChainIds-CeLEUxe0.js} +69 -69
- package/dist/getCosmosAddress-B8s9Ycj4.js +6075 -0
- package/dist/{github-BZ6HjM3r.js → github-D5B1FE4K.js} +1 -1
- package/dist/{google-DDSxVvC_.js → google-C8_WSUfw.js} +1 -1
- package/dist/{hamburger-CzgucnXk.js → hamburger-BzMrQx9y.js} +5 -5
- package/dist/{help-circle-D5aDSl5K.js → help-circle-C-ZOzjAP.js} +1 -1
- package/dist/{id-CYNm8Iqt.js → id-BynpKmej.js} +1 -1
- package/dist/{image-CQMOZulk.js → image-BRYUh760.js} +1 -1
- package/dist/{index-C5kvo12a.js → index-A8ClQmZo.js} +1 -1
- package/dist/{index-3VdzF1gV.js → index-BFUVWgoD.js} +78 -78
- package/dist/{index-Df1lOqUE.js → index-BK0BZT6j.js} +2600 -2622
- package/dist/index-C5bv1F_u.js +48843 -0
- package/dist/{index-C1UDOLq9.js → index-CN6pVc2G.js} +233 -241
- package/dist/index-CZwuzz6v.js +6712 -0
- package/dist/{index-CEbOV6hy.js → index-DHYWnqST.js} +1 -1
- package/dist/{index-DMD0kcnG.js → index-Dnyeih-W.js} +884 -813
- package/dist/{index-DlGQW646.js → index-DpHhW0_2.js} +2 -2
- package/dist/{index-oTak4j0W.js → index-SkYFFVLL.js} +11 -11
- package/dist/index-krrwn6Pi.js +206 -0
- package/dist/{index.es-BhN1DTXX.js → index.es-DB9y_DEM.js} +1 -1
- package/dist/index.es-vIyUKt0W.js +13232 -0
- package/dist/index.es.js +3 -2
- package/dist/{info-jv27M7m3.js → info-DSQyHS8b.js} +1 -1
- package/dist/{info-circle-CUy7raCU.js → info-circle-BfpWcI4c.js} +1 -1
- package/dist/{lightbulb-Dg84wz9J.js → lightbulb-DEMYYsZd.js} +1 -1
- package/dist/{mail-BmvI1eEM.js → mail-DNZ2to_6.js} +1 -1
- package/dist/{mobile-nbT-f90s.js → mobile-qsyS8oMK.js} +1 -1
- package/dist/{more-D5N_--2B.js → more-CnBuKwll.js} +1 -1
- package/dist/{network-placeholder-Dqj58Jvo.js → network-placeholder-DhJITakA.js} +1 -1
- package/dist/{nftPlaceholder-CwRHJWFO.js → nftPlaceholder-DD3-Cc9U.js} +1 -1
- package/dist/{off-CbNfAER2.js → off-CBApAdDk.js} +1 -1
- package/dist/{play-store-S7vuVGZC.js → play-store-DDoeRc-b.js} +1 -1
- package/dist/{plus-Dm_WFpLs.js → plus-C3J-XWCn.js} +1 -1
- package/dist/{qr-code-C57hb-Nm.js → qr-code-CEoOYtHk.js} +1 -1
- package/dist/{recycle-horizontal-C5RQV_TS.js → recycle-horizontal-BHJ_s9Yx.js} +1 -1
- package/dist/{refresh-BkmZxxGf.js → refresh-CtzOoHls.js} +1 -1
- package/dist/{reown-logo-qD9cAPWZ.js → reown-logo-BOj4YDUQ.js} +1 -1
- package/dist/{search-REmhFYCv.js → search--Miza3A_.js} +1 -1
- package/dist/{send-BeT9MX93.js → send-Bhl1lz4j.js} +1 -1
- package/dist/{swapHorizontal-DOphmFlr.js → swapHorizontal-CCvKCngz.js} +1 -1
- package/dist/{swapHorizontalBold-AuZckFTe.js → swapHorizontalBold-B90V-dXL.js} +1 -1
- package/dist/{swapHorizontalMedium-O3G4LtoW.js → swapHorizontalMedium-CYjeHjnI.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-BTI3vDN8.js → swapHorizontalRoundedBold-DSMWeXdW.js} +1 -1
- package/dist/{swapVertical-C7PVGBzc.js → swapVertical-DOJUNIvk.js} +1 -1
- package/dist/{telegram-vQ5xN0Ac.js → telegram-CufEY_4d.js} +1 -1
- package/dist/{three-dots-Bfs9BhnJ.js → three-dots-J2ngva7G.js} +1 -1
- package/dist/{twitch-3OzmB49Y.js → twitch-B4vTKVf5.js} +1 -1
- package/dist/{twitterIcon-B5PBw26A.js → twitterIcon-DLrxpAGg.js} +1 -1
- package/dist/{unsupportedProp-CdKLbhlE.js → unsupportedProp-BLzY2-w_.js} +1 -1
- package/dist/{useRegisterError-DY4SqZO0.js → useRegisterError-Cf6oylnR.js} +1 -1
- package/dist/{verify-Rne5G5VT.js → verify-CbHqPQKs.js} +1 -1
- package/dist/{verify-filled-D7HTBXJf.js → verify-filled-CzKx9Cph.js} +1 -1
- package/dist/{w3m-modal-w8n6vImv.js → w3m-modal-DhpjK4cG.js} +2 -2
- package/dist/{wallet-a9Xlbfi8.js → wallet-CvIeO6On.js} +1 -1
- package/dist/{wallet-placeholder-BeGMf_JP.js → wallet-placeholder-BqELXTBj.js} +1 -1
- package/dist/{walletconnect-CnA6lXAN.js → walletconnect-BN4c4XQ5.js} +1 -1
- package/dist/{warning-circle-oQbNOUJk.js → warning-circle--dqxXujk.js} +1 -1
- package/dist/widget.css +1 -1
- package/dist/{x-0bdSPLtI.js → x-CkCp5gtL.js} +1 -1
- package/package.json +4 -2
- package/dist/EstGas-uPThONt-.js +0 -20281
- package/dist/TxnButton-CtczuoSf.js +0 -223
- package/dist/getCosmosAddress-BOA-n4al.js +0 -9566
- package/dist/index-B705NMZ_.js +0 -160
- package/dist/index-CmMHlKPv.js +0 -206
- package/dist/index-DTish3yr.js +0 -1014
- package/dist/index-DaSDqtx4.js +0 -30694
- package/dist/index.es-BjSHM6VO.js +0 -11678
package/dist/index-B705NMZ_.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-uPThONt-.js";
|
3
|
-
import { useState as q, useEffect as k } from "react";
|
4
|
-
import { d as we, i as be } from "./useRegisterError-DY4SqZO0.js";
|
5
|
-
import { u as c, l as ee, c as Z, F as ue } from "./index-DaSDqtx4.js";
|
6
|
-
import { useQuery as _ } from "@tanstack/react-query";
|
7
|
-
import "./down-BdHOrfT4.js";
|
8
|
-
import "wagmi";
|
9
|
-
import "@dynamic-labs/sdk-react-core";
|
10
|
-
import "./getCosmosAddress-BOA-n4al.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-CmMHlKPv.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-uPThONt-.js";
|
4
|
-
import { u as l, l as Y } from "./index-DaSDqtx4.js";
|
5
|
-
import { i as M, C as Q, A as Z } from "./useRegisterError-DY4SqZO0.js";
|
6
|
-
import { B as R } from "./Box-eYBli8DE.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
|
-
};
|