@nowramp/form 0.1.71 → 0.1.73
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +263 -269
- package/dist/index.js.map +1 -1
- package/dist/nowramp-form.iife.js +1 -1
- package/dist/nowramp-form.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,57 +9,57 @@
|
|
|
9
9
|
document.head.appendChild(s);
|
|
10
10
|
})();
|
|
11
11
|
import { jsx as e, jsxs as o, Fragment as J } from "react/jsx-runtime";
|
|
12
|
-
import ve, { useState as v, useRef as
|
|
12
|
+
import ve, { useState as v, useRef as I, useCallback as B, useEffect as W, useMemo as Y, useReducer as ua, useContext as ma, createContext as fa } from "react";
|
|
13
13
|
import { RampApi as Qe } from "@nowramp/sdk";
|
|
14
14
|
import { createPortal as Ut } from "react-dom";
|
|
15
15
|
function ha(t, a, n) {
|
|
16
|
-
const [r, i] = v(null), [c, m] = v(!0), [s,
|
|
16
|
+
const [r, i] = v(null), [c, m] = v(!0), [s, u] = v(null), f = I(null);
|
|
17
17
|
(!f.current || f.current !== t) && (f.current = new Qe({ apiKey: "", ...t }));
|
|
18
|
-
const h =
|
|
18
|
+
const h = B(async () => {
|
|
19
19
|
if (!t.projectId) {
|
|
20
|
-
|
|
20
|
+
u(new Error("projectId is required")), m(!1);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
m(!0),
|
|
23
|
+
m(!0), u(null);
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
26
|
-
a && (
|
|
27
|
-
const p = await f.current.getSupported(
|
|
25
|
+
const d = {};
|
|
26
|
+
a && (d.orderType = a), n && (d.country = n);
|
|
27
|
+
const p = await f.current.getSupported(d);
|
|
28
28
|
i(p);
|
|
29
|
-
} catch (
|
|
30
|
-
d
|
|
29
|
+
} catch (d) {
|
|
30
|
+
u(d instanceof Error ? d : new Error("Failed to fetch config"));
|
|
31
31
|
} finally {
|
|
32
32
|
m(!1);
|
|
33
33
|
}
|
|
34
34
|
}, [t.projectId, a, n]);
|
|
35
|
-
return
|
|
35
|
+
return W(() => {
|
|
36
36
|
h();
|
|
37
37
|
}, [h]), { config: r, loading: c, error: s, refetch: h };
|
|
38
38
|
}
|
|
39
39
|
function pa(t, a) {
|
|
40
|
-
const [n, r] = v(null), [i, c] = v(!1), [m, s] = v(null),
|
|
41
|
-
(!
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const g = ++
|
|
40
|
+
const [n, r] = v(null), [i, c] = v(!1), [m, s] = v(null), u = I(null), f = I(""), h = `${t.apiUrl}|${t.projectId}`;
|
|
41
|
+
(!u.current || f.current !== h) && (u.current = new Qe({ apiKey: "", ...t }), f.current = h);
|
|
42
|
+
const d = I(0);
|
|
43
|
+
W(() => {
|
|
44
|
+
const g = ++d.current;
|
|
45
45
|
if (!a || !t.projectId) {
|
|
46
46
|
r(null), c(!1);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
c(!0), s(null),
|
|
49
|
+
c(!0), s(null), u.current.getQuotes(a).then(
|
|
50
50
|
(A) => {
|
|
51
|
-
|
|
51
|
+
d.current === g && (r(A), c(!1));
|
|
52
52
|
},
|
|
53
53
|
(A) => {
|
|
54
|
-
|
|
54
|
+
d.current === g && (s(A instanceof Error ? A : new Error("Failed to fetch quotes")), r(null), c(!1));
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}, [t.projectId, a == null ? void 0 : a.fiatCurrency, a == null ? void 0 : a.fiatAmount, a == null ? void 0 : a.cryptoAmount, a == null ? void 0 : a.cryptoCurrency, a == null ? void 0 : a.network, a == null ? void 0 : a.paymentMethodId, a == null ? void 0 : a.country, a == null ? void 0 : a.orderType]);
|
|
58
|
-
const p =
|
|
58
|
+
const p = B(async () => {
|
|
59
59
|
if (!(!a || !t.projectId)) {
|
|
60
60
|
c(!0), s(null);
|
|
61
61
|
try {
|
|
62
|
-
const g = await
|
|
62
|
+
const g = await u.current.getQuotes(a);
|
|
63
63
|
r(g);
|
|
64
64
|
} catch (g) {
|
|
65
65
|
s(g instanceof Error ? g : new Error("Failed to fetch quotes"));
|
|
@@ -71,9 +71,9 @@ function pa(t, a) {
|
|
|
71
71
|
return { quotes: n, loading: i, error: m, refetch: p };
|
|
72
72
|
}
|
|
73
73
|
function ya(t) {
|
|
74
|
-
const [a, n] = v(null), [r, i] = v(!1), [c, m] = v(null), s =
|
|
75
|
-
(!s.current ||
|
|
76
|
-
const h =
|
|
74
|
+
const [a, n] = v(null), [r, i] = v(!1), [c, m] = v(null), s = I(null), u = I(""), f = `${t.apiUrl}|${t.projectId}`;
|
|
75
|
+
(!s.current || u.current !== f) && (s.current = new Qe({ apiKey: "", ...t }), u.current = f);
|
|
76
|
+
const h = B(async (p) => {
|
|
77
77
|
i(!0), m(null);
|
|
78
78
|
try {
|
|
79
79
|
const g = await s.current.createCheckoutIntent(p);
|
|
@@ -84,36 +84,36 @@ function ya(t) {
|
|
|
84
84
|
} finally {
|
|
85
85
|
i(!1);
|
|
86
86
|
}
|
|
87
|
-
}, []),
|
|
87
|
+
}, []), d = B(() => {
|
|
88
88
|
n(null), m(null);
|
|
89
89
|
}, []);
|
|
90
|
-
return { order: a, loading: r, error: c, createOrder: h, reset:
|
|
90
|
+
return { order: a, loading: r, error: c, createOrder: h, reset: d };
|
|
91
91
|
}
|
|
92
92
|
function xa(t, a, n) {
|
|
93
|
-
const [r, i] = v(null), [c, m] = v(!1), [s,
|
|
93
|
+
const [r, i] = v(null), [c, m] = v(!1), [s, u] = v(null), f = I(null);
|
|
94
94
|
f.current || (f.current = new Qe({ apiKey: "", projectId: "", ...t }));
|
|
95
|
-
const h =
|
|
95
|
+
const h = B(async () => {
|
|
96
96
|
if (a) {
|
|
97
|
-
m(!0),
|
|
97
|
+
m(!0), u(null);
|
|
98
98
|
try {
|
|
99
|
-
const
|
|
100
|
-
i(
|
|
101
|
-
} catch (
|
|
102
|
-
d
|
|
99
|
+
const d = await f.current.getTransaction(a);
|
|
100
|
+
i(d);
|
|
101
|
+
} catch (d) {
|
|
102
|
+
u(d instanceof Error ? d : new Error("Failed to fetch status"));
|
|
103
103
|
} finally {
|
|
104
104
|
m(!1);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}, [a]);
|
|
108
|
-
return
|
|
108
|
+
return W(() => {
|
|
109
109
|
if (!a) return;
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
const p = setTimeout(h,
|
|
110
|
+
const d = (n == null ? void 0 : n.initialDelay) ?? 0;
|
|
111
|
+
if (d > 0) {
|
|
112
|
+
const p = setTimeout(h, d);
|
|
113
113
|
return () => clearTimeout(p);
|
|
114
114
|
}
|
|
115
115
|
h();
|
|
116
|
-
}, [h, a, n == null ? void 0 : n.initialDelay]),
|
|
116
|
+
}, [h, a, n == null ? void 0 : n.initialDelay]), W(() => {
|
|
117
117
|
if (!a || !(n != null && n.pollInterval) || !r || ["completed", "failed", "cancelled", "expired", "refunded"].includes(r.status))
|
|
118
118
|
return;
|
|
119
119
|
const p = setInterval(h, n.pollInterval);
|
|
@@ -413,19 +413,19 @@ function Ca({
|
|
|
413
413
|
brandId: c,
|
|
414
414
|
defaultFiatCurrency: m = "USD",
|
|
415
415
|
defaultCryptoCurrency: s = "BTC",
|
|
416
|
-
defaultNetwork:
|
|
416
|
+
defaultNetwork: u = "",
|
|
417
417
|
defaultFiatAmount: f = "",
|
|
418
418
|
defaultCryptoAmount: h = "",
|
|
419
|
-
defaultWalletAddress:
|
|
419
|
+
defaultWalletAddress: d = "",
|
|
420
420
|
defaultGateway: p,
|
|
421
421
|
defaultCountry: g,
|
|
422
422
|
fieldLocks: A,
|
|
423
423
|
statusPollInterval: E = 5e3,
|
|
424
424
|
onComplete: R,
|
|
425
|
-
onError:
|
|
425
|
+
onError: P,
|
|
426
426
|
children: ne
|
|
427
427
|
}) {
|
|
428
|
-
const V = Y(() => ({ apiUrl: a, projectId: t }), [a, t]), Z =
|
|
428
|
+
const V = Y(() => ({ apiUrl: a, projectId: t }), [a, t]), Z = u || (s ? s.toLowerCase() : ""), q = r === "sell", G = q ? !!h : !!f, y = (q ? !!(G && s && Z) : !!(G && s && Z && d)) && p ? "confirm" : "amount", L = f || (r === "buy" ? "250" : ""), [l, M] = ua(ga, {
|
|
429
429
|
...Vt,
|
|
430
430
|
step: y,
|
|
431
431
|
flowType: r,
|
|
@@ -434,7 +434,7 @@ function Ca({
|
|
|
434
434
|
network: Z,
|
|
435
435
|
fiatAmount: Dt(L, 2),
|
|
436
436
|
cryptoAmount: Dt(h, 6),
|
|
437
|
-
walletAddress:
|
|
437
|
+
walletAddress: d,
|
|
438
438
|
customerId: i,
|
|
439
439
|
// If defaultCountry is provided, set it immediately with 'manual' source to skip auto-detection
|
|
440
440
|
...g ? { country: g.toLowerCase(), countrySource: "manual" } : {}
|
|
@@ -442,7 +442,7 @@ function Ca({
|
|
|
442
442
|
config: S,
|
|
443
443
|
loading: he,
|
|
444
444
|
error: pe
|
|
445
|
-
} = ha(V, l.flowType, l.country || void 0), ye =
|
|
445
|
+
} = ha(V, l.flowType, l.country || void 0), ye = I(!1);
|
|
446
446
|
ve.useEffect(() => {
|
|
447
447
|
var D;
|
|
448
448
|
if (ye.current || !(S != null && S.detectedCountry) || l.country) return;
|
|
@@ -452,7 +452,7 @@ function Ca({
|
|
|
452
452
|
const b = (D = S.fiats) == null ? void 0 : D.map((F) => F.code), U = ot(C, b);
|
|
453
453
|
U !== l.fiatCurrency && M({ type: "SET_FIAT_CURRENCY", currency: U });
|
|
454
454
|
}, [S, l.country, l.fiatCurrency]);
|
|
455
|
-
const ie =
|
|
455
|
+
const ie = I(!1);
|
|
456
456
|
ve.useEffect(() => {
|
|
457
457
|
var U;
|
|
458
458
|
if (ie.current || !g || !((U = S == null ? void 0 : S.fiats) != null && U.length)) return;
|
|
@@ -460,7 +460,7 @@ function Ca({
|
|
|
460
460
|
const C = S.fiats.map((D) => D.code), b = ot(g, C);
|
|
461
461
|
b !== l.fiatCurrency && M({ type: "SET_FIAT_CURRENCY", currency: b });
|
|
462
462
|
}, [g, S, l.fiatCurrency]);
|
|
463
|
-
const se =
|
|
463
|
+
const se = I(l.country);
|
|
464
464
|
ve.useEffect(() => {
|
|
465
465
|
var U;
|
|
466
466
|
if (l.country === se.current || (se.current = l.country, l.countrySource !== "manual") || !((U = S == null ? void 0 : S.fiats) != null && U.length)) return;
|
|
@@ -469,20 +469,20 @@ function Ca({
|
|
|
469
469
|
}, [l.country, l.countrySource, S, l.fiatCurrency]), ve.useEffect(() => {
|
|
470
470
|
var U, D, F;
|
|
471
471
|
if (!S || !l.cryptoCurrency || l.network) return;
|
|
472
|
-
const C = (U = S.cryptos) == null ? void 0 : U.find((
|
|
472
|
+
const C = (U = S.cryptos) == null ? void 0 : U.find(($) => $.code === l.cryptoCurrency), b = ((D = C == null ? void 0 : C.networks) == null ? void 0 : D.find(($) => $.isDefault)) || ((F = C == null ? void 0 : C.networks) == null ? void 0 : F[0]);
|
|
473
473
|
b != null && b.id && M({ type: "SET_NETWORK", network: b.id });
|
|
474
474
|
}, [S, l.cryptoCurrency, l.network]), ve.useEffect(() => {
|
|
475
|
-
var F,
|
|
475
|
+
var F, $;
|
|
476
476
|
if (!((F = S == null ? void 0 : S.paymentMethods) != null && F.length)) return;
|
|
477
477
|
const C = l.fiatCurrency, b = S.paymentMethods;
|
|
478
478
|
if (l.paymentMethodId && b.some(
|
|
479
|
-
(
|
|
479
|
+
(K) => K.id === l.paymentMethodId && K.supportedFiats.includes(C)
|
|
480
480
|
))
|
|
481
481
|
return;
|
|
482
482
|
const D = b.find(
|
|
483
483
|
(Q) => Q.supportedFiats.includes(C) && (Q.id.includes("card") || Q.id.includes("debit"))
|
|
484
484
|
) || b.find((Q) => Q.supportedFiats.includes(C));
|
|
485
|
-
M({ type: "SET_PAYMENT_METHOD", methodId: (D == null ? void 0 : D.id) || ((
|
|
485
|
+
M({ type: "SET_PAYMENT_METHOD", methodId: (D == null ? void 0 : D.id) || (($ = b[0]) == null ? void 0 : $.id) || "" });
|
|
486
486
|
}, [S, l.fiatCurrency, l.paymentMethodId]);
|
|
487
487
|
const k = Y(() => {
|
|
488
488
|
if (w) {
|
|
@@ -516,7 +516,7 @@ function Ca({
|
|
|
516
516
|
} = pa(V, be), {
|
|
517
517
|
order: de,
|
|
518
518
|
loading: xe,
|
|
519
|
-
error:
|
|
519
|
+
error: O,
|
|
520
520
|
createOrder: we
|
|
521
521
|
} = ya(V), _e = 15e3, {
|
|
522
522
|
status: ee,
|
|
@@ -529,16 +529,16 @@ function Ca({
|
|
|
529
529
|
ve.useEffect(() => {
|
|
530
530
|
(ee == null ? void 0 : ee.status) === "completed" && R && R(ee);
|
|
531
531
|
}, [ee == null ? void 0 : ee.status, R]), ve.useEffect(() => {
|
|
532
|
-
const C = pe ||
|
|
533
|
-
C &&
|
|
534
|
-
}, [pe,
|
|
535
|
-
const Fe = p || (S == null ? void 0 : S.defaultGateway) || null, Me =
|
|
532
|
+
const C = pe || O;
|
|
533
|
+
C && P && P(C);
|
|
534
|
+
}, [pe, O, P]);
|
|
535
|
+
const Fe = p || (S == null ? void 0 : S.defaultGateway) || null, Me = I(Fe);
|
|
536
536
|
Me.current = Fe;
|
|
537
|
-
const Ae =
|
|
537
|
+
const Ae = I(j);
|
|
538
538
|
Ae.current = j;
|
|
539
|
-
const Re =
|
|
539
|
+
const Re = I(c);
|
|
540
540
|
Re.current = c;
|
|
541
|
-
const ze =
|
|
541
|
+
const ze = B(async () => {
|
|
542
542
|
var b, U, D;
|
|
543
543
|
const C = ((b = l.selectedQuote) == null ? void 0 : b.gatewayId) || ((D = (U = Ae.current) == null ? void 0 : U.bestQuote) == null ? void 0 : D.gatewayId) || Me.current;
|
|
544
544
|
if (!C || !l.walletAddress) {
|
|
@@ -561,12 +561,12 @@ function Ca({
|
|
|
561
561
|
...Re.current ? { metadata: { brand: Re.current } } : {}
|
|
562
562
|
}), M({ type: "SET_STEP", step: "checkout" });
|
|
563
563
|
} catch (F) {
|
|
564
|
-
const
|
|
565
|
-
/wallet|address/i.test(
|
|
564
|
+
const $ = F instanceof Error ? F.message : "Failed to create order";
|
|
565
|
+
/wallet|address/i.test($) ? M({ type: "SET_WALLET_ERROR", message: $.replace(/^Failed to create checkout intent:\s*/i, "") }) : M({ type: "SET_ERROR", message: $ });
|
|
566
566
|
}
|
|
567
|
-
}, [l, we, w]), ge =
|
|
567
|
+
}, [l, we, w]), ge = B((C) => {
|
|
568
568
|
M({ type: "SET_STEP", step: C });
|
|
569
|
-
}, []), Ie =
|
|
569
|
+
}, []), Ie = B(() => {
|
|
570
570
|
const C = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], b = C.indexOf(l.step);
|
|
571
571
|
b > 0 && M({ type: "SET_STEP", step: C[b - 1] });
|
|
572
572
|
}, [l.step, w]), Je = Y(() => {
|
|
@@ -597,7 +597,7 @@ function Ca({
|
|
|
597
597
|
fetchQuotes: Ee,
|
|
598
598
|
order: de,
|
|
599
599
|
orderLoading: xe,
|
|
600
|
-
orderError:
|
|
600
|
+
orderError: O,
|
|
601
601
|
createOrder: ze,
|
|
602
602
|
orderStatus: ee,
|
|
603
603
|
orderStatusLoading: Ve,
|
|
@@ -1110,11 +1110,9 @@ function Wt({
|
|
|
1110
1110
|
className: r = "",
|
|
1111
1111
|
background: i
|
|
1112
1112
|
}) {
|
|
1113
|
-
const [c, m] = v(!1), [s,
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}, [t]);
|
|
1117
|
-
const f = I(() => m(!0), []), h = I(() => d(!0), []);
|
|
1113
|
+
const [c, m] = v(!1), [s, u] = v(!1), f = I(t);
|
|
1114
|
+
f.current !== t && (f.current = t, m(!1), u(!1));
|
|
1115
|
+
const h = B(() => m(!0), []), d = B(() => u(!0), []);
|
|
1118
1116
|
return /* @__PURE__ */ o(
|
|
1119
1117
|
"div",
|
|
1120
1118
|
{
|
|
@@ -1146,9 +1144,8 @@ function Wt({
|
|
|
1146
1144
|
alt: a,
|
|
1147
1145
|
width: n,
|
|
1148
1146
|
height: n,
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
onError: h,
|
|
1147
|
+
onLoad: h,
|
|
1148
|
+
onError: d,
|
|
1152
1149
|
className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
|
|
1153
1150
|
style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
|
|
1154
1151
|
}
|
|
@@ -1480,9 +1477,9 @@ function Ka({
|
|
|
1480
1477
|
redirectDelay: n = 3e3
|
|
1481
1478
|
}) {
|
|
1482
1479
|
var p;
|
|
1483
|
-
const { order: r, orderStatus: i, goToStep: c, goBack: m } = Ue(), [s,
|
|
1484
|
-
if (
|
|
1485
|
-
if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !
|
|
1480
|
+
const { order: r, orderStatus: i, goToStep: c, goBack: m } = Ue(), [s, u] = v(!1), [f, h] = v(null), d = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
|
|
1481
|
+
if (W(() => {
|
|
1482
|
+
if ((r == null ? void 0 : r.checkout.method) === "redirect" && a && !d) {
|
|
1486
1483
|
h(Math.ceil(n / 1e3));
|
|
1487
1484
|
const g = setTimeout(() => {
|
|
1488
1485
|
window.location.href = r.checkout.url;
|
|
@@ -1493,7 +1490,7 @@ function Ka({
|
|
|
1493
1490
|
clearTimeout(g), clearInterval(A);
|
|
1494
1491
|
};
|
|
1495
1492
|
}
|
|
1496
|
-
}, [r, a, n,
|
|
1493
|
+
}, [r, a, n, d]), W(() => {
|
|
1497
1494
|
i && (i.status === "completed" ? c("complete") : ["failed", "cancelled", "expired"].includes(i.status) && c("error"));
|
|
1498
1495
|
}, [i == null ? void 0 : i.status, c]), !r)
|
|
1499
1496
|
return /* @__PURE__ */ o(
|
|
@@ -1522,7 +1519,7 @@ function Ka({
|
|
|
1522
1519
|
]
|
|
1523
1520
|
}
|
|
1524
1521
|
);
|
|
1525
|
-
if (
|
|
1522
|
+
if (d)
|
|
1526
1523
|
return /* @__PURE__ */ o(
|
|
1527
1524
|
"div",
|
|
1528
1525
|
{
|
|
@@ -1629,7 +1626,7 @@ function Ka({
|
|
|
1629
1626
|
border: "none"
|
|
1630
1627
|
},
|
|
1631
1628
|
allow: A,
|
|
1632
|
-
onLoad: () =>
|
|
1629
|
+
onLoad: () => u(!0),
|
|
1633
1630
|
title: "Provider Checkout"
|
|
1634
1631
|
}
|
|
1635
1632
|
)
|
|
@@ -1777,7 +1774,7 @@ function Ka({
|
|
|
1777
1774
|
border: "none"
|
|
1778
1775
|
},
|
|
1779
1776
|
allow: "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share",
|
|
1780
|
-
onLoad: () =>
|
|
1777
|
+
onLoad: () => u(!0),
|
|
1781
1778
|
title: "Payment Checkout"
|
|
1782
1779
|
}
|
|
1783
1780
|
)
|
|
@@ -1823,7 +1820,7 @@ function _a(t, a) {
|
|
|
1823
1820
|
}
|
|
1824
1821
|
function Va({ className: t = "" }) {
|
|
1825
1822
|
const { orderStatus: a, orderStatusLoading: n, goToStep: r } = Ue();
|
|
1826
|
-
|
|
1823
|
+
W(() => {
|
|
1827
1824
|
a && (a.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(a.status) && r("error"));
|
|
1828
1825
|
}, [a == null ? void 0 : a.status, r]);
|
|
1829
1826
|
const i = () => {
|
|
@@ -1900,10 +1897,10 @@ function ja({
|
|
|
1900
1897
|
onDone: n,
|
|
1901
1898
|
doneButtonText: r = "Done"
|
|
1902
1899
|
}) {
|
|
1903
|
-
const { orderStatus: i, state: c, dispatch: m } = Ue(), s = c.flowType === "sell",
|
|
1900
|
+
const { orderStatus: i, state: c, dispatch: m } = Ue(), s = c.flowType === "sell", u = () => {
|
|
1904
1901
|
if (!(i != null && i.transactionHash)) return null;
|
|
1905
1902
|
if (!a) {
|
|
1906
|
-
const
|
|
1903
|
+
const d = {
|
|
1907
1904
|
ethereum: "https://etherscan.io/tx/{txHash}",
|
|
1908
1905
|
polygon: "https://polygonscan.com/tx/{txHash}",
|
|
1909
1906
|
arbitrum: "https://arbiscan.io/tx/{txHash}",
|
|
@@ -1914,12 +1911,12 @@ function ja({
|
|
|
1914
1911
|
avalanche: "https://snowtrace.io/tx/{txHash}",
|
|
1915
1912
|
fantom: "https://ftmscan.com/tx/{txHash}"
|
|
1916
1913
|
};
|
|
1917
|
-
return (
|
|
1914
|
+
return (d[c.network] || d.ethereum).replace("{txHash}", i.transactionHash);
|
|
1918
1915
|
}
|
|
1919
1916
|
return a.replace("{txHash}", i.transactionHash);
|
|
1920
1917
|
}, f = () => {
|
|
1921
1918
|
n ? n() : m({ type: "RESET" });
|
|
1922
|
-
}, h =
|
|
1919
|
+
}, h = u();
|
|
1923
1920
|
return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
|
|
1924
1921
|
/* @__PURE__ */ e(
|
|
1925
1922
|
"div",
|
|
@@ -2023,7 +2020,7 @@ function Ga({
|
|
|
2023
2020
|
onRetry: a,
|
|
2024
2021
|
supportEmail: n = "support@nowramp.com"
|
|
2025
2022
|
}) {
|
|
2026
|
-
const { state: r, orderStatus: i, dispatch: c, goToStep: m } = Ue(), s = r.flowType === "sell",
|
|
2023
|
+
const { state: r, orderStatus: i, dispatch: c, goToStep: m } = Ue(), s = r.flowType === "sell", u = () => {
|
|
2027
2024
|
if (i)
|
|
2028
2025
|
switch (i.status) {
|
|
2029
2026
|
case "failed":
|
|
@@ -2056,7 +2053,7 @@ function Ga({
|
|
|
2056
2053
|
return "An unexpected error occurred. Please try again.";
|
|
2057
2054
|
}, h = () => {
|
|
2058
2055
|
c({ type: "CLEAR_ERROR" }), a ? a() : (c({ type: "RESET" }), m("amount"));
|
|
2059
|
-
},
|
|
2056
|
+
}, d = () => {
|
|
2060
2057
|
c({ type: "RESET" }), m("amount");
|
|
2061
2058
|
};
|
|
2062
2059
|
return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
|
|
@@ -2068,7 +2065,7 @@ function Ga({
|
|
|
2068
2065
|
children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
|
|
2069
2066
|
}
|
|
2070
2067
|
),
|
|
2071
|
-
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children:
|
|
2068
|
+
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: u() }),
|
|
2072
2069
|
/* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: f() }),
|
|
2073
2070
|
i && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", children: [
|
|
2074
2071
|
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Order ID" }),
|
|
@@ -2089,7 +2086,7 @@ function Ga({
|
|
|
2089
2086
|
{
|
|
2090
2087
|
className: "w-full font-semibold text-[14px] transition-all",
|
|
2091
2088
|
style: { height: 48, borderRadius: 5, background: "var(--t-surface)", color: "var(--t-text)" },
|
|
2092
|
-
onClick:
|
|
2089
|
+
onClick: d,
|
|
2093
2090
|
children: "Start Over"
|
|
2094
2091
|
}
|
|
2095
2092
|
)
|
|
@@ -2126,15 +2123,15 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2126
2123
|
state: c,
|
|
2127
2124
|
defaultGateway: m,
|
|
2128
2125
|
quotes: s,
|
|
2129
|
-
fetchQuotes:
|
|
2126
|
+
fetchQuotes: u,
|
|
2130
2127
|
createOrder: f,
|
|
2131
2128
|
orderLoading: h
|
|
2132
|
-
} = Ue(),
|
|
2129
|
+
} = Ue(), d = c.flowType === "sell", [p, g] = v(null), A = r == null ? void 0 : r.gateways.find((G) => G.id === m), E = (q = s == null ? void 0 : s.bestQuote) != null && q.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, R = parseFloat(c.fiatAmount) || 0, P = !!(a && n && !d && Xt(c.cryptoCurrency) && E), ne = P && c.cryptoCurrency.toUpperCase().includes(c.fiatCurrency.toUpperCase()), V = P && R > 0 ? lt(ne ? R : R / E) : null, Z = async () => {
|
|
2133
2130
|
g(null);
|
|
2134
2131
|
try {
|
|
2135
|
-
|
|
2136
|
-
} catch (
|
|
2137
|
-
const fe =
|
|
2132
|
+
u(), await f();
|
|
2133
|
+
} catch (G) {
|
|
2134
|
+
const fe = G instanceof Error ? G.message : "Failed to create order";
|
|
2138
2135
|
g(fe);
|
|
2139
2136
|
}
|
|
2140
2137
|
};
|
|
@@ -2142,7 +2139,7 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2142
2139
|
/* @__PURE__ */ e("div", { className: "nramp-spinner" }),
|
|
2143
2140
|
/* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: "Loading..." })
|
|
2144
2141
|
] }) : /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
|
|
2145
|
-
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children:
|
|
2142
|
+
/* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: d ? "Confirm Sale" : "Confirm Purchase" }),
|
|
2146
2143
|
/* @__PURE__ */ o("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
|
|
2147
2144
|
A && /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
|
|
2148
2145
|
/* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Provider" }),
|
|
@@ -2151,7 +2148,7 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2151
2148
|
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: A.name })
|
|
2152
2149
|
] })
|
|
2153
2150
|
] }),
|
|
2154
|
-
|
|
2151
|
+
d ? /* @__PURE__ */ o(J, { children: [
|
|
2155
2152
|
/* @__PURE__ */ e(Se, { label: "You sell", value: `${c.cryptoAmount} ${c.cryptoCurrency}`, highlight: !0 }),
|
|
2156
2153
|
/* @__PURE__ */ e(Se, { label: "You receive", value: `${c.fiatCurrency} payout` })
|
|
2157
2154
|
] }) : /* @__PURE__ */ o(J, { children: [
|
|
@@ -2164,7 +2161,7 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2164
2161
|
}
|
|
2165
2162
|
),
|
|
2166
2163
|
/* @__PURE__ */ e(Se, { label: "Wallet", value: Kt(c.walletAddress), mono: !0 }),
|
|
2167
|
-
|
|
2164
|
+
P && V && /* @__PURE__ */ o("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
|
|
2168
2165
|
"Charged amount from provider may differ. The rest up to ",
|
|
2169
2166
|
V,
|
|
2170
2167
|
" ",
|
|
@@ -2175,7 +2172,7 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2175
2172
|
] })
|
|
2176
2173
|
] }),
|
|
2177
2174
|
/* @__PURE__ */ e(Se, { label: "Network", value: c.network }),
|
|
2178
|
-
|
|
2175
|
+
d && c.walletAddress && /* @__PURE__ */ e(Se, { label: "Refund address", value: Kt(c.walletAddress), mono: !0 })
|
|
2179
2176
|
] }),
|
|
2180
2177
|
p && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: p }),
|
|
2181
2178
|
/* @__PURE__ */ e(
|
|
@@ -2188,7 +2185,7 @@ function $a({ className: t = "", stablecoinParity: a, partnerName: n }) {
|
|
|
2188
2185
|
children: h ? /* @__PURE__ */ o(J, { children: [
|
|
2189
2186
|
/* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
|
|
2190
2187
|
"Processing..."
|
|
2191
|
-
] }) :
|
|
2188
|
+
] }) : d ? "Confirm & Sell" : "Confirm & Pay"
|
|
2192
2189
|
}
|
|
2193
2190
|
)
|
|
2194
2191
|
] });
|
|
@@ -2212,24 +2209,24 @@ function He({
|
|
|
2212
2209
|
children: n
|
|
2213
2210
|
}) {
|
|
2214
2211
|
const [r, i] = v(!1), [c, m] = v(!1);
|
|
2215
|
-
|
|
2212
|
+
W(() => {
|
|
2216
2213
|
if (t)
|
|
2217
2214
|
i(!0), requestAnimationFrame(() => requestAnimationFrame(() => m(!0)));
|
|
2218
2215
|
else if (r) {
|
|
2219
2216
|
m(!1);
|
|
2220
|
-
const
|
|
2221
|
-
return () => clearTimeout(
|
|
2217
|
+
const u = setTimeout(() => i(!1), 250);
|
|
2218
|
+
return () => clearTimeout(u);
|
|
2222
2219
|
}
|
|
2223
2220
|
}, [t]);
|
|
2224
|
-
const s =
|
|
2221
|
+
const s = B(() => {
|
|
2225
2222
|
m(!1), setTimeout(() => a(), 250);
|
|
2226
2223
|
}, [a]);
|
|
2227
|
-
return
|
|
2224
|
+
return W(() => {
|
|
2228
2225
|
if (!t) return;
|
|
2229
|
-
const
|
|
2226
|
+
const u = (f) => {
|
|
2230
2227
|
f.key === "Escape" && s();
|
|
2231
2228
|
};
|
|
2232
|
-
return window.addEventListener("keydown",
|
|
2229
|
+
return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
|
|
2233
2230
|
}, [t, s]), r ? /* @__PURE__ */ e(
|
|
2234
2231
|
"div",
|
|
2235
2232
|
{
|
|
@@ -2258,7 +2255,7 @@ function Wa({
|
|
|
2258
2255
|
}) {
|
|
2259
2256
|
return /* @__PURE__ */ e("span", { className: n, style: { display: "inline-flex", ...r }, children: t.split("").map((i, c) => /* @__PURE__ */ e(Xa, { char: i, height: a }, c)) });
|
|
2260
2257
|
}
|
|
2261
|
-
function
|
|
2258
|
+
function _({
|
|
2262
2259
|
w: t,
|
|
2263
2260
|
h: a,
|
|
2264
2261
|
className: n = ""
|
|
@@ -2268,29 +2265,29 @@ function K({
|
|
|
2268
2265
|
function Ya() {
|
|
2269
2266
|
return /* @__PURE__ */ o("div", { className: "flex-1 px-5 flex flex-col", children: [
|
|
2270
2267
|
/* @__PURE__ */ o("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
|
|
2271
|
-
/* @__PURE__ */ e(
|
|
2268
|
+
/* @__PURE__ */ e(_, { w: 70, h: 14, className: "mb-3" }),
|
|
2272
2269
|
/* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
|
|
2273
|
-
/* @__PURE__ */ e(
|
|
2274
|
-
/* @__PURE__ */ e(
|
|
2270
|
+
/* @__PURE__ */ e(_, { w: 120, h: 32 }),
|
|
2271
|
+
/* @__PURE__ */ e(_, { w: 75, h: 32 })
|
|
2275
2272
|
] })
|
|
2276
2273
|
] }),
|
|
2277
2274
|
/* @__PURE__ */ o("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
|
|
2278
|
-
/* @__PURE__ */ e(
|
|
2275
|
+
/* @__PURE__ */ e(_, { w: 50, h: 14, className: "mb-3" }),
|
|
2279
2276
|
/* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
|
|
2280
|
-
/* @__PURE__ */ e(
|
|
2281
|
-
/* @__PURE__ */ e(
|
|
2277
|
+
/* @__PURE__ */ e(_, { w: 180, h: 32 }),
|
|
2278
|
+
/* @__PURE__ */ e(_, { w: 85, h: 32 })
|
|
2282
2279
|
] })
|
|
2283
2280
|
] }),
|
|
2284
2281
|
/* @__PURE__ */ o("div", { className: "flex justify-between mt-3 px-[2px]", children: [
|
|
2285
|
-
/* @__PURE__ */ e(
|
|
2286
|
-
/* @__PURE__ */ e(
|
|
2282
|
+
/* @__PURE__ */ e(_, { w: 140, h: 12 }),
|
|
2283
|
+
/* @__PURE__ */ e(_, { w: 90, h: 12 })
|
|
2287
2284
|
] }),
|
|
2288
2285
|
/* @__PURE__ */ o("div", { className: "mt-8", children: [
|
|
2289
|
-
/* @__PURE__ */ e(
|
|
2290
|
-
/* @__PURE__ */ e(
|
|
2286
|
+
/* @__PURE__ */ e(_, { w: 65, h: 14, className: "mb-2.5" }),
|
|
2287
|
+
/* @__PURE__ */ e(_, { w: "100%", h: 47 })
|
|
2291
2288
|
] }),
|
|
2292
2289
|
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
2293
|
-
/* @__PURE__ */ e(
|
|
2290
|
+
/* @__PURE__ */ e(_, { w: "100%", h: 60, className: "mb-2" }),
|
|
2294
2291
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
|
|
2295
2292
|
] });
|
|
2296
2293
|
}
|
|
@@ -2352,14 +2349,14 @@ function Za({
|
|
|
2352
2349
|
code: h.code,
|
|
2353
2350
|
name: h.name || f.get(h.code) || h.code
|
|
2354
2351
|
}));
|
|
2355
|
-
}, [n]),
|
|
2352
|
+
}, [n]), u = Y(() => {
|
|
2356
2353
|
const f = c.trim().toLowerCase();
|
|
2357
2354
|
if (!f) {
|
|
2358
2355
|
if (i) {
|
|
2359
|
-
const h = s.find((
|
|
2356
|
+
const h = s.find((d) => d.code === i);
|
|
2360
2357
|
if (h) {
|
|
2361
|
-
const
|
|
2362
|
-
return [h, ...
|
|
2358
|
+
const d = s.filter((p) => p.code !== i);
|
|
2359
|
+
return [h, ...d];
|
|
2363
2360
|
}
|
|
2364
2361
|
}
|
|
2365
2362
|
return s;
|
|
@@ -2386,8 +2383,8 @@ function Za({
|
|
|
2386
2383
|
),
|
|
2387
2384
|
/* @__PURE__ */ e(Ke, { value: c, onChange: m }),
|
|
2388
2385
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2389
|
-
|
|
2390
|
-
const
|
|
2386
|
+
u.map((f, h) => {
|
|
2387
|
+
const d = f.name !== f.code ? f.name : "", p = i === f.code;
|
|
2391
2388
|
return /* @__PURE__ */ o("div", { children: [
|
|
2392
2389
|
/* @__PURE__ */ o(
|
|
2393
2390
|
"button",
|
|
@@ -2399,7 +2396,7 @@ function Za({
|
|
|
2399
2396
|
/* @__PURE__ */ e(ct, { currencyCode: f.code, size: 32, baseUrl: r }),
|
|
2400
2397
|
/* @__PURE__ */ o("div", { className: "text-left flex-1 flex items-center gap-2", children: [
|
|
2401
2398
|
/* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: f.code }),
|
|
2402
|
-
|
|
2399
|
+
d && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: d })
|
|
2403
2400
|
] }),
|
|
2404
2401
|
p && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "shrink-0", children: /* @__PURE__ */ e(
|
|
2405
2402
|
"path",
|
|
@@ -2414,7 +2411,7 @@ function Za({
|
|
|
2414
2411
|
]
|
|
2415
2412
|
}
|
|
2416
2413
|
),
|
|
2417
|
-
h <
|
|
2414
|
+
h < u.length - 1 && /* @__PURE__ */ e(
|
|
2418
2415
|
"div",
|
|
2419
2416
|
{
|
|
2420
2417
|
style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
|
|
@@ -2422,16 +2419,14 @@ function Za({
|
|
|
2422
2419
|
)
|
|
2423
2420
|
] }, f.code);
|
|
2424
2421
|
}),
|
|
2425
|
-
|
|
2422
|
+
u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
|
|
2426
2423
|
] })
|
|
2427
2424
|
] });
|
|
2428
2425
|
}
|
|
2429
2426
|
function _t({ src: t, alt: a, size: n, className: r, style: i }) {
|
|
2430
|
-
const [c, m] = v(!1), [s,
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
}, [t]);
|
|
2434
|
-
const f = I(() => m(!0), []), h = I(() => d(!0), []);
|
|
2427
|
+
const [c, m] = v(!1), [s, u] = v(!1), f = I(t);
|
|
2428
|
+
f.current !== t && (f.current = t, m(!1), u(!1));
|
|
2429
|
+
const h = B(() => m(!0), []), d = B(() => u(!0), []);
|
|
2435
2430
|
return /* @__PURE__ */ o("div", { className: r, style: { ...i, width: n, height: n, position: "relative" }, children: [
|
|
2436
2431
|
!c && !s && /* @__PURE__ */ e(
|
|
2437
2432
|
"div",
|
|
@@ -2454,9 +2449,8 @@ function _t({ src: t, alt: a, size: n, className: r, style: i }) {
|
|
|
2454
2449
|
alt: a,
|
|
2455
2450
|
width: n,
|
|
2456
2451
|
height: n,
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
onError: h,
|
|
2452
|
+
onLoad: h,
|
|
2453
|
+
onError: d,
|
|
2460
2454
|
className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
|
|
2461
2455
|
style: { width: n, height: n, transition: "opacity 0.15s ease-in" }
|
|
2462
2456
|
}
|
|
@@ -2464,17 +2458,17 @@ function _t({ src: t, alt: a, size: n, className: r, style: i }) {
|
|
|
2464
2458
|
] });
|
|
2465
2459
|
}
|
|
2466
2460
|
function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selectedCode: i, selectedChain: c }) {
|
|
2467
|
-
const [m, s] = v(""),
|
|
2461
|
+
const [m, s] = v(""), u = Y(() => {
|
|
2468
2462
|
if (!n || n.length === 0) return wa;
|
|
2469
|
-
const
|
|
2463
|
+
const d = [];
|
|
2470
2464
|
for (const p of n) {
|
|
2471
2465
|
const g = p.networks || [], A = p.name || va[p.code] || p.code;
|
|
2472
2466
|
if (g.length === 0)
|
|
2473
|
-
|
|
2467
|
+
d.push({ code: p.code, name: A, chain: p.code, popular: !1 });
|
|
2474
2468
|
else
|
|
2475
2469
|
for (const E of g) {
|
|
2476
2470
|
const R = E.code || E.id || E.name || p.code;
|
|
2477
|
-
|
|
2471
|
+
d.push({
|
|
2478
2472
|
code: p.code,
|
|
2479
2473
|
name: A,
|
|
2480
2474
|
chain: R,
|
|
@@ -2483,29 +2477,29 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2483
2477
|
});
|
|
2484
2478
|
}
|
|
2485
2479
|
}
|
|
2486
|
-
return
|
|
2487
|
-
}, [n]), f =
|
|
2480
|
+
return d;
|
|
2481
|
+
}, [n]), f = B((d, p) => i === d && c === p, [i, c]), h = Y(() => {
|
|
2488
2482
|
var A;
|
|
2489
|
-
const
|
|
2490
|
-
if (!
|
|
2483
|
+
const d = m.trim().toLowerCase();
|
|
2484
|
+
if (!d) {
|
|
2491
2485
|
if (i && c) {
|
|
2492
|
-
const E =
|
|
2486
|
+
const E = u.find((R) => R.code === i && R.chain === c);
|
|
2493
2487
|
if (E) {
|
|
2494
|
-
const R =
|
|
2488
|
+
const R = u.filter((P) => !(P.code === i && P.chain === c));
|
|
2495
2489
|
return [E, ...R];
|
|
2496
2490
|
}
|
|
2497
2491
|
}
|
|
2498
|
-
return
|
|
2492
|
+
return u;
|
|
2499
2493
|
}
|
|
2500
|
-
const p =
|
|
2501
|
-
for (const E of
|
|
2502
|
-
const R = Ze(E.chain),
|
|
2503
|
-
if (!p.every((L) =>
|
|
2494
|
+
const p = d.split(/\s+/), g = [];
|
|
2495
|
+
for (const E of u) {
|
|
2496
|
+
const R = Ze(E.chain), P = R ? R.name.toLowerCase() : "", ne = ((A = R == null ? void 0 : R.shortName) == null ? void 0 : A.toLowerCase()) || "", V = E.chain.toLowerCase(), Z = E.code.toLowerCase(), q = E.name.toLowerCase(), G = [Z, q, P, ne, V];
|
|
2497
|
+
if (!p.every((L) => G.some((l) => l.includes(L)))) continue;
|
|
2504
2498
|
let y = 0;
|
|
2505
|
-
Z ===
|
|
2499
|
+
Z === d ? y += 100 : Z.startsWith(p[0]) && (y += 50), E.popular && (y += 10), p.length > 1 && (P.includes(p[1]) || ne.includes(p[1]) || V.includes(p[1])) && (y += 25), g.push({ item: E, score: y });
|
|
2506
2500
|
}
|
|
2507
2501
|
return g.sort((E, R) => R.score - E.score), g.map((E) => E.item);
|
|
2508
|
-
}, [
|
|
2502
|
+
}, [u, m, i, c]);
|
|
2509
2503
|
return /* @__PURE__ */ o(J, { children: [
|
|
2510
2504
|
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
2511
2505
|
/* @__PURE__ */ e(
|
|
@@ -2518,13 +2512,13 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2518
2512
|
),
|
|
2519
2513
|
/* @__PURE__ */ e(Ke, { value: m, onChange: s }),
|
|
2520
2514
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2521
|
-
h.map((
|
|
2522
|
-
const g = Ze(
|
|
2515
|
+
h.map((d, p) => {
|
|
2516
|
+
const g = Ze(d.chain), A = (g == null ? void 0 : g.name) || d.chainName || d.chain, E = d.name !== d.code ? d.name : "", R = f(d.code, d.chain);
|
|
2523
2517
|
return /* @__PURE__ */ o("div", { children: [
|
|
2524
2518
|
/* @__PURE__ */ o(
|
|
2525
2519
|
"button",
|
|
2526
2520
|
{
|
|
2527
|
-
onClick: () => a(
|
|
2521
|
+
onClick: () => a(d.code, d.chain),
|
|
2528
2522
|
className: "flex items-center w-full transition-colors rounded-lg hover-item",
|
|
2529
2523
|
style: { gap: 14, padding: "18px 8px", margin: "0 -8px" },
|
|
2530
2524
|
children: [
|
|
@@ -2537,8 +2531,8 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2537
2531
|
children: /* @__PURE__ */ e(
|
|
2538
2532
|
_t,
|
|
2539
2533
|
{
|
|
2540
|
-
src: $t(
|
|
2541
|
-
alt:
|
|
2534
|
+
src: $t(d.code, r),
|
|
2535
|
+
alt: d.code,
|
|
2542
2536
|
size: 32
|
|
2543
2537
|
}
|
|
2544
2538
|
)
|
|
@@ -2558,8 +2552,8 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2558
2552
|
children: /* @__PURE__ */ e(
|
|
2559
2553
|
_t,
|
|
2560
2554
|
{
|
|
2561
|
-
src: it(
|
|
2562
|
-
alt:
|
|
2555
|
+
src: it(d.chain, r),
|
|
2556
|
+
alt: d.chain,
|
|
2563
2557
|
size: 16
|
|
2564
2558
|
}
|
|
2565
2559
|
)
|
|
@@ -2572,7 +2566,7 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2572
2566
|
{
|
|
2573
2567
|
className: "font-semibold text-[15px]",
|
|
2574
2568
|
style: { color: "var(--t-text)" },
|
|
2575
|
-
children:
|
|
2569
|
+
children: d.code
|
|
2576
2570
|
}
|
|
2577
2571
|
),
|
|
2578
2572
|
E && /* @__PURE__ */ e(
|
|
@@ -2601,7 +2595,7 @@ function Qa({ onClose: t, onSelect: a, cryptos: n, assetBaseUrl: r = "", selecte
|
|
|
2601
2595
|
}
|
|
2602
2596
|
),
|
|
2603
2597
|
p < h.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
|
|
2604
|
-
] }, `${
|
|
2598
|
+
] }, `${d.code}-${d.chain}`);
|
|
2605
2599
|
}),
|
|
2606
2600
|
h.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
|
|
2607
2601
|
] })
|
|
@@ -2617,16 +2611,16 @@ function za({
|
|
|
2617
2611
|
const s = i.trim().toLowerCase();
|
|
2618
2612
|
if (!s) {
|
|
2619
2613
|
if (a) {
|
|
2620
|
-
const
|
|
2621
|
-
if (
|
|
2614
|
+
const u = t.find((f) => f.id === a);
|
|
2615
|
+
if (u) {
|
|
2622
2616
|
const f = t.filter((h) => h.id !== a);
|
|
2623
|
-
return [
|
|
2617
|
+
return [u, ...f];
|
|
2624
2618
|
}
|
|
2625
2619
|
}
|
|
2626
2620
|
return t;
|
|
2627
2621
|
}
|
|
2628
2622
|
return t.filter(
|
|
2629
|
-
(
|
|
2623
|
+
(u) => u.id.toLowerCase().includes(s) || u.name.toLowerCase().includes(s) || u.description && u.description.toLowerCase().includes(s)
|
|
2630
2624
|
);
|
|
2631
2625
|
}, [t, i, a]);
|
|
2632
2626
|
return /* @__PURE__ */ o(J, { children: [
|
|
@@ -2641,7 +2635,7 @@ function za({
|
|
|
2641
2635
|
),
|
|
2642
2636
|
/* @__PURE__ */ e(Ke, { value: i, onChange: c }),
|
|
2643
2637
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2644
|
-
m.map((s,
|
|
2638
|
+
m.map((s, u) => {
|
|
2645
2639
|
const f = s.id === a, h = Yt(s.id, s.name);
|
|
2646
2640
|
return /* @__PURE__ */ o("div", { children: [
|
|
2647
2641
|
/* @__PURE__ */ o(
|
|
@@ -2690,7 +2684,7 @@ function za({
|
|
|
2690
2684
|
]
|
|
2691
2685
|
}
|
|
2692
2686
|
),
|
|
2693
|
-
|
|
2687
|
+
u < m.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
|
|
2694
2688
|
] }, s.id);
|
|
2695
2689
|
}),
|
|
2696
2690
|
m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
|
|
@@ -2740,18 +2734,18 @@ function en({
|
|
|
2740
2734
|
showThemeToggle: c = !0,
|
|
2741
2735
|
country: m,
|
|
2742
2736
|
countryName: s,
|
|
2743
|
-
onLocationPress:
|
|
2737
|
+
onLocationPress: u,
|
|
2744
2738
|
assetBaseUrl: f = ""
|
|
2745
2739
|
}) {
|
|
2746
|
-
const [h,
|
|
2740
|
+
const [h, d] = v(!1);
|
|
2747
2741
|
return /* @__PURE__ */ o(J, { children: [
|
|
2748
2742
|
/* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
2749
2743
|
/* @__PURE__ */ o("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
|
|
2750
|
-
|
|
2744
|
+
u && /* @__PURE__ */ o(J, { children: [
|
|
2751
2745
|
/* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ o(
|
|
2752
2746
|
"button",
|
|
2753
2747
|
{
|
|
2754
|
-
onClick:
|
|
2748
|
+
onClick: u,
|
|
2755
2749
|
className: "flex items-center justify-between w-full py-5 transition-colors",
|
|
2756
2750
|
style: { color: "inherit", background: "none", border: "none", cursor: "pointer", padding: "20px 0" },
|
|
2757
2751
|
children: [
|
|
@@ -2764,7 +2758,7 @@ function en({
|
|
|
2764
2758
|
width: 40,
|
|
2765
2759
|
height: 40,
|
|
2766
2760
|
style: { width: 40, height: 40, borderRadius: "50%", objectFit: "cover" },
|
|
2767
|
-
onError: () =>
|
|
2761
|
+
onError: () => d(!0)
|
|
2768
2762
|
}
|
|
2769
2763
|
) : /* @__PURE__ */ e(tn, { size: 40 }),
|
|
2770
2764
|
/* @__PURE__ */ o("div", { className: "text-left", children: [
|
|
@@ -2793,7 +2787,7 @@ function en({
|
|
|
2793
2787
|
/* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
|
|
2794
2788
|
] }),
|
|
2795
2789
|
c && /* @__PURE__ */ o(J, { children: [
|
|
2796
|
-
/* @__PURE__ */ e("div", { style: { borderTop:
|
|
2790
|
+
/* @__PURE__ */ e("div", { style: { borderTop: u ? "none" : "1px solid var(--t-divider)" }, children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between w-full py-5", children: [
|
|
2797
2791
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-3.5", children: [
|
|
2798
2792
|
/* @__PURE__ */ e(Ia, { size: 40 }),
|
|
2799
2793
|
/* @__PURE__ */ e(
|
|
@@ -2854,16 +2848,16 @@ function an({
|
|
|
2854
2848
|
const s = i.trim().toLowerCase();
|
|
2855
2849
|
if (!s) {
|
|
2856
2850
|
if (r) {
|
|
2857
|
-
const
|
|
2851
|
+
const u = r.toLowerCase(), f = st[u];
|
|
2858
2852
|
if (f) {
|
|
2859
|
-
const h = Ye.filter((
|
|
2853
|
+
const h = Ye.filter((d) => d.code !== u);
|
|
2860
2854
|
return [f, ...h];
|
|
2861
2855
|
}
|
|
2862
2856
|
}
|
|
2863
2857
|
return Ye;
|
|
2864
2858
|
}
|
|
2865
2859
|
return Ye.filter(
|
|
2866
|
-
(
|
|
2860
|
+
(u) => u.name.toLowerCase().includes(s) || u.code.includes(s) || u.defaultFiat.toLowerCase().includes(s)
|
|
2867
2861
|
);
|
|
2868
2862
|
}, [i, r]);
|
|
2869
2863
|
return /* @__PURE__ */ o(J, { children: [
|
|
@@ -2884,7 +2878,7 @@ function an({
|
|
|
2884
2878
|
),
|
|
2885
2879
|
/* @__PURE__ */ e(Ke, { value: i, onChange: c }),
|
|
2886
2880
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
|
|
2887
|
-
m.map((s,
|
|
2881
|
+
m.map((s, u) => {
|
|
2888
2882
|
const f = (r == null ? void 0 : r.toLowerCase()) === s.code;
|
|
2889
2883
|
return /* @__PURE__ */ o("div", { children: [
|
|
2890
2884
|
/* @__PURE__ */ o(
|
|
@@ -2912,7 +2906,7 @@ function an({
|
|
|
2912
2906
|
]
|
|
2913
2907
|
}
|
|
2914
2908
|
),
|
|
2915
|
-
|
|
2909
|
+
u < m.length - 1 && /* @__PURE__ */ e(
|
|
2916
2910
|
"div",
|
|
2917
2911
|
{
|
|
2918
2912
|
style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
|
|
@@ -2963,21 +2957,21 @@ function rn({
|
|
|
2963
2957
|
bgImage: c,
|
|
2964
2958
|
borderColor: m,
|
|
2965
2959
|
borderRadius: s,
|
|
2966
|
-
surfaceColor:
|
|
2960
|
+
surfaceColor: u,
|
|
2967
2961
|
inputBgColor: f,
|
|
2968
2962
|
textColor: h,
|
|
2969
|
-
textSecondaryColor:
|
|
2963
|
+
textSecondaryColor: d,
|
|
2970
2964
|
textMutedColor: p,
|
|
2971
2965
|
successColor: g,
|
|
2972
2966
|
showFlowToggle: A = !0,
|
|
2973
2967
|
showSettings: E = !0,
|
|
2974
2968
|
showThemeToggle: R = !0,
|
|
2975
|
-
autoRedirect:
|
|
2969
|
+
autoRedirect: P = !1,
|
|
2976
2970
|
explorerUrl: ne,
|
|
2977
2971
|
doneButtonText: V = "Done",
|
|
2978
2972
|
supportEmail: Z,
|
|
2979
2973
|
stablecoinParity: q,
|
|
2980
|
-
partnerName:
|
|
2974
|
+
partnerName: G,
|
|
2981
2975
|
onDone: fe
|
|
2982
2976
|
}) {
|
|
2983
2977
|
var bt, Nt, Et, wt, At, Rt, Tt, kt, Lt;
|
|
@@ -2996,34 +2990,34 @@ function rn({
|
|
|
2996
2990
|
fieldLocks: k,
|
|
2997
2991
|
apiConfig: be,
|
|
2998
2992
|
assetBaseUrl: j
|
|
2999
|
-
} = Ue(), [re, Ne] = v(a === "dark"), [Ee, de] = v(n), [xe,
|
|
3000
|
-
|
|
2993
|
+
} = Ue(), [re, Ne] = v(a === "dark"), [Ee, de] = v(n), [xe, O] = v(null), [we, _e] = v(!1), [ee, Ve] = v(!1), [Fe, Me] = v(!1), [Ae, Re] = v(!1), [ze, ge] = v(null), [Ie, Je] = v(!0), [qe, C] = v(!1), [b, U] = v(!1), D = I(null), F = I(), $ = I(y.flowType);
|
|
2994
|
+
W(() => {
|
|
3001
2995
|
Ne(a === "dark");
|
|
3002
|
-
}, [a]),
|
|
2996
|
+
}, [a]), W(() => {
|
|
3003
2997
|
const x = setTimeout(() => Je(!1), M ? 0 : 800);
|
|
3004
2998
|
return () => clearTimeout(x);
|
|
3005
|
-
}, [M]),
|
|
3006
|
-
if (
|
|
3007
|
-
|
|
2999
|
+
}, [M]), W(() => {
|
|
3000
|
+
if ($.current !== y.flowType && !Ie) {
|
|
3001
|
+
$.current = y.flowType, C(!0), _e(!1), Ve(!1);
|
|
3008
3002
|
const x = setTimeout(() => C(!1), 350);
|
|
3009
3003
|
return () => clearTimeout(x);
|
|
3010
3004
|
}
|
|
3011
|
-
|
|
3005
|
+
$.current = y.flowType;
|
|
3012
3006
|
}, [y.flowType, Ie]);
|
|
3013
|
-
const Q = y.flowType,
|
|
3014
|
-
ue &&
|
|
3007
|
+
const Q = y.flowType, K = Q === "buy", X = y.cryptoCurrency || "BTC", te = y.fiatCurrency || "USD", et = K ? y.fiatAmount : y.cryptoAmount, z = Ea(et), ue = (bt = w == null ? void 0 : w.bestQuote) != null && bt.exchangeRate ? parseFloat(w.bestQuote.exchangeRate) : null, je = I(null);
|
|
3008
|
+
ue && X && te && (je.current = { rate: ue, crypto: X, fiat: te });
|
|
3015
3009
|
const ut = Y(() => {
|
|
3016
3010
|
if (w != null && w.bestQuote) {
|
|
3017
|
-
const x =
|
|
3011
|
+
const x = K ? w.bestQuote.cryptoAmount : w.bestQuote.fiatAmount;
|
|
3018
3012
|
if (x) return x;
|
|
3019
3013
|
}
|
|
3020
3014
|
return "0";
|
|
3021
|
-
}, [w,
|
|
3022
|
-
var
|
|
3023
|
-
const x = ue || ((
|
|
3015
|
+
}, [w, K]), Be = !!(q && G && K && Xt(X) && ue), Qt = Be && X.toUpperCase().includes(te.toUpperCase()), mt = Be && z > 0 ? lt(Qt ? z : z / ue) : null, zt = Be && mt ? mt : ut, Jt = Y(() => {
|
|
3016
|
+
var H, oe, ke;
|
|
3017
|
+
const x = ue || ((H = je.current) == null ? void 0 : H.rate), N = ue ? X : (oe = je.current) == null ? void 0 : oe.crypto, T = ue ? te : (ke = je.current) == null ? void 0 : ke.fiat;
|
|
3024
3018
|
return !x || !N || !T ? "" : `1 ${N} ≈ ${x.toFixed(2)} ${T}`;
|
|
3025
|
-
}, [
|
|
3026
|
-
|
|
3019
|
+
}, [X, te, ue]);
|
|
3020
|
+
W(() => {
|
|
3027
3021
|
const x = y.walletAddress.trim(), N = y.network;
|
|
3028
3022
|
if (!x || x.length < 10) {
|
|
3029
3023
|
ge(null), L({ type: "SET_WALLET_ERROR", message: "" });
|
|
@@ -3032,14 +3026,14 @@ function rn({
|
|
|
3032
3026
|
Re(!0), ge(null);
|
|
3033
3027
|
const T = new AbortController();
|
|
3034
3028
|
return clearTimeout(F.current), F.current = setTimeout(async () => {
|
|
3035
|
-
var
|
|
3029
|
+
var H, oe, ke;
|
|
3036
3030
|
try {
|
|
3037
3031
|
const nt = await (await fetch(`${be.apiUrl}/public/validate/address`, {
|
|
3038
3032
|
method: "POST",
|
|
3039
3033
|
headers: { "Content-Type": "application/json" },
|
|
3040
3034
|
body: JSON.stringify({ address: x, ...N ? { network: N } : {} }),
|
|
3041
3035
|
signal: T.signal
|
|
3042
|
-
})).json(), rt = ((
|
|
3036
|
+
})).json(), rt = ((H = nt.data) == null ? void 0 : H.attributes) || nt.data || nt;
|
|
3043
3037
|
if (rt.isValid)
|
|
3044
3038
|
ge(!0), L({ type: "SET_WALLET_ERROR", message: "" });
|
|
3045
3039
|
else {
|
|
@@ -3057,38 +3051,38 @@ function rn({
|
|
|
3057
3051
|
clearTimeout(F.current), T.abort();
|
|
3058
3052
|
};
|
|
3059
3053
|
}, [y.walletAddress, y.network, be.apiUrl]);
|
|
3060
|
-
const ft = !et || z === 0, ht = z > 0 && (
|
|
3054
|
+
const ft = !et || z === 0, ht = z > 0 && (K ? z < Bt : z < Ot), pt = !!se || ht || we && ft, qt = z > 0 && !se && !ht, tt = y.walletAddress.trim().length >= 10 && ze !== !1 && !Ae, Ge = qt && tt && !!y.cryptoCurrency && !!y.network, ea = (x) => {
|
|
3061
3055
|
let N = x.target.value.replace(/[^0-9.,]/g, "");
|
|
3062
|
-
const T =
|
|
3063
|
-
|
|
3056
|
+
const T = K ? 2 : 6, H = N.indexOf(".");
|
|
3057
|
+
H !== -1 && N.length - H - 1 > T && (N = N.slice(0, H + T + 1)), L(K ? { type: "SET_FIAT_AMOUNT", amount: N } : { type: "SET_CRYPTO_AMOUNT", amount: N });
|
|
3064
3058
|
}, yt = (x) => {
|
|
3065
3059
|
x !== Q && L({ type: "SET_FLOW_TYPE", flowType: x });
|
|
3066
|
-
}, ta =
|
|
3060
|
+
}, ta = B(
|
|
3067
3061
|
(x) => {
|
|
3068
3062
|
L({ type: "SET_FIAT_CURRENCY", currency: x });
|
|
3069
3063
|
},
|
|
3070
3064
|
[L]
|
|
3071
|
-
), aa =
|
|
3065
|
+
), aa = B(
|
|
3072
3066
|
(x, N) => {
|
|
3073
3067
|
L({ type: "SET_CRYPTO_CURRENCY", currency: x }), L({ type: "SET_CRYPTO_CHAIN", chain: N });
|
|
3074
3068
|
},
|
|
3075
3069
|
[L]
|
|
3076
|
-
), na =
|
|
3070
|
+
), na = B(
|
|
3077
3071
|
(x) => {
|
|
3078
3072
|
L({ type: "SET_PAYMENT_METHOD", methodId: x });
|
|
3079
3073
|
},
|
|
3080
3074
|
[L]
|
|
3081
|
-
), ra =
|
|
3075
|
+
), ra = B(
|
|
3082
3076
|
(x) => {
|
|
3083
|
-
L({ type: "SET_COUNTRY", country: x }),
|
|
3077
|
+
L({ type: "SET_COUNTRY", country: x }), O(null);
|
|
3084
3078
|
},
|
|
3085
3079
|
[L]
|
|
3086
|
-
), oa =
|
|
3087
|
-
|
|
3080
|
+
), oa = B(() => {
|
|
3081
|
+
O(null), setTimeout(() => O("country"), 280);
|
|
3088
3082
|
}, []), ia = y.country ? (Nt = st[y.country.toLowerCase()]) == null ? void 0 : Nt.name : void 0, la = () => {
|
|
3089
3083
|
Ge && (U(!0), pe());
|
|
3090
3084
|
};
|
|
3091
|
-
|
|
3085
|
+
W(() => {
|
|
3092
3086
|
var x;
|
|
3093
3087
|
if (!(!b || S)) {
|
|
3094
3088
|
if (w != null && w.bestQuote)
|
|
@@ -3098,14 +3092,14 @@ function rn({
|
|
|
3098
3092
|
U(!1), L({ type: "SET_ERROR", message: he.message || "No quotes available" });
|
|
3099
3093
|
else if (w && !w.bestQuote) {
|
|
3100
3094
|
U(!1);
|
|
3101
|
-
const N = (x = w.unavailableGateways) == null ? void 0 : x.map((
|
|
3095
|
+
const N = (x = w.unavailableGateways) == null ? void 0 : x.map((H) => H.reason).filter(Boolean), T = N != null && N.length ? `No providers available: ${N.join("; ")}` : "No providers available for this currency/network combination";
|
|
3102
3096
|
L({ type: "SET_ERROR", message: T });
|
|
3103
3097
|
}
|
|
3104
3098
|
}
|
|
3105
3099
|
}, [b, w, S, he, L, ye]);
|
|
3106
3100
|
const xt = re ? "theme-dark" : "theme-light", $e = Mt.find((x) => x.id === Ee) || Mt[0], ca = $e.accent === null, sa = r ? ce(r) : !1, gt = (x) => {
|
|
3107
|
-
const N = x.replace("#", ""), T = parseInt(N.substring(0, 2), 16),
|
|
3108
|
-
return (0.299 * T + 0.587 *
|
|
3101
|
+
const N = x.replace("#", ""), T = parseInt(N.substring(0, 2), 16), H = parseInt(N.substring(2, 4), 16), oe = parseInt(N.substring(4, 6), 16);
|
|
3102
|
+
return (0.299 * T + 0.587 * H + 0.114 * oe) / 255 > 0.5 ? "#000000" : "#ffffff";
|
|
3109
3103
|
}, Ct = sa ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": gt(r) } : ca ? {
|
|
3110
3104
|
"--t-accent": re ? "#ffffff" : "#111111",
|
|
3111
3105
|
"--t-cta-bg": re ? "#ffffff" : "#111111",
|
|
@@ -3115,12 +3109,12 @@ function rn({
|
|
|
3115
3109
|
"--t-cta-bg": $e.accent,
|
|
3116
3110
|
"--t-cta-text": gt($e.accent)
|
|
3117
3111
|
}, ae = {};
|
|
3118
|
-
|
|
3112
|
+
u && ce(u) && (ae["--t-surface"] = u, ae["--t-modal-bg"] = u), f && ce(f) && (ae["--t-pill-bg"] = f, ae["--t-close-bg"] = f), h && ce(h) && (ae["--t-text"] = h), d && ce(d) && (ae["--t-text-secondary"] = d), p && ce(p) && (ae["--t-text-muted"] = p, ae["--t-text-tertiary"] = p), g && ce(g) && (ae["--t-success"] = g);
|
|
3119
3113
|
const Ce = {};
|
|
3120
3114
|
i && ce(i) ? Ce.backgroundColor = i : Ce.backgroundColor = "var(--t-bg)", c && (c.startsWith("https://") || c.startsWith("data:image/")) && (Ce.backgroundImage = `url(${c})`, Ce.backgroundSize = "cover", Ce.backgroundPosition = "center");
|
|
3121
3115
|
const Xe = re ? "#ffffff" : "#111111", We = {};
|
|
3122
3116
|
m && ce(m) && (We.border = `1px solid ${m}`), s && (We.borderRadius = s);
|
|
3123
|
-
const vt = y.step === "checkout" ? /* @__PURE__ */ e(Ka, { autoRedirect:
|
|
3117
|
+
const vt = y.step === "checkout" ? /* @__PURE__ */ e(Ka, { autoRedirect: P }) : y.step === "processing" ? /* @__PURE__ */ e(Va, {}) : y.step === "complete" ? /* @__PURE__ */ e(ja, { explorerUrl: ne, doneButtonText: V, onDone: fe }) : y.step === "error" ? /* @__PURE__ */ e(Ga, { supportEmail: Z }) : y.step === "confirm" ? /* @__PURE__ */ e($a, { stablecoinParity: Be, partnerName: G }) : null;
|
|
3124
3118
|
if (vt)
|
|
3125
3119
|
return /* @__PURE__ */ e(
|
|
3126
3120
|
"div",
|
|
@@ -3149,7 +3143,7 @@ function rn({
|
|
|
3149
3143
|
...We
|
|
3150
3144
|
},
|
|
3151
3145
|
children: [
|
|
3152
|
-
E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${A ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Ma, { onClick: () =>
|
|
3146
|
+
E && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${A ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(Ma, { onClick: () => O("settings") }) }),
|
|
3153
3147
|
A ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
|
|
3154
3148
|
/* @__PURE__ */ o("div", { className: "flex", style: { width: 165 }, children: [
|
|
3155
3149
|
/* @__PURE__ */ e(
|
|
@@ -3208,17 +3202,17 @@ function rn({
|
|
|
3208
3202
|
value: et,
|
|
3209
3203
|
onChange: ea,
|
|
3210
3204
|
onBlur: () => _e(!0),
|
|
3211
|
-
placeholder:
|
|
3205
|
+
placeholder: K ? "250" : "0.01",
|
|
3212
3206
|
className: "bg-transparent outline-none w-0 flex-1 mr-3",
|
|
3213
3207
|
style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
|
|
3214
3208
|
inputMode: "decimal",
|
|
3215
3209
|
disabled: !!((Et = k == null ? void 0 : k.sourceAmount) != null && Et.locked)
|
|
3216
3210
|
}
|
|
3217
3211
|
),
|
|
3218
|
-
|
|
3212
|
+
K ? /* @__PURE__ */ o(
|
|
3219
3213
|
"button",
|
|
3220
3214
|
{
|
|
3221
|
-
onClick: () =>
|
|
3215
|
+
onClick: () => O("fiat"),
|
|
3222
3216
|
className: "flex items-center gap-1.5 shrink-0 transition-colors",
|
|
3223
3217
|
style: {
|
|
3224
3218
|
background: "var(--t-pill-bg)",
|
|
@@ -3238,7 +3232,7 @@ function rn({
|
|
|
3238
3232
|
/* @__PURE__ */ o(
|
|
3239
3233
|
"button",
|
|
3240
3234
|
{
|
|
3241
|
-
onClick: () =>
|
|
3235
|
+
onClick: () => O("crypto"),
|
|
3242
3236
|
className: "flex items-center gap-1.5 transition-colors",
|
|
3243
3237
|
style: {
|
|
3244
3238
|
background: "var(--t-pill-bg)",
|
|
@@ -3249,8 +3243,8 @@ function rn({
|
|
|
3249
3243
|
},
|
|
3250
3244
|
disabled: !!((At = k == null ? void 0 : k.destinationCurrency) != null && At.locked),
|
|
3251
3245
|
children: [
|
|
3252
|
-
/* @__PURE__ */ e(Ht, { ticker:
|
|
3253
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Xe }, children:
|
|
3246
|
+
/* @__PURE__ */ e(Ht, { ticker: X, size: 16, baseUrl: j }),
|
|
3247
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Xe }, children: X }),
|
|
3254
3248
|
/* @__PURE__ */ e(Pe, {})
|
|
3255
3249
|
]
|
|
3256
3250
|
}
|
|
@@ -3274,7 +3268,7 @@ function rn({
|
|
|
3274
3268
|
]
|
|
3275
3269
|
}
|
|
3276
3270
|
),
|
|
3277
|
-
we && pt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: se || (ft ? "Amount should be more than 0" :
|
|
3271
|
+
we && pt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: se || (ft ? "Amount should be more than 0" : K ? `Minimum amount is ${Bt} ${te}` : `Minimum amount is ${Ot} ${X}`) }),
|
|
3278
3272
|
/* @__PURE__ */ o(
|
|
3279
3273
|
"div",
|
|
3280
3274
|
{
|
|
@@ -3291,7 +3285,7 @@ function rn({
|
|
|
3291
3285
|
children: [
|
|
3292
3286
|
/* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
|
|
3293
3287
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between", children: [
|
|
3294
|
-
S && !b ? /* @__PURE__ */ e(
|
|
3288
|
+
S && !b ? /* @__PURE__ */ e(_, { w: 180, h: 32 }) : /* @__PURE__ */ e(
|
|
3295
3289
|
Wa,
|
|
3296
3290
|
{
|
|
3297
3291
|
value: z > 0 ? zt : "0",
|
|
@@ -3300,11 +3294,11 @@ function rn({
|
|
|
3300
3294
|
style: { color: z > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
|
|
3301
3295
|
}
|
|
3302
3296
|
),
|
|
3303
|
-
|
|
3297
|
+
K ? /* @__PURE__ */ o("div", { className: "flex flex-col items-end shrink-0", children: [
|
|
3304
3298
|
/* @__PURE__ */ o(
|
|
3305
3299
|
"button",
|
|
3306
3300
|
{
|
|
3307
|
-
onClick: () =>
|
|
3301
|
+
onClick: () => O("crypto"),
|
|
3308
3302
|
className: "flex items-center gap-1.5 transition-colors",
|
|
3309
3303
|
style: {
|
|
3310
3304
|
background: "var(--t-pill-bg)",
|
|
@@ -3315,8 +3309,8 @@ function rn({
|
|
|
3315
3309
|
},
|
|
3316
3310
|
disabled: !!((Rt = k == null ? void 0 : k.destinationCurrency) != null && Rt.locked),
|
|
3317
3311
|
children: [
|
|
3318
|
-
/* @__PURE__ */ e(Ht, { ticker:
|
|
3319
|
-
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Xe }, children:
|
|
3312
|
+
/* @__PURE__ */ e(Ht, { ticker: X, size: 16, baseUrl: j }),
|
|
3313
|
+
/* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: Xe }, children: X }),
|
|
3320
3314
|
/* @__PURE__ */ e(Pe, {})
|
|
3321
3315
|
]
|
|
3322
3316
|
}
|
|
@@ -3338,7 +3332,7 @@ function rn({
|
|
|
3338
3332
|
] }) : /* @__PURE__ */ o(
|
|
3339
3333
|
"button",
|
|
3340
3334
|
{
|
|
3341
|
-
onClick: () =>
|
|
3335
|
+
onClick: () => O("fiat"),
|
|
3342
3336
|
className: "flex items-center gap-1.5 shrink-0 transition-colors",
|
|
3343
3337
|
style: {
|
|
3344
3338
|
background: "var(--t-pill-bg)",
|
|
@@ -3373,13 +3367,13 @@ function rn({
|
|
|
3373
3367
|
"You will be charged for ",
|
|
3374
3368
|
ut,
|
|
3375
3369
|
" ",
|
|
3376
|
-
|
|
3370
|
+
X,
|
|
3377
3371
|
", the rest up to ",
|
|
3378
3372
|
lt(z),
|
|
3379
3373
|
" ",
|
|
3380
3374
|
te,
|
|
3381
3375
|
" will be credited to your ",
|
|
3382
|
-
|
|
3376
|
+
G,
|
|
3383
3377
|
" account"
|
|
3384
3378
|
] })
|
|
3385
3379
|
]
|
|
@@ -3401,12 +3395,12 @@ function rn({
|
|
|
3401
3395
|
{
|
|
3402
3396
|
methods: l.paymentMethods,
|
|
3403
3397
|
selectedId: y.paymentMethodId,
|
|
3404
|
-
onOpenModal: () =>
|
|
3398
|
+
onOpenModal: () => O("payment"),
|
|
3405
3399
|
fiatCurrency: y.fiatCurrency
|
|
3406
3400
|
}
|
|
3407
3401
|
) }),
|
|
3408
3402
|
/* @__PURE__ */ o("div", { className: "mt-8", children: [
|
|
3409
|
-
/* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children:
|
|
3403
|
+
/* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: K ? "Receiving wallet address" : "Sending wallet address" }),
|
|
3410
3404
|
/* @__PURE__ */ e(
|
|
3411
3405
|
"input",
|
|
3412
3406
|
{
|
|
@@ -3417,7 +3411,7 @@ function rn({
|
|
|
3417
3411
|
onBlur: () => {
|
|
3418
3412
|
Me(!1), Ve(!0);
|
|
3419
3413
|
},
|
|
3420
|
-
placeholder:
|
|
3414
|
+
placeholder: K ? "Enter your receiving address" : "Enter your sending address",
|
|
3421
3415
|
spellCheck: !1,
|
|
3422
3416
|
autoComplete: "off",
|
|
3423
3417
|
className: "w-full bg-transparent text-[13px] outline-none transition-colors",
|
|
@@ -3452,12 +3446,12 @@ function rn({
|
|
|
3452
3446
|
opacity: Ge && !ie && !b ? 1 : 0.4,
|
|
3453
3447
|
cursor: Ge && !ie && !b ? "pointer" : "not-allowed"
|
|
3454
3448
|
},
|
|
3455
|
-
children: b ? "Getting best price..." : ie ? "Processing..." :
|
|
3449
|
+
children: b ? "Getting best price..." : ie ? "Processing..." : K ? `Buy ${X}` : `Sell ${X}`
|
|
3456
3450
|
}
|
|
3457
3451
|
),
|
|
3458
3452
|
/* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
|
|
3459
3453
|
] }, Q),
|
|
3460
|
-
/* @__PURE__ */ e(He, { isOpen: xe === "fiat", onClose: () =>
|
|
3454
|
+
/* @__PURE__ */ e(He, { isOpen: xe === "fiat", onClose: () => O(null), children: (x) => {
|
|
3461
3455
|
var N;
|
|
3462
3456
|
return /* @__PURE__ */ e(
|
|
3463
3457
|
Za,
|
|
@@ -3472,21 +3466,21 @@ function rn({
|
|
|
3472
3466
|
}
|
|
3473
3467
|
);
|
|
3474
3468
|
} }),
|
|
3475
|
-
/* @__PURE__ */ e(He, { isOpen: xe === "crypto", onClose: () =>
|
|
3469
|
+
/* @__PURE__ */ e(He, { isOpen: xe === "crypto", onClose: () => O(null), children: (x) => {
|
|
3476
3470
|
var N;
|
|
3477
3471
|
return /* @__PURE__ */ e(
|
|
3478
3472
|
Qa,
|
|
3479
3473
|
{
|
|
3480
3474
|
onClose: x,
|
|
3481
|
-
onSelect: (T,
|
|
3482
|
-
aa(T,
|
|
3475
|
+
onSelect: (T, H) => {
|
|
3476
|
+
aa(T, H), x();
|
|
3483
3477
|
},
|
|
3484
3478
|
cryptos: (N = l == null ? void 0 : l.cryptos) == null ? void 0 : N.map((T) => {
|
|
3485
|
-
var
|
|
3479
|
+
var H;
|
|
3486
3480
|
return {
|
|
3487
3481
|
code: T.code,
|
|
3488
3482
|
name: T.code,
|
|
3489
|
-
networks: (
|
|
3483
|
+
networks: (H = T.networks) == null ? void 0 : H.map((oe) => ({ code: oe.id, name: oe.name }))
|
|
3490
3484
|
};
|
|
3491
3485
|
}),
|
|
3492
3486
|
assetBaseUrl: j,
|
|
@@ -3495,7 +3489,7 @@ function rn({
|
|
|
3495
3489
|
}
|
|
3496
3490
|
);
|
|
3497
3491
|
} }),
|
|
3498
|
-
/* @__PURE__ */ e(He, { isOpen: xe === "payment", onClose: () =>
|
|
3492
|
+
/* @__PURE__ */ e(He, { isOpen: xe === "payment", onClose: () => O(null), children: (x) => {
|
|
3499
3493
|
var N;
|
|
3500
3494
|
return /* @__PURE__ */ e(
|
|
3501
3495
|
za,
|
|
@@ -3509,7 +3503,7 @@ function rn({
|
|
|
3509
3503
|
}
|
|
3510
3504
|
);
|
|
3511
3505
|
} }),
|
|
3512
|
-
/* @__PURE__ */ e(He, { isOpen: xe === "settings", onClose: () =>
|
|
3506
|
+
/* @__PURE__ */ e(He, { isOpen: xe === "settings", onClose: () => O(null), children: (x) => /* @__PURE__ */ e(
|
|
3513
3507
|
en,
|
|
3514
3508
|
{
|
|
3515
3509
|
onClose: x,
|
|
@@ -3526,7 +3520,7 @@ function rn({
|
|
|
3526
3520
|
assetBaseUrl: j
|
|
3527
3521
|
}
|
|
3528
3522
|
) }),
|
|
3529
|
-
/* @__PURE__ */ e(He, { isOpen: xe === "country", onClose: () =>
|
|
3523
|
+
/* @__PURE__ */ e(He, { isOpen: xe === "country", onClose: () => O(null), children: (x) => /* @__PURE__ */ e(
|
|
3530
3524
|
an,
|
|
3531
3525
|
{
|
|
3532
3526
|
onClose: x,
|
|
@@ -3550,21 +3544,21 @@ function on({
|
|
|
3550
3544
|
brandId: c,
|
|
3551
3545
|
defaultFiatCurrency: m,
|
|
3552
3546
|
defaultCryptoCurrency: s,
|
|
3553
|
-
defaultNetwork:
|
|
3547
|
+
defaultNetwork: u,
|
|
3554
3548
|
defaultFiatAmount: f,
|
|
3555
3549
|
defaultCryptoAmount: h,
|
|
3556
|
-
defaultWalletAddress:
|
|
3550
|
+
defaultWalletAddress: d,
|
|
3557
3551
|
defaultGateway: p,
|
|
3558
3552
|
defaultCountry: g,
|
|
3559
3553
|
fieldLocks: A,
|
|
3560
3554
|
statusPollInterval: E,
|
|
3561
3555
|
onComplete: R,
|
|
3562
|
-
onError:
|
|
3556
|
+
onError: P,
|
|
3563
3557
|
className: ne,
|
|
3564
3558
|
theme: V,
|
|
3565
3559
|
skinId: Z,
|
|
3566
3560
|
accentColor: q,
|
|
3567
|
-
bgColor:
|
|
3561
|
+
bgColor: G,
|
|
3568
3562
|
bgImage: fe,
|
|
3569
3563
|
borderColor: y,
|
|
3570
3564
|
borderRadius: L,
|
|
@@ -3596,16 +3590,16 @@ function on({
|
|
|
3596
3590
|
brandId: c,
|
|
3597
3591
|
defaultFiatCurrency: m,
|
|
3598
3592
|
defaultCryptoCurrency: s,
|
|
3599
|
-
defaultNetwork:
|
|
3593
|
+
defaultNetwork: u,
|
|
3600
3594
|
defaultFiatAmount: f,
|
|
3601
3595
|
defaultCryptoAmount: h,
|
|
3602
|
-
defaultWalletAddress:
|
|
3596
|
+
defaultWalletAddress: d,
|
|
3603
3597
|
defaultGateway: p,
|
|
3604
3598
|
defaultCountry: g,
|
|
3605
3599
|
fieldLocks: A,
|
|
3606
3600
|
statusPollInterval: E,
|
|
3607
3601
|
onComplete: R,
|
|
3608
|
-
onError:
|
|
3602
|
+
onError: P,
|
|
3609
3603
|
children: /* @__PURE__ */ e(
|
|
3610
3604
|
rn,
|
|
3611
3605
|
{
|
|
@@ -3613,7 +3607,7 @@ function on({
|
|
|
3613
3607
|
theme: V,
|
|
3614
3608
|
skinId: Z,
|
|
3615
3609
|
accentColor: q,
|
|
3616
|
-
bgColor:
|
|
3610
|
+
bgColor: G,
|
|
3617
3611
|
bgImage: fe,
|
|
3618
3612
|
borderColor: y,
|
|
3619
3613
|
borderRadius: L,
|
|
@@ -3710,14 +3704,14 @@ function sn() {
|
|
|
3710
3704
|
background: "var(--t-surface)"
|
|
3711
3705
|
},
|
|
3712
3706
|
children: [
|
|
3713
|
-
/* @__PURE__ */ e(
|
|
3707
|
+
/* @__PURE__ */ e(_, { w: 36, h: 36, className: "rounded-full shrink-0" }),
|
|
3714
3708
|
/* @__PURE__ */ o("div", { className: "flex-1", children: [
|
|
3715
|
-
/* @__PURE__ */ e(
|
|
3716
|
-
/* @__PURE__ */ e(
|
|
3709
|
+
/* @__PURE__ */ e(_, { w: 90, h: 14, className: "mb-1.5" }),
|
|
3710
|
+
/* @__PURE__ */ e(_, { w: 60, h: 12 })
|
|
3717
3711
|
] }),
|
|
3718
3712
|
/* @__PURE__ */ o("div", { className: "text-right", children: [
|
|
3719
|
-
/* @__PURE__ */ e(
|
|
3720
|
-
/* @__PURE__ */ e(
|
|
3713
|
+
/* @__PURE__ */ e(_, { w: 40, h: 10, className: "mb-1.5" }),
|
|
3714
|
+
/* @__PURE__ */ e(_, { w: 80, h: 14 })
|
|
3721
3715
|
] })
|
|
3722
3716
|
]
|
|
3723
3717
|
},
|
|
@@ -3733,8 +3727,8 @@ function gn({
|
|
|
3733
3727
|
}) {
|
|
3734
3728
|
const [c, m] = v(""), s = Y(() => {
|
|
3735
3729
|
if (!(n != null && n.quotes)) return [];
|
|
3736
|
-
const
|
|
3737
|
-
return
|
|
3730
|
+
const u = c.trim().toLowerCase();
|
|
3731
|
+
return u ? n.quotes.filter((f) => f.gatewayName.toLowerCase().includes(u)) : n.quotes;
|
|
3738
3732
|
}, [n, c]);
|
|
3739
3733
|
return /* @__PURE__ */ o(J, { children: [
|
|
3740
3734
|
/* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(De, { onClick: t }) }),
|
|
@@ -3748,12 +3742,12 @@ function gn({
|
|
|
3748
3742
|
),
|
|
3749
3743
|
/* @__PURE__ */ e(Ke, { value: c, onChange: m }),
|
|
3750
3744
|
/* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
|
|
3751
|
-
r ? /* @__PURE__ */ e(sn, {}) : s.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : s.map((
|
|
3752
|
-
const h = f === 0,
|
|
3745
|
+
r ? /* @__PURE__ */ e(sn, {}) : s.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: n && n.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : s.map((u, f) => {
|
|
3746
|
+
const h = f === 0, d = parseFloat(u.cryptoAmount), p = d >= 1 ? d.toFixed(4) : d.toPrecision(6);
|
|
3753
3747
|
return /* @__PURE__ */ o(
|
|
3754
3748
|
"button",
|
|
3755
3749
|
{
|
|
3756
|
-
onClick: () => a(
|
|
3750
|
+
onClick: () => a(u),
|
|
3757
3751
|
className: "w-full flex items-center gap-3.5 transition-colors",
|
|
3758
3752
|
style: {
|
|
3759
3753
|
borderRadius: h ? 4.5 : 5,
|
|
@@ -3764,10 +3758,10 @@ function gn({
|
|
|
3764
3758
|
background: h ? "transparent" : "var(--t-surface)"
|
|
3765
3759
|
},
|
|
3766
3760
|
children: [
|
|
3767
|
-
/* @__PURE__ */ e(cn, { quote:
|
|
3761
|
+
/* @__PURE__ */ e(cn, { quote: u }),
|
|
3768
3762
|
/* @__PURE__ */ o("div", { className: "text-left flex-1 min-w-0", children: [
|
|
3769
|
-
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children:
|
|
3770
|
-
/* @__PURE__ */ e(ln, { quote:
|
|
3763
|
+
/* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: u.gatewayName }),
|
|
3764
|
+
/* @__PURE__ */ e(ln, { quote: u })
|
|
3771
3765
|
] }),
|
|
3772
3766
|
/* @__PURE__ */ o("div", { className: "text-right shrink-0", children: [
|
|
3773
3767
|
/* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
|
|
@@ -3779,20 +3773,20 @@ function gn({
|
|
|
3779
3773
|
] })
|
|
3780
3774
|
]
|
|
3781
3775
|
},
|
|
3782
|
-
|
|
3776
|
+
u.gatewayId
|
|
3783
3777
|
);
|
|
3784
3778
|
}),
|
|
3785
|
-
!r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((
|
|
3779
|
+
!r && (n == null ? void 0 : n.unavailableGateways) && n.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: n.unavailableGateways.map((u) => /* @__PURE__ */ o(
|
|
3786
3780
|
"div",
|
|
3787
3781
|
{
|
|
3788
3782
|
className: "flex items-center justify-between py-2 text-[12px]",
|
|
3789
3783
|
style: { color: "var(--t-text-muted)" },
|
|
3790
3784
|
children: [
|
|
3791
|
-
/* @__PURE__ */ e("span", { children:
|
|
3792
|
-
/* @__PURE__ */ e("span", { children:
|
|
3785
|
+
/* @__PURE__ */ e("span", { children: u.gatewayName }),
|
|
3786
|
+
/* @__PURE__ */ e("span", { children: u.reason })
|
|
3793
3787
|
]
|
|
3794
3788
|
},
|
|
3795
|
-
|
|
3789
|
+
u.gatewayId
|
|
3796
3790
|
)) })
|
|
3797
3791
|
] })
|
|
3798
3792
|
] });
|
|
@@ -3841,7 +3835,7 @@ export {
|
|
|
3841
3835
|
Mt as SKINS,
|
|
3842
3836
|
Ke as SearchInput,
|
|
3843
3837
|
en as SettingsScreen,
|
|
3844
|
-
|
|
3838
|
+
_ as Skeleton,
|
|
3845
3839
|
xn as SkinSwatch,
|
|
3846
3840
|
Ja as ToggleSwitch,
|
|
3847
3841
|
lt as formatOutput,
|