everest-npm-features 0.0.8 → 0.0.10
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/{Alert-BtAF4uo6.js → Alert-D1uo0xUN.js} +3 -3
- package/dist/{Button-S_vW7i_8.js → Button-DwM6qNzr.js} +1 -1
- package/dist/{ButtonBase-ILHWXvZi.js → ButtonBase-Bkt2XiiC.js} +2 -2
- package/dist/{CardContent-BLsvyJUZ.js → CardContent-D9I3IU_z.js} +2 -2
- package/dist/{CircularProgress-DYCklg37.js → CircularProgress-B06C3TSm.js} +1 -1
- package/dist/{DialogContent-BgKUjL4i.js → DialogContent-CGAaVPRP.js} +3 -3
- package/dist/{DialogTitle-1A1JxHKy.js → DialogTitle-CtNXjsMb.js} +1 -1
- package/dist/{FormControl-CKGUH1ax.js → FormControl-C_Aq5EJK.js} +1 -1
- package/dist/{FormControlLabel-Do2nmNuE.js → FormControlLabel-DzW2M9Zf.js} +2 -2
- package/dist/{Grow-Cl5q_s4E.js → Grow-BG0VcbVU.js} +2 -2
- package/dist/{IconButton-DJRmyJ7l.js → IconButton-DS04obIe.js} +2 -2
- package/dist/{Link-BoX8sDwo.js → Link-0ytX5jId.js} +1 -1
- package/dist/{ListItemIcon-SEyOLp6t.js → ListItemIcon-DcAQQVML.js} +2 -2
- package/dist/{MenuItem-DI0pq5k0.js → MenuItem-B5Ey6jYk.js} +3 -3
- package/dist/{Modal-DXE_7QA2.js → Modal-C4LVcV2P.js} +5 -5
- package/dist/{Paper-B2H6ZIFg.js → Paper-DcwigMU2.js} +1 -1
- package/dist/{PlayArrow-DNFHtcCO.js → PlayArrow-BWNpsDIu.js} +5 -5
- package/dist/{Portal-lSfc4EZw.js → Portal-CLVGr58E.js} +2 -2
- package/dist/{Select-Bs7YLhIQ.js → Select-PHF4wwtI.js} +12 -11
- package/dist/{Slide-BjOaaE2D.js → Slide-C7btcybu.js} +4 -3
- package/dist/{TextField-D4JEGFa0.js → TextField-CWAqkoYU.js} +4 -4
- package/dist/TransitionGroupContext-D3TPEzqp.js +37 -0
- package/dist/auth-CD4Ih2jU.js +66 -0
- package/dist/{bank-D37HPNrs.js → bank-WoJNjqIT.js} +1 -1
- package/dist/chainPropTypes-D9lkm76m.js +8 -0
- package/dist/components/Account/index.js +8 -8
- package/dist/components/History/index.js +6 -6
- package/dist/components/MoveToEthereumOrEverChain/index.js +17 -17
- package/dist/components/Profile/documents.js +8 -8
- package/dist/components/Profile/index.js +6 -6
- package/dist/components/Receive/index.js +7 -7
- package/dist/components/RocketRamp/MinimalKyc/form.js +6 -6
- package/dist/components/RocketRamp/Player/Buy/cardPayment.js +4 -4
- package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +4 -4
- package/dist/components/RocketRamp/Player/Buy/form.d.ts +1 -1
- package/dist/components/RocketRamp/Player/Buy/form.js +11 -11
- package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
- package/dist/components/RocketRamp/Player/Buy/types.d.ts +2 -0
- package/dist/components/RocketRamp/Player/Dashboard/balance.js +2 -2
- package/dist/components/RocketRamp/Player/Dashboard/index.js +15 -13
- package/dist/components/RocketRamp/Player/Dashboard/transaction.js +1 -1
- package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +6 -6
- package/dist/components/RocketRamp/Player/Sell/form.js +11 -11
- package/dist/components/RocketRamp/Player/Sell/index.js +5 -5
- package/dist/components/RocketRamp/Player/SignIn/index.js +2 -2
- package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
- package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
- package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
- package/dist/components/RocketRamp/Player/SignUp/index.js +9 -9
- package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +82 -77
- package/dist/components/RocketRamp/Player/SignUp/validateEmail.js +3 -3
- package/dist/components/RocketRamp/ResetPassword/form.d.ts +8 -0
- package/dist/components/RocketRamp/ResetPassword/form.js +104 -0
- package/dist/components/RocketRamp/ResetPassword/index.d.ts +7 -0
- package/dist/components/RocketRamp/ResetPassword/index.js +53 -0
- package/dist/components/RocketRamp/Shared/Button/index.js +2 -2
- package/dist/components/RocketRamp/Shared/Input/index.d.ts +6 -0
- package/dist/components/RocketRamp/Shared/Input/index.js +65 -26
- package/dist/components/RocketRamp/Shared/backBtn.js +1 -1
- package/dist/components/RocketRamp/Shared/transactionItem.js +2 -2
- package/dist/components/RocketRamp/Store/Dashboard/balance.d.ts +1 -4
- package/dist/components/RocketRamp/Store/Dashboard/balance.js +35 -68
- package/dist/components/RocketRamp/Store/Dashboard/index.js +17 -61
- package/dist/components/RocketRamp/Store/Dashboard/stats.d.ts +6 -0
- package/dist/components/RocketRamp/Store/Dashboard/stats.js +42 -0
- package/dist/components/RocketRamp/Store/Dashboard/transaction.js +1 -1
- package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +73 -68
- package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +55 -47
- package/dist/components/RocketRamp/Transactions/index.js +2 -2
- package/dist/components/Send/index.js +10 -10
- package/dist/components/Shared/ConnectWallet/index.js +5 -5
- package/dist/components/Shared/HistoryItem/index.js +2 -2
- package/dist/components/Shared/TokenModal/index.js +5 -5
- package/dist/components/Shared/addBank.js +7 -7
- package/dist/components/Shared/button.js +1 -1
- package/dist/components/Shared/connectPlaidBank.js +4 -4
- package/dist/components/Shared/incode.js +6 -6
- package/dist/components/Shared/inputField.js +1 -1
- package/dist/components/Shared/pin.js +1 -1
- package/dist/components/Shared/tooltip.js +7 -6
- package/dist/components/Shared/transition.js +1 -1
- package/dist/components/SignIn/index.js +5 -5
- package/dist/components/SignUp/index.js +3 -3
- package/dist/components/SignUp/pin.js +6 -6
- package/dist/components/SignUp/userInfo.js +1 -1
- package/dist/components/Stake/gems/index.js +6 -6
- package/dist/components/Stake/id/index.js +6 -6
- package/dist/components/Stake/index.js +6 -6
- package/dist/components/Swap/index.js +10 -10
- package/dist/components/WalletPortfolio/index.js +9 -9
- package/dist/components/WalletPortfolio/tokenRow.js +2 -2
- package/dist/{constants-Bb9tNMO0.js → constants-74hrsFxy.js} +290 -287
- package/dist/{documents-DvBUIEko.js → documents-DFzrb5Js.js} +7 -7
- package/dist/{elementTypeAcceptingRef-BPeKuzZ8.js → elementTypeAcceptingRef-CXUi-GtI.js} +1 -1
- package/dist/{fiatAssets-Dymvf3Le.js → fiatAssets-BySmKCPn.js} +1 -1
- package/dist/hooks/useDialog/index.js +2 -2
- package/dist/hooks/useRrDialog/index.js +2 -2
- package/dist/hooks/useSnackBar.js +6 -6
- package/dist/index-DNVjDI72.js +825 -0
- package/dist/{index-DYCdRrDV.js → index-Dxl09QM3.js} +12 -12
- package/dist/main.d.ts +2 -0
- package/dist/main.js +25 -21
- package/dist/{order-DMts-8Nr.js → order-BJOkWhkX.js} +1 -1
- package/dist/{ownerWindow-mVfGbIa3.js → ownerWindow-CQLKd2qC.js} +1 -1
- package/dist/{stake-BRmggIPz.js → stake-DeB_prrU.js} +1 -1
- package/dist/store.d.ts +10 -2
- package/dist/{tokenRow-g9IBe02c.js → tokenRow-4ZCv_fEG.js} +1 -1
- package/dist/{useSlot-D3uYAK6m.js → useSlot-CLUg2AtS.js} +1 -1
- package/dist/user-Doi440iN.js +24 -0
- package/dist/util/constants.d.ts +4 -0
- package/dist/util/constants.js +24 -20
- package/dist/util/functions.js +1 -1
- package/dist/util/regex.d.ts +3 -0
- package/dist/util/regex.js +5 -2
- package/dist/{utils-gxE2aXKK.js → utils-DeERUHi2.js} +16 -15
- package/dist/{wallet-Dfn4nFOn.js → wallet-BeLTGObA.js} +1 -1
- package/package.json +1 -1
- package/dist/CheckCircle-Czm8oSt7.js +0 -8
- package/dist/TransitionGroupContext-VwpFXTPO.js +0 -43
- package/dist/auth-Czk2iJ8q.js +0 -58
- package/dist/index-CMHIKDWK.js +0 -814
- package/dist/user-CsPLUenD.js +0 -24
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useEffect as _ } from "react";
|
|
3
|
+
import ze from "./hoc/withThemeProvider.js";
|
|
4
|
+
import { P as Oe, F as we } from "./PlayArrow-BWNpsDIu.js";
|
|
5
|
+
import { I as Be } from "./Info-DTcjrneu.js";
|
|
6
|
+
import { G as Le } from "./generic-token-B_ptO5yb.js";
|
|
7
|
+
import te from "./components/RocketRamp/Shared/Input/index.js";
|
|
8
|
+
import { ID_TOKEN_SYMBOL as ue, FIAT_TO_EVER_ID as re, FIAT_TO_TOKEN as ne, ESTIMATE_TOOLTIP_TEXT as Ve, VISA_PAYMENT as Ye, VISA_PAYMENT_ACTIVE as We, SEPA_PAYMENT as Ke, SEPA_PAYMENT_ACTIVE as qe, PAYMENT_BANK as pe, SEPA_ICON as De, VISA_ICON as _e, PAYMENT_PROVIDER_CHECKOUT as he } from "./util/constants.js";
|
|
9
|
+
import { ae as $e } from "./constants-74hrsFxy.js";
|
|
10
|
+
import { c as Ge, d as be, a as Ue, f as je, e as fe } from "./order-BJOkWhkX.js";
|
|
11
|
+
import He from "./components/Shared/tooltip.js";
|
|
12
|
+
import { getCurrencySymbol as Ce, removeExtraSpace as Xe, getOrionBalance as Qe } from "./util/functions.js";
|
|
13
|
+
import ae from "./components/RocketRamp/Shared/Button/index.js";
|
|
14
|
+
import Ne from "./components/RocketRamp/Shared/backBtn.js";
|
|
15
|
+
import { T as s } from "./Typography-Du8mj1kr.js";
|
|
16
|
+
import { B as x } from "./Box-Bt8cGqC7.js";
|
|
17
|
+
import { G as o } from "./Grid2-IYppkw5f.js";
|
|
18
|
+
import { C as I } from "./CircularProgress-B06C3TSm.js";
|
|
19
|
+
import "@incodetech/welcome";
|
|
20
|
+
import "./axios-BEX6n2A7.js";
|
|
21
|
+
import { useSnackBar as Je } from "./hooks/useSnackBar.js";
|
|
22
|
+
import "./components/SignUp/pin.js";
|
|
23
|
+
import { f as Ze } from "./fiatAssets-BySmKCPn.js";
|
|
24
|
+
import { u as et, a as W } from "./react-redux-B4BZippc.js";
|
|
25
|
+
import './assets/main.css';import './assets/index10.css';/* empty css */
|
|
26
|
+
import "./util/conversions.js";
|
|
27
|
+
import "./index-CAoLi5Qq.js";
|
|
28
|
+
import "./react-webcam-B3cXh1XT.js";
|
|
29
|
+
import "./components/Shared/transition.js";
|
|
30
|
+
import "./components/Shared/pin.js";
|
|
31
|
+
import "./moment-h96o7c8I.js";
|
|
32
|
+
import "./index.esm-BsMAMhYW.js";
|
|
33
|
+
import "./web3-u4qDZYpo.js";
|
|
34
|
+
import "./index-B8QKlEgj.js";
|
|
35
|
+
import tt from "./components/RocketRamp/MinimalKyc/form.js";
|
|
36
|
+
import { c as rt } from "./createSvgIcon-DhzhBkIq.js";
|
|
37
|
+
import { s as ye, p as nt, h as at, v as it } from "./index-ceeCtFuh.js";
|
|
38
|
+
import { I as ot } from "./TextField-CWAqkoYU.js";
|
|
39
|
+
import { F as st } from "./FormControl-C_Aq5EJK.js";
|
|
40
|
+
import { S as ct } from "./Select-PHF4wwtI.js";
|
|
41
|
+
import { M as xe } from "./MenuItem-B5Ey6jYk.js";
|
|
42
|
+
import { L as lt } from "./ListItemIcon-DcAQQVML.js";
|
|
43
|
+
import { I as ge } from "./IconButton-DS04obIe.js";
|
|
44
|
+
const mt = (C) => ({
|
|
45
|
+
type: $e,
|
|
46
|
+
payload: C
|
|
47
|
+
}), dt = rt(/* @__PURE__ */ e("path", {
|
|
48
|
+
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
49
|
+
}), "ErrorOutline"), K = {
|
|
50
|
+
"confirm-payment": "_confirm-payment_alxbn_1",
|
|
51
|
+
"confirm-transaction-network": "_confirm-transaction-network_alxbn_33",
|
|
52
|
+
"buy-info": "_buy-info_alxbn_57"
|
|
53
|
+
}, ut = ({
|
|
54
|
+
setScreen: C,
|
|
55
|
+
orderData: b,
|
|
56
|
+
dispatch: k,
|
|
57
|
+
fiatAssets: u,
|
|
58
|
+
cryptoAssets: p,
|
|
59
|
+
getCryptoAssets: n,
|
|
60
|
+
showAlertMessage: h,
|
|
61
|
+
partnerKey: M,
|
|
62
|
+
balance: g,
|
|
63
|
+
store: A
|
|
64
|
+
}) => {
|
|
65
|
+
const E = "USD", d = Ce(E), f = u.fiats, z = u.loader, P = p.featureTokens.list, N = p.featureTokens.default, q = p.loader, O = b.loader, c = b.estimate, S = c.crypto_out_amount, D = c.conversion_price, j = c.total_fee;
|
|
66
|
+
let H = 0, $ = 0;
|
|
67
|
+
const X = c.fee_breakdown;
|
|
68
|
+
for (let t = 0; t < X.length; t++) {
|
|
69
|
+
const i = X[t];
|
|
70
|
+
i.name === "ev_fee" ? H = Number(i.value) : i.name === "network_fee" && ($ = Number(i.value));
|
|
71
|
+
}
|
|
72
|
+
const [y, G] = l({
|
|
73
|
+
symbol: ""
|
|
74
|
+
}), [U, R] = l(!1), [T, a] = l(0), [v, L] = l(0), [w, Z] = l([]), [se, ve] = l(!1), [ce, Ee] = l(50), [le, ke] = l(3e3), [ee, Ae] = l(50), [me, Ie] = l(3e3), [Fe, V] = l(""), [Y, de] = l(
|
|
75
|
+
c.fiat_amount || ee.toString()
|
|
76
|
+
);
|
|
77
|
+
_(() => {
|
|
78
|
+
if (c.crypto_currency) {
|
|
79
|
+
const t = P.find(
|
|
80
|
+
(i) => i.symbol === c.crypto_currency
|
|
81
|
+
);
|
|
82
|
+
G(t);
|
|
83
|
+
} else
|
|
84
|
+
N && N.id && G(N);
|
|
85
|
+
}, [N, c.crypto_currency]), _(() => {
|
|
86
|
+
v && n(v);
|
|
87
|
+
}, [v]), _(() => {
|
|
88
|
+
if (f.length === 0)
|
|
89
|
+
return;
|
|
90
|
+
const t = [];
|
|
91
|
+
for (let i = 0; i < f.length; i++) {
|
|
92
|
+
if (f[i].symbol === E) {
|
|
93
|
+
const m = f[i].payment_options;
|
|
94
|
+
L(f[i].id);
|
|
95
|
+
let Q = !1;
|
|
96
|
+
for (let B = 0; B < m.length; B++) {
|
|
97
|
+
const J = m[B];
|
|
98
|
+
J.active && (t.push(J), m[B].id === T && (Q = !0));
|
|
99
|
+
}
|
|
100
|
+
Q || a(t[0].id);
|
|
101
|
+
}
|
|
102
|
+
Z(t);
|
|
103
|
+
}
|
|
104
|
+
}, [E, f]), _(() => {
|
|
105
|
+
if (y && y.id && Y && T && v) {
|
|
106
|
+
k(Ge()), R(!1), V("");
|
|
107
|
+
const t = setTimeout(() => {
|
|
108
|
+
Te();
|
|
109
|
+
}, 1e3);
|
|
110
|
+
return () => clearTimeout(t);
|
|
111
|
+
}
|
|
112
|
+
}, [y, Y, T, P, v]);
|
|
113
|
+
const Te = () => {
|
|
114
|
+
var B;
|
|
115
|
+
const t = parseFloat(Y);
|
|
116
|
+
if (y.symbol === ue) {
|
|
117
|
+
if (ce > t)
|
|
118
|
+
return V(
|
|
119
|
+
`Minimum value should be greater than ${d + ce}`
|
|
120
|
+
), R(!0), !1;
|
|
121
|
+
if (le * 1 < t)
|
|
122
|
+
return V(
|
|
123
|
+
`Maximum value should be less than ${d + le}`
|
|
124
|
+
), R(!0), !1;
|
|
125
|
+
} else {
|
|
126
|
+
if (ee * 1 > t)
|
|
127
|
+
return V(
|
|
128
|
+
`Minimum value should be greater than ${d + ee}`
|
|
129
|
+
), R(!0), !1;
|
|
130
|
+
if (me * 1 < t)
|
|
131
|
+
return V(
|
|
132
|
+
`Maximum value should be less than ${d + me}`
|
|
133
|
+
), R(!0), !1;
|
|
134
|
+
}
|
|
135
|
+
const i = parseFloat(A.balance);
|
|
136
|
+
if (t > i)
|
|
137
|
+
return V(
|
|
138
|
+
`Store doesn't have enough balance. Currently only ${A.balance} credits can be purchased`
|
|
139
|
+
), R(!0), !1;
|
|
140
|
+
const m = w.find((J) => J.id === T), Q = m.payment_type;
|
|
141
|
+
k(
|
|
142
|
+
be({
|
|
143
|
+
apiKey: M,
|
|
144
|
+
transaction_type: y.symbol === ue ? re : ne,
|
|
145
|
+
coin_amount: Y,
|
|
146
|
+
exchange: y.exchange,
|
|
147
|
+
payment_type: Q,
|
|
148
|
+
fiat_ccy: E,
|
|
149
|
+
crypto_ccy: y.symbol,
|
|
150
|
+
network: (B = y.network) == null ? void 0 : B.name,
|
|
151
|
+
payment_provider: m.payment_provider
|
|
152
|
+
})
|
|
153
|
+
);
|
|
154
|
+
}, Me = ({ value: t, label: i }) => {
|
|
155
|
+
let m;
|
|
156
|
+
if (i === "credit_debit_card" ? (m = Ye, T === t && (m = We)) : (m = Ke, T === t && (m = qe)), i)
|
|
157
|
+
return /* @__PURE__ */ e(
|
|
158
|
+
x,
|
|
159
|
+
{
|
|
160
|
+
mt: 0.5,
|
|
161
|
+
sx: { cursor: "pointer" },
|
|
162
|
+
onClick: () => a(t * 1),
|
|
163
|
+
children: /* @__PURE__ */ e("img", { src: m, alt: "payment", width: "90%" })
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
_(() => {
|
|
168
|
+
const t = b.types.length;
|
|
169
|
+
if (t > 0)
|
|
170
|
+
for (let i = 0; i < t; i++) {
|
|
171
|
+
const m = b.types[i];
|
|
172
|
+
if (m.type === re) {
|
|
173
|
+
Ee(parseFloat(m.min_deposit_amount)), ke(parseFloat(m.max_deposit_amount));
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
if (m.type === ne) {
|
|
177
|
+
Ae(parseFloat(m.min_deposit_amount)), Ie(parseFloat(m.max_deposit_amount));
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}, [b.types]);
|
|
182
|
+
const Pe = (t) => {
|
|
183
|
+
const i = t.target.value;
|
|
184
|
+
i ? /^([0-9]+)$/.test(i) && de(i) : de("");
|
|
185
|
+
}, Se = (t) => {
|
|
186
|
+
const i = P.find((m) => m.symbol === t);
|
|
187
|
+
G(i);
|
|
188
|
+
}, Re = () => {
|
|
189
|
+
if (!y.id)
|
|
190
|
+
return h({ message: "Please select token" }), !1;
|
|
191
|
+
if (!T)
|
|
192
|
+
return h({ message: "Please select payment method" }), !1;
|
|
193
|
+
if (!Y)
|
|
194
|
+
return h({ message: "Please enter amount" }), !1;
|
|
195
|
+
if (!S)
|
|
196
|
+
return h({
|
|
197
|
+
message: "Please wait for the estimate to be calculated and then press next"
|
|
198
|
+
}), !1;
|
|
199
|
+
C(oe);
|
|
200
|
+
};
|
|
201
|
+
return /* @__PURE__ */ r(F, { children: [
|
|
202
|
+
/* @__PURE__ */ r(o, { mt: 0.5, spacing: 1, container: !0, children: [
|
|
203
|
+
/* @__PURE__ */ e(o, { size: { xs: 3.5 }, children: /* @__PURE__ */ r(x, { className: K["buy-info"], children: [
|
|
204
|
+
/* @__PURE__ */ e(s, { variant: "2xl", children: /* @__PURE__ */ e("strong", { children: "Buy Credits" }) }),
|
|
205
|
+
/* @__PURE__ */ r(s, { variant: "md", children: [
|
|
206
|
+
"1 credit = ",
|
|
207
|
+
D,
|
|
208
|
+
d
|
|
209
|
+
] })
|
|
210
|
+
] }) }),
|
|
211
|
+
/* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ r(
|
|
212
|
+
x,
|
|
213
|
+
{
|
|
214
|
+
className: K["buy-info"],
|
|
215
|
+
sx: {
|
|
216
|
+
padding: "0px 50px !important",
|
|
217
|
+
alignItems: "center"
|
|
218
|
+
},
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ e(s, { variant: "md", children: "MAX amount you can request:" }),
|
|
221
|
+
/* @__PURE__ */ e(s, { variant: "md", children: A.balanceLoader ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 15, color: "primary" }) : /* @__PURE__ */ r(F, { children: [
|
|
222
|
+
A.balance,
|
|
223
|
+
" credits"
|
|
224
|
+
] }) })
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
) }),
|
|
228
|
+
/* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ r(
|
|
229
|
+
x,
|
|
230
|
+
{
|
|
231
|
+
className: K["buy-info"],
|
|
232
|
+
sx: {
|
|
233
|
+
background: "black !important",
|
|
234
|
+
color: "white !important"
|
|
235
|
+
},
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ e(s, { variant: "md", className: "text-right", children: "Game Balance" }),
|
|
238
|
+
/* @__PURE__ */ e(s, { variant: "lg", className: "text-right", children: g })
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
) })
|
|
242
|
+
] }),
|
|
243
|
+
/* @__PURE__ */ e(o, { mt: 2, spacing: 2, container: !0, children: /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
244
|
+
te,
|
|
245
|
+
{
|
|
246
|
+
label: "You Pay",
|
|
247
|
+
value: Y,
|
|
248
|
+
onChange: Pe,
|
|
249
|
+
type: "text",
|
|
250
|
+
labelFontWeight: 600,
|
|
251
|
+
error: U,
|
|
252
|
+
errorText: Fe,
|
|
253
|
+
required: !0,
|
|
254
|
+
fullWidth: !0
|
|
255
|
+
}
|
|
256
|
+
) }) }),
|
|
257
|
+
/* @__PURE__ */ r(x, { className: "text-left", mt: 3, children: [
|
|
258
|
+
/* @__PURE__ */ e(s, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
|
|
259
|
+
z ? /* @__PURE__ */ e(I, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(o, { mt: 0.5, container: !0, children: w.map((t) => /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
|
|
260
|
+
Me,
|
|
261
|
+
{
|
|
262
|
+
label: t.payment_type,
|
|
263
|
+
value: t.id
|
|
264
|
+
}
|
|
265
|
+
) }, t.id)) })
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ r(o, { mt: 3, spacing: 2, container: !0, children: [
|
|
268
|
+
/* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
269
|
+
te,
|
|
270
|
+
{
|
|
271
|
+
label: "You Receive",
|
|
272
|
+
labelFontWeight: 600,
|
|
273
|
+
value: S && parseFloat((+S * 1).toFixed(5)),
|
|
274
|
+
type: "text",
|
|
275
|
+
error: U,
|
|
276
|
+
readOnly: !0,
|
|
277
|
+
required: !0,
|
|
278
|
+
fullWidth: !0
|
|
279
|
+
}
|
|
280
|
+
) }),
|
|
281
|
+
/* @__PURE__ */ e(o, { size: { xs: 5 }, className: "content-center", children: q ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ r(F, { children: [
|
|
282
|
+
/* @__PURE__ */ e(ot, { children: " " }),
|
|
283
|
+
/* @__PURE__ */ e(st, { variant: "outlined", fullWidth: !0, children: /* @__PURE__ */ r(
|
|
284
|
+
ct,
|
|
285
|
+
{
|
|
286
|
+
sx: { marginTop: "-2px" },
|
|
287
|
+
inputProps: {
|
|
288
|
+
sx: {
|
|
289
|
+
display: "flex",
|
|
290
|
+
alignItems: "center",
|
|
291
|
+
padding: "10px"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
value: y.symbol,
|
|
295
|
+
onChange: (t) => Se(t.target.value),
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ e(xe, { value: "", children: "Please select" }),
|
|
298
|
+
P.map((t) => /* @__PURE__ */ r(xe, { value: t.symbol, children: [
|
|
299
|
+
/* @__PURE__ */ e(lt, { className: "dropdown-list-item", children: /* @__PURE__ */ e(
|
|
300
|
+
"img",
|
|
301
|
+
{
|
|
302
|
+
src: t.icon_uri,
|
|
303
|
+
onError: ({ currentTarget: i }) => {
|
|
304
|
+
i.onerror = null, i.src = Le;
|
|
305
|
+
},
|
|
306
|
+
alt: "tokenImg",
|
|
307
|
+
width: "36",
|
|
308
|
+
height: "36"
|
|
309
|
+
}
|
|
310
|
+
) }),
|
|
311
|
+
/* @__PURE__ */ e("span", { children: t.name })
|
|
312
|
+
] }, t.id))
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
) })
|
|
316
|
+
] }) })
|
|
317
|
+
] }),
|
|
318
|
+
/* @__PURE__ */ e(x, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ r(o, { container: !0, children: [
|
|
319
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ r(
|
|
320
|
+
ge,
|
|
321
|
+
{
|
|
322
|
+
sx: { padding: "0" },
|
|
323
|
+
onClick: () => ve((t) => !t),
|
|
324
|
+
disableFocusRipple: !0,
|
|
325
|
+
disableRipple: !0,
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ e(s, { variant: "md", fontWeight: 500, children: "Fee Calculation" }),
|
|
328
|
+
/* @__PURE__ */ e(
|
|
329
|
+
Oe,
|
|
330
|
+
{
|
|
331
|
+
sx: {
|
|
332
|
+
transform: `rotate(${se ? "90" : "0"}deg)`,
|
|
333
|
+
fontSize: "15px"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
) }),
|
|
340
|
+
se && /* @__PURE__ */ r(F, { children: [
|
|
341
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Everest Fee" }) }),
|
|
342
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
343
|
+
d,
|
|
344
|
+
O ? /* @__PURE__ */ e(I, { size: 30, color: "primary" }) : H.toFixed(2)
|
|
345
|
+
] }) }),
|
|
346
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Network Fee" }) }),
|
|
347
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
348
|
+
d,
|
|
349
|
+
O ? /* @__PURE__ */ e(
|
|
350
|
+
I,
|
|
351
|
+
{
|
|
352
|
+
sx: { ml: 1 },
|
|
353
|
+
size: 15,
|
|
354
|
+
color: "primary"
|
|
355
|
+
}
|
|
356
|
+
) : $.toFixed(2)
|
|
357
|
+
] }) })
|
|
358
|
+
] }),
|
|
359
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
|
|
360
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
361
|
+
d,
|
|
362
|
+
O ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(j).toFixed(2)
|
|
363
|
+
] }) }),
|
|
364
|
+
y && /* @__PURE__ */ r(F, { children: [
|
|
365
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
366
|
+
"1 ",
|
|
367
|
+
y.symbol,
|
|
368
|
+
" ",
|
|
369
|
+
/* @__PURE__ */ e(
|
|
370
|
+
He,
|
|
371
|
+
{
|
|
372
|
+
title: Ve,
|
|
373
|
+
placement: "right",
|
|
374
|
+
children: /* @__PURE__ */ e(ge, { className: "info-fee-icon", children: /* @__PURE__ */ e(
|
|
375
|
+
Be,
|
|
376
|
+
{
|
|
377
|
+
sx: {
|
|
378
|
+
fontSize: "14px"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
) })
|
|
382
|
+
}
|
|
383
|
+
)
|
|
384
|
+
] }) }),
|
|
385
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
386
|
+
d,
|
|
387
|
+
O ? /* @__PURE__ */ e(
|
|
388
|
+
I,
|
|
389
|
+
{
|
|
390
|
+
sx: { ml: 1 },
|
|
391
|
+
size: 15,
|
|
392
|
+
color: "primary"
|
|
393
|
+
}
|
|
394
|
+
) : Number(D).toFixed(2)
|
|
395
|
+
] }) })
|
|
396
|
+
] })
|
|
397
|
+
] }) }),
|
|
398
|
+
/* @__PURE__ */ e(x, { mt: 4, children: /* @__PURE__ */ e(
|
|
399
|
+
ae,
|
|
400
|
+
{
|
|
401
|
+
onClick: Re,
|
|
402
|
+
disabled: U || !S,
|
|
403
|
+
fullWidth: !0,
|
|
404
|
+
children: /* @__PURE__ */ e("strong", { children: "Next" })
|
|
405
|
+
}
|
|
406
|
+
) })
|
|
407
|
+
] });
|
|
408
|
+
}, pt = ({
|
|
409
|
+
setScreen: C,
|
|
410
|
+
partnerKey: b,
|
|
411
|
+
orderData: k,
|
|
412
|
+
dispatch: u,
|
|
413
|
+
walletAddress: p
|
|
414
|
+
}) => {
|
|
415
|
+
const n = k.estimate, h = k.create.order_id, M = k.loader, g = n.fiat_amount, A = Ce(n.fiat_currency), [E, d] = l(!1);
|
|
416
|
+
_(() => {
|
|
417
|
+
h && E && C(ft);
|
|
418
|
+
}, [h]), _(() => {
|
|
419
|
+
f();
|
|
420
|
+
}, []);
|
|
421
|
+
const f = () => {
|
|
422
|
+
u(
|
|
423
|
+
be({
|
|
424
|
+
...n,
|
|
425
|
+
apiKey: b,
|
|
426
|
+
transaction_type: n.transaction_type,
|
|
427
|
+
coin_amount: n.fiat_amount,
|
|
428
|
+
exchange: n.exchange,
|
|
429
|
+
payment_type: n.payment_type,
|
|
430
|
+
fiat_ccy: n.fiat_currency,
|
|
431
|
+
crypto_ccy: n.crypto_currency,
|
|
432
|
+
network: n.network,
|
|
433
|
+
payment_provider: n.payment_provider
|
|
434
|
+
})
|
|
435
|
+
);
|
|
436
|
+
}, z = () => {
|
|
437
|
+
u(
|
|
438
|
+
Ue({
|
|
439
|
+
apiKey: b,
|
|
440
|
+
quoteId: n.quote_id,
|
|
441
|
+
walletAddress: p
|
|
442
|
+
})
|
|
443
|
+
), d(!0);
|
|
444
|
+
};
|
|
445
|
+
return /* @__PURE__ */ r(F, { children: [
|
|
446
|
+
/* @__PURE__ */ e(Ne, { onClickHandler: () => C(ie) }),
|
|
447
|
+
/* @__PURE__ */ e(s, { mt: 2, variant: "sm", fontWeight: 600, children: "Using payment method" }),
|
|
448
|
+
/* @__PURE__ */ r(x, { mt: 2, className: K["confirm-payment"], children: [
|
|
449
|
+
/* @__PURE__ */ e(
|
|
450
|
+
"img",
|
|
451
|
+
{
|
|
452
|
+
src: n.payment_type === pe ? De : _e,
|
|
453
|
+
width: 100,
|
|
454
|
+
alt: "payment"
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ e(s, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: n.payment_type === pe ? "Bank Account" : "Debit Card" }) })
|
|
458
|
+
] }),
|
|
459
|
+
/* @__PURE__ */ e(s, { mt: 4, variant: "sm", fontWeight: 600, children: "To Wallet Address" }),
|
|
460
|
+
/* @__PURE__ */ e(
|
|
461
|
+
x,
|
|
462
|
+
{
|
|
463
|
+
mt: 2,
|
|
464
|
+
className: K["confirm-payment"],
|
|
465
|
+
sx: { width: "100% !important" },
|
|
466
|
+
children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: p }) })
|
|
467
|
+
}
|
|
468
|
+
),
|
|
469
|
+
/* @__PURE__ */ e(s, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
|
|
470
|
+
/* @__PURE__ */ e(x, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ r(o, { container: !0, children: [
|
|
471
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
472
|
+
n.crypto_currency.toUpperCase(),
|
|
473
|
+
" @",
|
|
474
|
+
" ",
|
|
475
|
+
Number(n.conversion_price).toFixed(2),
|
|
476
|
+
" ",
|
|
477
|
+
n.fiat_currency
|
|
478
|
+
] }) }),
|
|
479
|
+
/* @__PURE__ */ e(o, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
480
|
+
"span",
|
|
481
|
+
{
|
|
482
|
+
className: K["confirm-transaction-network"],
|
|
483
|
+
style: {
|
|
484
|
+
backgroundColor: n.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
|
|
485
|
+
},
|
|
486
|
+
children: n.network
|
|
487
|
+
}
|
|
488
|
+
) }),
|
|
489
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
490
|
+
Number(n.crypto_out_amount).toFixed(5),
|
|
491
|
+
" ",
|
|
492
|
+
n.crypto_currency.toUpperCase()
|
|
493
|
+
] }) }),
|
|
494
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
495
|
+
(Number(g) - Number(n.total_fee)).toFixed(2),
|
|
496
|
+
" ",
|
|
497
|
+
n.fiat_currency
|
|
498
|
+
] }) }),
|
|
499
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
|
|
500
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
|
|
501
|
+
Number(n.total_fee).toFixed(2),
|
|
502
|
+
" ",
|
|
503
|
+
n.fiat_currency
|
|
504
|
+
] }) }),
|
|
505
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
|
|
506
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ r("strong", { children: [
|
|
507
|
+
A,
|
|
508
|
+
Number(g).toFixed(2),
|
|
509
|
+
" ",
|
|
510
|
+
n.fiat_currency
|
|
511
|
+
] }) }) })
|
|
512
|
+
] }) }),
|
|
513
|
+
/* @__PURE__ */ e(x, { mt: 4, children: /* @__PURE__ */ e(
|
|
514
|
+
ae,
|
|
515
|
+
{
|
|
516
|
+
onClick: z,
|
|
517
|
+
disabled: M,
|
|
518
|
+
fullWidth: !0,
|
|
519
|
+
children: /* @__PURE__ */ e("strong", { children: M ? /* @__PURE__ */ r(F, { children: [
|
|
520
|
+
/* @__PURE__ */ e(I, { size: 15, color: "inherit" }),
|
|
521
|
+
" Processing..."
|
|
522
|
+
] }) : "Payment Details" })
|
|
523
|
+
}
|
|
524
|
+
) })
|
|
525
|
+
] });
|
|
526
|
+
}, ht = ({
|
|
527
|
+
checkoutKey: C,
|
|
528
|
+
setScreen: b,
|
|
529
|
+
showAlertMessage: k,
|
|
530
|
+
rrBaseUrl: u,
|
|
531
|
+
orderData: p,
|
|
532
|
+
dispatch: n
|
|
533
|
+
}) => {
|
|
534
|
+
const h = p.estimate, M = p.create.order_id, g = p.payment, [A, E] = l(!0), [d, f] = l(""), [z, P] = l(!1), [N, q] = l({
|
|
535
|
+
name: "",
|
|
536
|
+
billingAddress: {
|
|
537
|
+
addressLine1: ""
|
|
538
|
+
}
|
|
539
|
+
}), [O, c] = l(!1), [S, D] = l(!0), [j, H] = l(!0), [$, X] = l(!0), [y, G] = l(!0);
|
|
540
|
+
_(() => {
|
|
541
|
+
var a, v, L, w;
|
|
542
|
+
(v = (a = g == null ? void 0 : g._links) == null ? void 0 : a.redirect) != null && v.href && window.location.replace((w = (L = g == null ? void 0 : g._links) == null ? void 0 : L.redirect) == null ? void 0 : w.href);
|
|
543
|
+
}, [g]), _(() => {
|
|
544
|
+
q({
|
|
545
|
+
name: d,
|
|
546
|
+
billingAddress: {
|
|
547
|
+
addressLine1: ""
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
}, [d]), _(() => {
|
|
551
|
+
!j && !$ && !y && d !== "" ? S && D(!1) : S || D(!0);
|
|
552
|
+
}, [d, j, $, y]);
|
|
553
|
+
const U = (a, v, L, w = /./) => {
|
|
554
|
+
if (a !== "" && !w.test(a))
|
|
555
|
+
return !1;
|
|
556
|
+
v(a);
|
|
557
|
+
const Z = typeof a == "string" ? Xe(a) : a;
|
|
558
|
+
L(!Z);
|
|
559
|
+
}, R = (a) => {
|
|
560
|
+
if (a && a.element)
|
|
561
|
+
switch (a.element) {
|
|
562
|
+
case "card-number":
|
|
563
|
+
H(a.isEmpty || !a.isValid);
|
|
564
|
+
break;
|
|
565
|
+
case "expiry-date":
|
|
566
|
+
X(a.isEmpty || !a.isValid);
|
|
567
|
+
break;
|
|
568
|
+
case "cvv":
|
|
569
|
+
G(a.isEmpty || !a.isValid);
|
|
570
|
+
break;
|
|
571
|
+
default:
|
|
572
|
+
console.log("NOOP");
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
}, T = (a) => {
|
|
576
|
+
if (a === "") {
|
|
577
|
+
k({ message: "Error processing card" }), c(!1), b(ie);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
580
|
+
const v = {
|
|
581
|
+
token: a,
|
|
582
|
+
amount: Number(h.fiat_amount),
|
|
583
|
+
currency: h.fiat_currency,
|
|
584
|
+
reference: M,
|
|
585
|
+
success_url: `${u}/dashboard?payment=success`,
|
|
586
|
+
fail_url: `${u}/dashboard?payment=failed`
|
|
587
|
+
};
|
|
588
|
+
n(je(v));
|
|
589
|
+
};
|
|
590
|
+
return /* @__PURE__ */ r(F, { children: [
|
|
591
|
+
/* @__PURE__ */ e(Ne, { onClickHandler: () => b(oe) }),
|
|
592
|
+
/* @__PURE__ */ r(s, { className: "text-center", variant: "subtitle1", mt: 2, children: [
|
|
593
|
+
/* @__PURE__ */ e("img", { src: _e, width: 140, alt: "Debit Card" }),
|
|
594
|
+
/* @__PURE__ */ e("br", {}),
|
|
595
|
+
/* @__PURE__ */ e("b", { children: "Debit Card" })
|
|
596
|
+
] }),
|
|
597
|
+
/* @__PURE__ */ r(
|
|
598
|
+
s,
|
|
599
|
+
{
|
|
600
|
+
className: "text-center d-flex items-center",
|
|
601
|
+
variant: "caption",
|
|
602
|
+
mt: 2,
|
|
603
|
+
children: [
|
|
604
|
+
/* @__PURE__ */ e(dt, {}),
|
|
605
|
+
" ",
|
|
606
|
+
/* @__PURE__ */ e("b", { style: { marginTop: "3px" }, children: "Fiat purchasing is not available for users with Chase and Citi bank accounts" })
|
|
607
|
+
]
|
|
608
|
+
}
|
|
609
|
+
),
|
|
610
|
+
h.payment_provider === he && A && /* @__PURE__ */ e(x, { className: "text-center", mt: 8, children: /* @__PURE__ */ e(I, {}) }),
|
|
611
|
+
/* @__PURE__ */ e(x, { mt: 2, children: h.payment_provider === he && /* @__PURE__ */ r(
|
|
612
|
+
ye,
|
|
613
|
+
{
|
|
614
|
+
config: {
|
|
615
|
+
debug: !1,
|
|
616
|
+
publicKey: C,
|
|
617
|
+
acceptedPaymentMethods: ["Visa", "Mastercard"],
|
|
618
|
+
cardholder: N,
|
|
619
|
+
localization: {
|
|
620
|
+
cardNumberPlaceholder: "Card number",
|
|
621
|
+
expiryMonthPlaceholder: "MM",
|
|
622
|
+
expiryYearPlaceholder: "YY",
|
|
623
|
+
cvvPlaceholder: "CVV"
|
|
624
|
+
},
|
|
625
|
+
style: {
|
|
626
|
+
base: {
|
|
627
|
+
color: "black",
|
|
628
|
+
fontSize: "18px"
|
|
629
|
+
},
|
|
630
|
+
// autofill: {
|
|
631
|
+
// backgroundColor: "yellow",
|
|
632
|
+
// },
|
|
633
|
+
// hover: {
|
|
634
|
+
// color: "blue",
|
|
635
|
+
// },
|
|
636
|
+
focus: {
|
|
637
|
+
color: "blue"
|
|
638
|
+
},
|
|
639
|
+
valid: {
|
|
640
|
+
color: "green"
|
|
641
|
+
},
|
|
642
|
+
invalid: {
|
|
643
|
+
color: "red"
|
|
644
|
+
},
|
|
645
|
+
placeholder: {
|
|
646
|
+
base: {
|
|
647
|
+
color: "gray",
|
|
648
|
+
marginLeft: "20px"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
ready: () => {
|
|
654
|
+
E(!1);
|
|
655
|
+
},
|
|
656
|
+
frameValidationChanged: (a) => {
|
|
657
|
+
R(a);
|
|
658
|
+
},
|
|
659
|
+
cardSubmitted: () => {
|
|
660
|
+
c(!0);
|
|
661
|
+
},
|
|
662
|
+
cardTokenized: (a) => {
|
|
663
|
+
T(a.token);
|
|
664
|
+
},
|
|
665
|
+
cardTokenizationFailed: (a) => {
|
|
666
|
+
alert("card tokenization failed"), console.log(a);
|
|
667
|
+
},
|
|
668
|
+
children: [
|
|
669
|
+
/* @__PURE__ */ e(
|
|
670
|
+
te,
|
|
671
|
+
{
|
|
672
|
+
label: "Name on Card",
|
|
673
|
+
value: d,
|
|
674
|
+
onChange: (a) => U(a.target.value, f, P),
|
|
675
|
+
error: z
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
/* @__PURE__ */ e(
|
|
679
|
+
nt,
|
|
680
|
+
{
|
|
681
|
+
style: {
|
|
682
|
+
height: "4em",
|
|
683
|
+
margin: "20px 0",
|
|
684
|
+
padding: "20px",
|
|
685
|
+
border: "1px solid #999"
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
),
|
|
689
|
+
/* @__PURE__ */ e(
|
|
690
|
+
at,
|
|
691
|
+
{
|
|
692
|
+
style: {
|
|
693
|
+
height: "4em",
|
|
694
|
+
margin: "20px 0",
|
|
695
|
+
padding: "20px",
|
|
696
|
+
border: "1px solid #999"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
),
|
|
700
|
+
/* @__PURE__ */ e(
|
|
701
|
+
it,
|
|
702
|
+
{
|
|
703
|
+
style: {
|
|
704
|
+
height: "4em",
|
|
705
|
+
margin: "20px 0",
|
|
706
|
+
padding: "20px",
|
|
707
|
+
border: "1px solid #999"
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
),
|
|
711
|
+
/* @__PURE__ */ e(
|
|
712
|
+
ae,
|
|
713
|
+
{
|
|
714
|
+
onClick: () => {
|
|
715
|
+
ye.submitCard();
|
|
716
|
+
},
|
|
717
|
+
fullWidth: !0,
|
|
718
|
+
disabled: S,
|
|
719
|
+
children: /* @__PURE__ */ e("strong", { children: O ? /* @__PURE__ */ r(F, { children: [
|
|
720
|
+
/* @__PURE__ */ e(I, { size: 15, color: "inherit" }),
|
|
721
|
+
" Processing..."
|
|
722
|
+
] }) : "Pay" })
|
|
723
|
+
}
|
|
724
|
+
)
|
|
725
|
+
]
|
|
726
|
+
}
|
|
727
|
+
) }),
|
|
728
|
+
/* @__PURE__ */ e(x, { mt: 8, children: /* @__PURE__ */ e("div", { id: "st-animated-card" }) })
|
|
729
|
+
] });
|
|
730
|
+
}, ie = "FORM_SCREEN", oe = "CONFIRM_SCREEN", ft = "PAYMENT_SCREEN", yt = "MINIMAL_KYC_SCREEN", xt = ({
|
|
731
|
+
partnerKey: C,
|
|
732
|
+
rrBaseUrl: b,
|
|
733
|
+
checkoutSdkKey: k
|
|
734
|
+
}) => {
|
|
735
|
+
const u = et(), p = W((c) => c.order), n = W(
|
|
736
|
+
(c) => c.user.profile
|
|
737
|
+
), h = p.error, M = W(
|
|
738
|
+
(c) => c.user.profile.everWalletAddress
|
|
739
|
+
), g = W(
|
|
740
|
+
(c) => c.fiatAssets
|
|
741
|
+
), A = W(
|
|
742
|
+
(c) => c.cryptoAssets
|
|
743
|
+
), E = W((c) => c.app), [d, f] = l(ie), [z, P] = l(0), { showAlertMessage: N, snackBar: q } = Je();
|
|
744
|
+
return _(() => {
|
|
745
|
+
P(Qe(n.tokens.list));
|
|
746
|
+
}, [n.tokens]), _(() => {
|
|
747
|
+
h && N({ message: h });
|
|
748
|
+
}, [h]), _(() => {
|
|
749
|
+
p.initMinimalKyc && (N({ message: h, type: "info" }), f(yt));
|
|
750
|
+
}, [p.initMinimalKyc]), _(() => {
|
|
751
|
+
u(Ze()), u(fe(ne)), u(fe(re)), u(mt(E.store.info.id));
|
|
752
|
+
}, []), /* @__PURE__ */ r(F, { children: [
|
|
753
|
+
q,
|
|
754
|
+
/* @__PURE__ */ e(
|
|
755
|
+
x,
|
|
756
|
+
{
|
|
757
|
+
sx: {
|
|
758
|
+
padding: { xs: "1rem", md: "2rem" },
|
|
759
|
+
backgroundColor: "#FFFFFF",
|
|
760
|
+
borderRadius: "1rem",
|
|
761
|
+
boxShadow: "0px 0px 64px 0px rgba(247, 247, 248, 1)"
|
|
762
|
+
},
|
|
763
|
+
children: {
|
|
764
|
+
FORM_SCREEN: /* @__PURE__ */ e(
|
|
765
|
+
ut,
|
|
766
|
+
{
|
|
767
|
+
showAlertMessage: N,
|
|
768
|
+
setScreen: f,
|
|
769
|
+
fiatAssets: g,
|
|
770
|
+
cryptoAssets: A,
|
|
771
|
+
orderData: p,
|
|
772
|
+
dispatch: u,
|
|
773
|
+
getCryptoAssets: (c) => {
|
|
774
|
+
u(we({ type: "buy", id: c, partnerKey: C }));
|
|
775
|
+
},
|
|
776
|
+
partnerKey: C,
|
|
777
|
+
balance: z,
|
|
778
|
+
store: E.store
|
|
779
|
+
}
|
|
780
|
+
),
|
|
781
|
+
CONFIRM_SCREEN: /* @__PURE__ */ e(
|
|
782
|
+
pt,
|
|
783
|
+
{
|
|
784
|
+
partnerKey: C,
|
|
785
|
+
setScreen: f,
|
|
786
|
+
showAlertMessage: N,
|
|
787
|
+
orderData: p,
|
|
788
|
+
dispatch: u,
|
|
789
|
+
walletAddress: M
|
|
790
|
+
}
|
|
791
|
+
),
|
|
792
|
+
PAYMENT_SCREEN: /* @__PURE__ */ e(
|
|
793
|
+
ht,
|
|
794
|
+
{
|
|
795
|
+
checkoutKey: k,
|
|
796
|
+
setScreen: f,
|
|
797
|
+
showAlertMessage: N,
|
|
798
|
+
orderData: p,
|
|
799
|
+
rrBaseUrl: b,
|
|
800
|
+
dispatch: u
|
|
801
|
+
}
|
|
802
|
+
),
|
|
803
|
+
MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
|
|
804
|
+
tt,
|
|
805
|
+
{
|
|
806
|
+
onComplete: () => {
|
|
807
|
+
f(oe);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
)
|
|
811
|
+
}[d]
|
|
812
|
+
}
|
|
813
|
+
)
|
|
814
|
+
] });
|
|
815
|
+
}, sr = ze(xt);
|
|
816
|
+
export {
|
|
817
|
+
ut as B,
|
|
818
|
+
ht as C,
|
|
819
|
+
ie as F,
|
|
820
|
+
yt as M,
|
|
821
|
+
ft as P,
|
|
822
|
+
pt as a,
|
|
823
|
+
oe as b,
|
|
824
|
+
sr as i
|
|
825
|
+
};
|