@blockend/widget 1.0.48-beta.0 → 1.0.49-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-D8LuuVmM.js → AllRoutes-SK8ZFq_x.js} +9 -9
- package/dist/{Box-DM9yFOex.js → Box-DAMq9mQT.js} +5 -5
- package/dist/EstGas-B9rFXiVW.js +1486 -0
- package/dist/{Grow-DOn6L3co.js → Grow-Qzfjlf_b.js} +2 -2
- package/dist/{InputComp-NuVHgaJr.js → InputComp-BUhhYfS_.js} +3 -3
- package/dist/{LoadRoute-B67KdzDM.js → LoadRoute-B9EnT59x.js} +4 -4
- package/dist/{QuotesProgress-QaDMFoy1.js → QuotesProgress-DMyLQ_Iw.js} +1 -1
- package/dist/{SwapAsset-DS1khTG7.js → SwapAsset-mgONO1Wh.js} +1 -1
- package/dist/{Tooltip-Ba3WFgGd.js → Tooltip-CCwWxndh.js} +15 -15
- package/dist/TxnButton-CqL_9AIV.js +211 -0
- package/dist/{add-q9Nf6prg.js → add-DgNWpTbE.js} +1 -1
- package/dist/{all-wallets-DPeT0Mif.js → all-wallets-DbLggbFH.js} +1 -1
- package/dist/{app-store-DN3WdWdo.js → app-store-BM-3bzwt.js} +1 -1
- package/dist/{apple-DyzMqifv.js → apple-DGgkQglq.js} +1 -1
- package/dist/{arrow-bottom-DqoHxj9Z.js → arrow-bottom-BCcsiVDf.js} +1 -1
- package/dist/{arrow-bottom-circle-gYCPf_-a.js → arrow-bottom-circle-BxnEnxCv.js} +1 -1
- package/dist/{arrow-left-BCb0WGCp.js → arrow-left-BajNw8Bo.js} +1 -1
- package/dist/{arrow-right-COFDKXwO.js → arrow-right-Kqyf83Ue.js} +1 -1
- package/dist/{arrow-top-A2hPO7gg.js → arrow-top-P0YZuCsS.js} +1 -1
- package/dist/{bank-DzMH-tSV.js → bank-BdBlTjok.js} +1 -1
- package/dist/{basic-C5wivloW.js → basic-B7dsMTNk.js} +3 -3
- package/dist/{browser-pBih3Y0E.js → browser-CiQFAZ4t.js} +1 -1
- package/dist/{card-CnPr5FkC.js → card-D94MFuQu.js} +1 -1
- package/dist/{ccip-Di_Zaa6h.js → ccip-vv5r0Apm.js} +11 -11
- package/dist/{checkmark-DuHkawx4.js → checkmark-Cucqq4L6.js} +1 -1
- package/dist/{checkmark-bold-CbTyGrPC.js → checkmark-bold-C5WgesjY.js} +1 -1
- package/dist/{chevron-bottom-ClujWrwS.js → chevron-bottom-CyfhotQQ.js} +1 -1
- package/dist/{chevron-left-Bk48p4Zx.js → chevron-left-CXJ7R3iS.js} +1 -1
- package/dist/{chevron-right-DNGloKKX.js → chevron-right-4ex-g3or.js} +1 -1
- package/dist/{chevron-top-BeF-AMWu.js → chevron-top-BDfgSTbr.js} +1 -1
- package/dist/{chrome-store-DbhS7z0N.js → chrome-store-CX9plHu3.js} +1 -1
- package/dist/{clock-C_6_l4to.js → clock-CtQPqpVc.js} +1 -1
- package/dist/{close-CSt1jFt2.js → close-CYlyCBrT.js} +1 -1
- package/dist/{coinPlaceholder-BCj1y0PN.js → coinPlaceholder-DS0YfqOM.js} +1 -1
- package/dist/{compass-BylNTlMa.js → compass-DVktgTZ-.js} +1 -1
- package/dist/{copy-B5chXsW-.js → copy-Bk0qGavv.js} +1 -1
- package/dist/{core-DMrbUYAd.js → core-DgJB3Qno.js} +3 -3
- package/dist/{cursor-DOai1hPO.js → cursor-CCqfxECm.js} +1 -1
- package/dist/{cursor-transparent-Cadcmy6E.js → cursor-transparent-CPbYJ9jd.js} +1 -1
- package/dist/{desktop-DCy_OF9q.js → desktop-DAykpsO7.js} +1 -1
- package/dist/{disconnect-d_9YI8yP.js → disconnect-DL8vRZg2.js} +1 -1
- package/dist/{discord-C5PncbsA.js → discord-BS8TPANA.js} +1 -1
- package/dist/{down-B0DJRPMS.js → down-D6aGpC9P.js} +2 -2
- package/dist/{etherscan-ClGwr9lW.js → etherscan-YSjUjqH5.js} +1 -1
- package/dist/{exclamation-triangle-UG68kEuv.js → exclamation-triangle-Cd8s_lsN.js} +1 -1
- package/dist/{extension-Bhr-Ssau.js → extension-BfYpl1LK.js} +1 -1
- package/dist/{external-link-BRJo7SZO.js → external-link-uF5MV_9t.js} +1 -1
- package/dist/{facebook-BnA-xxoO.js → facebook-DO648yaX.js} +1 -1
- package/dist/{farcaster-CvgpGB8R.js → farcaster-DZF64pQM.js} +1 -1
- package/dist/{filters-2DNvXC2d.js → filters-DMTGJi0Y.js} +1 -1
- package/dist/{getChainIds-BJOBostX.js → getChainIds-DUKOh0Kp.js} +2 -2
- package/dist/getCosmosAddress-Cb98patK.js +6075 -0
- package/dist/{github-CqCIZfoi.js → github-DQDrN0RZ.js} +1 -1
- package/dist/{google-Cb46Xe1N.js → google-DRrIdyFk.js} +1 -1
- package/dist/{hamburger-Cj81xHVG.js → hamburger-DFh0u4ls.js} +5 -5
- package/dist/{help-circle-BQm3Y4uL.js → help-circle-n5Ls2-2F.js} +1 -1
- package/dist/{id-DlZAWXhX.js → id-DbShnIoD.js} +1 -1
- package/dist/{image-C-Rdb3yG.js → image-B5YOEd-c.js} +1 -1
- package/dist/{index-CxxmgFkL.js → index-BC_WzIG-.js} +1 -1
- package/dist/index-BIN4LE_6.js +42277 -0
- package/dist/{index-CUDhfiq5.js → index-BwAuNUFT.js} +2600 -2622
- package/dist/{index-BKAQ3OTd.js → index-CDBWyjo1.js} +11 -11
- package/dist/{index-N4PNqcjR.js → index-CL2LZuVL.js} +2 -2
- package/dist/{index-DeBuj-lE.js → index-CktG1k9u.js} +1 -1
- package/dist/index-D4uRM0hD.js +3010 -0
- package/dist/index-DEecyVOZ.js +6711 -0
- package/dist/{index-BEianCH_.js → index-DuTB7F2j.js} +279 -306
- package/dist/{index-DD4yqUTK.js → index-DvR1iioL.js} +78 -78
- package/dist/index-VUJh-JIq.js +206 -0
- package/dist/{index.es-BkvYD6Tp.js → index.es-BRVISbr4.js} +2498 -2373
- package/dist/{index.es-DGhokHli.js → index.es-DD1q2x58.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{info-o_cb8tTT.js → info-5rQx4FCT.js} +1 -1
- package/dist/{info-circle-BweemjWa.js → info-circle-DnNqx9Fu.js} +1 -1
- package/dist/{lightbulb-CIREQKfQ.js → lightbulb-DEa_QXWk.js} +1 -1
- package/dist/{mail-D7pla8qN.js → mail-DNWPpemE.js} +1 -1
- package/dist/{mobile-BfSFqXTR.js → mobile-CsmBvAG0.js} +1 -1
- package/dist/{more-Cm2OZt-4.js → more-Bjd7dOWF.js} +1 -1
- package/dist/{network-placeholder-cja_SKEh.js → network-placeholder-DsQ_HMHG.js} +1 -1
- package/dist/{nftPlaceholder-CPMGC0YA.js → nftPlaceholder-KsQSrTt2.js} +1 -1
- package/dist/{off-2ov8-cMg.js → off-B0hqloiu.js} +1 -1
- package/dist/{play-store-K7jF5Tx9.js → play-store-DseAgFmo.js} +1 -1
- package/dist/{plus-D2hT5Tke.js → plus-BJCNDRM3.js} +1 -1
- package/dist/{qr-code-DdAcFtyy.js → qr-code-lEBAtsO4.js} +1 -1
- package/dist/{recycle-horizontal-C_hgDyOE.js → recycle-horizontal-K4rUQslN.js} +1 -1
- package/dist/{refresh-DmHZ_uHs.js → refresh-DEZrriLV.js} +1 -1
- package/dist/{reown-logo-C7Ew_uaV.js → reown-logo-BHbe-CUO.js} +1 -1
- package/dist/{search-DIQ1nJd8.js → search-CIK9XN0-.js} +1 -1
- package/dist/{send-oPtL6xIE.js → send-Bxpdb3Vf.js} +1 -1
- package/dist/{swapHorizontal-Csk-Etan.js → swapHorizontal-BBHEuYx1.js} +1 -1
- package/dist/{swapHorizontalBold-BcWknhY6.js → swapHorizontalBold-t0VsiN4I.js} +1 -1
- package/dist/{swapHorizontalMedium-DmNmthd2.js → swapHorizontalMedium-PzUH_Th4.js} +1 -1
- package/dist/{swapHorizontalRoundedBold-Cqili0jK.js → swapHorizontalRoundedBold-EyDyL2Bj.js} +1 -1
- package/dist/{swapVertical-CmQhV1BW.js → swapVertical-CusOd1Kd.js} +1 -1
- package/dist/{telegram-8VqDFrbM.js → telegram-DfP_Unfg.js} +1 -1
- package/dist/{three-dots-54YC22RW.js → three-dots-BcnJZFUd.js} +1 -1
- package/dist/{twitch-BG66DH8z.js → twitch-CN0F2VUn.js} +1 -1
- package/dist/{twitterIcon-B3TRjKnO.js → twitterIcon-DDA3Skm-.js} +1 -1
- package/dist/{unsupportedProp-DxJPUr4X.js → unsupportedProp-CIQ48Cx8.js} +1 -1
- package/dist/useRegisterError-DuNi8RxR.js +8812 -0
- package/dist/{verify-Cxrk9OZf.js → verify-BVsIUy32.js} +1 -1
- package/dist/{verify-filled-DTYh5fHd.js → verify-filled-bQ1f0Y-d.js} +1 -1
- package/dist/{w3m-modal-BtzAU8Rd.js → w3m-modal-Cg8vnNGL.js} +2 -2
- package/dist/{wallet-CqHzy9UL.js → wallet-OISOAGe9.js} +1 -1
- package/dist/{wallet-placeholder-DUpL8Wi-.js → wallet-placeholder-DZD3tMxc.js} +1 -1
- package/dist/{walletconnect-CMShOjhI.js → walletconnect-CCANKmqY.js} +1 -1
- package/dist/{warning-circle-C-6BUTdg.js → warning-circle-C_uh-wB2.js} +1 -1
- package/dist/{x-Bs3i9yGj.js → x-BpuzG7VO.js} +1 -1
- package/package.json +3 -5
- package/dist/EstGas-BeT31S57.js +0 -13644
- package/dist/TxnButton-tr4Dz_jE.js +0 -223
- package/dist/getCosmosAddress-nYlLagxO.js +0 -8398
- package/dist/index-BJtXFuWZ.js +0 -160
- package/dist/index-CPAph-rb.js +0 -206
- package/dist/index-DQ-upUtl.js +0 -85050
- package/dist/index-eC9_VgZe.js +0 -3183
- package/dist/useRegisterError-RP3LuUvG.js +0 -8913
package/dist/index-BJtXFuWZ.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-BeT31S57.js";
|
3
|
-
import { useState as q, useEffect as F } from "react";
|
4
|
-
import { d as we, i as be } from "./useRegisterError-RP3LuUvG.js";
|
5
|
-
import { u as c, l as ee, c as Z, E as ue } from "./index-DQ-upUtl.js";
|
6
|
-
import { useQuery as _ } from "@tanstack/react-query";
|
7
|
-
import "./down-B0DJRPMS.js";
|
8
|
-
import "wagmi";
|
9
|
-
import "@dynamic-labs/sdk-react-core";
|
10
|
-
import "./getCosmosAddress-nYlLagxO.js";
|
11
|
-
import "@dynamic-labs/solana";
|
12
|
-
function le({ details: k }) {
|
13
|
-
var T, N, I, w, d, p, E, b, u, D, t;
|
14
|
-
const a = {
|
15
|
-
route: {
|
16
|
-
...k
|
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
|
-
(E = a == null ? void 0 : a.route) == null ? void 0 : E.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 = (D = a == null ? void 0 : a.route) == null ? void 0 : D.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 k = c((r) => r.setRoute), a = c((r) => r.txnDetails), [m, T] = q(!1), [N, I] = q(!1), [w, d] = q(!1), [p, E] = q({}), b = c((r) => r.setPersist), u = c((r) => r.persist);
|
60
|
-
we();
|
61
|
-
const { txnupdate: D } = 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
|
-
F(() => {
|
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]), F(() => {
|
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
|
-
F(() => {
|
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
|
-
E(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
|
-
k("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: D, 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-CPAph-rb.js
DELETED
@@ -1,206 +0,0 @@
|
|
1
|
-
import { jsxs as b, jsx as n, Fragment as A } from "react/jsx-runtime";
|
2
|
-
import G, { useContext as H, useState as E, useEffect as v, useRef as _ } from "react";
|
3
|
-
import { a as U, T as $, H as O, b as L, c as J, E as K, d as V } from "./EstGas-BeT31S57.js";
|
4
|
-
import { u as l, l as W } from "./index-DQ-upUtl.js";
|
5
|
-
import { i as D, C as Q, A as X } from "./useRegisterError-RP3LuUvG.js";
|
6
|
-
import { B as Y } from "./Box-DM9yFOex.js";
|
7
|
-
function Z() {
|
8
|
-
var d, w, 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 } = D;
|
10
|
-
let f = (i = (w = (d = t == null ? void 0 : t.route) == null ? void 0 : d.providerDetails) == null ? void 0 : w.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 W.isEmpty(t.route) ? /* @__PURE__ */ n(A, {}) : /* @__PURE__ */ b("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__ */ b("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__ */ b("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__ */ b("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 R() {
|
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 } = H(U), d = Math.floor(((/* @__PURE__ */ new Date()).getTime() - r.quoteStartTime) / 1e3);
|
44
|
-
let w = ((u = r == null ? void 0 : r.route) == null ? void 0 : u.deadline) || 60;
|
45
|
-
const [i, e] = E(w);
|
46
|
-
return v(() => {
|
47
|
-
d && e(w - 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__ */ b("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__ */ b("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__ */ b(
|
66
|
-
Y,
|
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 / w * 100,
|
92
|
-
sx: {
|
93
|
-
"svg circle": { stroke: "url(#linearColors)" },
|
94
|
-
position: "absolute",
|
95
|
-
left: 0,
|
96
|
-
[`& .${X.circle}`]: {
|
97
|
-
strokeLinecap: "round"
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
)
|
102
|
-
]
|
103
|
-
}
|
104
|
-
)
|
105
|
-
] }) : /* @__PURE__ */ n(A, {});
|
106
|
-
}
|
107
|
-
const ee = G.memo(function({ handleOpenExchange: t, amount: r, route: a, resetAmount: f, resetBalance: d, setExchange: w }) {
|
108
|
-
var k;
|
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: M } = D;
|
110
|
-
v(() => {
|
111
|
-
var o, j, z, 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 = (z = (j = l) == null ? void 0 : j.getState()) == null ? void 0 : z.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 q(o) {
|
138
|
-
y(o);
|
139
|
-
}
|
140
|
-
function B(o) {
|
141
|
-
C(o);
|
142
|
-
}
|
143
|
-
function P() {
|
144
|
-
t(), i({}), h && d();
|
145
|
-
}
|
146
|
-
return /* @__PURE__ */ n($.Provider, { value: { isTxnSuccessful: h, handleTxnSuccess: q }, children: /* @__PURE__ */ n(U.Provider, { value: { isErrorMessage: p, handleErrorMessage: B }, children: /* @__PURE__ */ b("div", { className: "bw-w-full bw-relative bw-min-h-[610px] ", children: [
|
147
|
-
/* @__PURE__ */ n(O, { handleBack: P }),
|
148
|
-
/* @__PURE__ */ n("div", { className: "bw-mt-[-20px] ", children: /* @__PURE__ */ n(Z, {}) }),
|
149
|
-
e != null && e.isQuoteTimer ? /* @__PURE__ */ n(R, {}) : /* @__PURE__ */ n(A, {}),
|
150
|
-
/* @__PURE__ */ n("div", { className: "bw-flex bw-justify-between bw-items-center" }),
|
151
|
-
/* @__PURE__ */ b("div", { className: "bw-flex bw-w-full bw-mt-4 bw-justify-between bw-items-center", children: [
|
152
|
-
/* @__PURE__ */ b("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: /* @__PURE__ */ n("img", { src: M, width: 33, height: 30, alt: "img" }) }) : /* @__PURE__ */ n(J, { 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__ */ b("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(((k = e == null ? void 0 : e.route) == null ? void 0 : k.outputAmountDisplay) || ""), coinData: e == null ? void 0 : e.toCoin, chainData: e == null ? void 0 : e.toChain, field: "to" })
|
161
|
-
] })
|
162
|
-
] }),
|
163
|
-
/* @__PURE__ */ b("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(K, {}),
|
165
|
-
/* @__PURE__ */ n(V, { handleOpenExchange: t, setExchange: w, amount: r, startTimer: I, handleBack: P, isTimerStarted: (e == null ? void 0 : e.isTimerStarted) || x })
|
166
|
-
] })
|
167
|
-
] }) }) });
|
168
|
-
});
|
169
|
-
function le({
|
170
|
-
handleConfirmClose: t,
|
171
|
-
routesData: r,
|
172
|
-
amount: a,
|
173
|
-
resetAmount: f,
|
174
|
-
resetBalance: d,
|
175
|
-
handleStopRoute: w
|
176
|
-
}) {
|
177
|
-
const i = _();
|
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
|
-
w(!0);
|
185
|
-
}, []);
|
186
|
-
function e() {
|
187
|
-
w(!1), t(!1);
|
188
|
-
}
|
189
|
-
function u() {
|
190
|
-
t(!1);
|
191
|
-
}
|
192
|
-
return /* @__PURE__ */ n(
|
193
|
-
ee,
|
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
|
-
le as default
|
206
|
-
};
|