everest-npm-features 0.0.44 → 0.0.46
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/{PlayArrow-Cd3sLvFW.js → PlayArrow-Cm8tJN8W.js} +3 -3
- package/dist/{auth-CzQ2SiN_.js → auth-D0r8wtCH.js} +1 -1
- package/dist/{bank-DJqJqzwJ.js → bank-BmV_keEr.js} +16 -13
- package/dist/components/RocketRamp/MinimalKyc/form.js +2 -2
- package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Buy/form.js +4 -4
- package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
- package/dist/components/RocketRamp/Player/Dashboard/index.js +2 -2
- package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
- package/dist/components/RocketRamp/Player/Sell/form.js +4 -4
- 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 +2 -2
- package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
- package/dist/components/RocketRamp/ResetPassword/index.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
- package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
- package/dist/components/RocketRamp/Transactions/index.js +2 -2
- package/dist/components/Shared/FullKyc/edd.js +2 -2
- package/dist/components/Shared/FullKyc/index.js +3 -3
- package/dist/components/Shared/FullKyc/pep.js +1 -1
- package/dist/components/Shared/FullKyc/personalDetails.js +2 -2
- package/dist/components/Shared/FullKyc/userInfo.js +3 -3
- package/dist/components/Shared/MinimalKyc/index.js +2 -2
- package/dist/components/Wallet/Account/createIban.js +1 -1
- package/dist/components/Wallet/Account/iban.js +2 -2
- package/dist/components/Wallet/Account/ibanItem.js +1 -1
- package/dist/components/Wallet/Account/index.js +13 -12
- package/dist/components/Wallet/Account/sendIban.js +11 -11
- package/dist/components/Wallet/Buy/confirmTransaction.d.ts +1 -1
- package/dist/components/Wallet/Buy/confirmTransaction.js +22 -4
- package/dist/components/Wallet/Buy/form.js +4 -4
- package/dist/components/Wallet/Buy/index.d.ts +0 -1
- package/dist/components/Wallet/Buy/index.js +11 -12
- package/dist/components/Wallet/Deposit/index.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/edd.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/index.js +3 -3
- package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +2 -2
- package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +1 -1
- package/dist/components/Wallet/EnterpriseKyc/verify.js +1 -1
- package/dist/components/Wallet/History/index.js +2 -2
- package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +6 -6
- package/dist/components/Wallet/Portfolio/index.js +4 -4
- package/dist/components/Wallet/Profile/documents.js +2 -2
- package/dist/components/Wallet/Profile/index.js +2 -2
- package/dist/components/Wallet/Receive/index.js +2 -2
- package/dist/components/Wallet/Sell/confirmTransaction.js +3 -3
- package/dist/components/Wallet/Sell/form.js +4 -4
- package/dist/components/Wallet/Sell/index.js +6 -6
- package/dist/components/Wallet/Send/index.js +2 -2
- package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
- package/dist/components/Wallet/Shared/BankSelect/index.js +3 -3
- package/dist/components/Wallet/Shared/CardCorp/index.js +27 -18
- package/dist/components/Wallet/Shared/CardPayment/index.js +36 -35
- package/dist/components/Wallet/Shared/Order/types.d.ts +4 -2
- package/dist/components/Wallet/Shared/addBank.js +2 -2
- package/dist/components/Wallet/Shared/connectPlaidBank.js +15 -15
- package/dist/components/Wallet/Shared/manualSend.js +3 -3
- package/dist/components/Wallet/SignIn/index.js +2 -2
- package/dist/components/Wallet/SignUp/index.js +2 -2
- package/dist/components/Wallet/Stake/index.js +3 -3
- package/dist/components/Wallet/Swap/form.js +5 -5
- package/dist/components/Wallet/Swap/index.js +5 -5
- package/dist/components/Wallet/Withdraw/bankSelect.js +4 -4
- package/dist/components/Wallet/Withdraw/confirmTransaction.js +3 -3
- package/dist/components/Wallet/Withdraw/form.js +4 -4
- package/dist/components/Wallet/Withdraw/index.js +5 -5
- package/dist/{constants-BQibkMPf.js → constants-BJhUp96H.js} +321 -320
- package/dist/{cryptoAssets-CI_6_gpT.js → cryptoAssets-Q_UWeuzR.js} +1 -1
- package/dist/{documents-DhAyY9OB.js → documents-RjwlADn2.js} +25 -25
- package/dist/{index-ChAYuyXl.js → index-B2wXmFh5.js} +4 -4
- package/dist/{index-BmnzQEjv.js → index-BRnTzw1Z.js} +2 -2
- package/dist/index-BTqlsA2t.js +799 -0
- package/dist/{index-C4Z1sQwf.js → index-DegQ9bTI.js} +6 -6
- package/dist/{index-DpOHb_Wl.js → index-Dkjl8hIv.js} +13 -13
- package/dist/{index-Dh9NbI7I.js → index-Dq5wTY4S.js} +4 -4
- package/dist/{index-C3ZgWBrd.js → index-pCrOsXNC.js} +16 -16
- package/dist/{kyc-BbIvXp_G.js → kyc-DLaLS7sp.js} +1 -1
- package/dist/main.js +7 -7
- package/dist/{order-BQbk7Nb4.js → order-fWKVFTau.js} +1 -1
- package/dist/{stake-DWzckUqA.js → stake-CQLutF0z.js} +1 -1
- package/dist/util/constants.d.ts +1 -0
- package/dist/util/constants.js +64 -63
- package/dist/{wallet-CHtpHvyK.js → wallet-CuQDBP6a.js} +1 -1
- package/package.json +2 -2
- package/dist/index-e2FmUhS_.js +0 -760
|
@@ -0,0 +1,799 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as w, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as Ze, useState as d, useEffect as h, useCallback as et } from "react";
|
|
3
|
+
import tt from "./hoc/withThemeProvider.js";
|
|
4
|
+
import { P as rt, f as nt } from "./PlayArrow-Cm8tJN8W.js";
|
|
5
|
+
import { I as ot } from "./Info-BVeUSPyk.js";
|
|
6
|
+
import { G as Ie } from "./generic-token-B_ptO5yb.js";
|
|
7
|
+
import { PAYMENT_PROVIDER_PAYSAFE as it, ID_TOKEN_SYMBOL as Oe, FIAT_TO_EVER_ID as fe, FIAT_TO_TOKEN as he, ESTIMATE_TOOLTIP_TEXT as at, DIALOG_SUCCESS_ICON as st, PAYMENT_PROVIDER_PLAID as lt, PAYMENT_PROVIDER_CARDCORP as ct, PAYMENT_BANK as ke, SEPA_ICON as mt, VISA_ICON as dt } from "./util/constants.js";
|
|
8
|
+
import { ap as B } from "./constants-BJhUp96H.js";
|
|
9
|
+
import { c as pt, d as ut, u as ft } from "./index-BQNs1mvn.js";
|
|
10
|
+
import { e as ht, f as $e, c as ye, g as yt, h as ze, i as _t } from "./order-fWKVFTau.js";
|
|
11
|
+
import { M as xt } from "./tooltip-3UvETWtS.js";
|
|
12
|
+
import { getCurrencySymbol as Ye, getNetworkBackGround as gt } from "./util/functions.js";
|
|
13
|
+
import xe from "./components/Wallet/Shared/appButton.js";
|
|
14
|
+
import Ct from "./components/Wallet/Shared/backBtn.js";
|
|
15
|
+
import { s as m } from "./styles.module-CHEBh2ID.js";
|
|
16
|
+
import { p as Nt, e as bt } from "./bank-BmV_keEr.js";
|
|
17
|
+
import { u as vt } from "./index.esm-BsMAMhYW.js";
|
|
18
|
+
import { a as W, u as Et } from "./react-redux-B4BZippc.js";
|
|
19
|
+
import "./index-DlQqWbXG.js";
|
|
20
|
+
import "./components/Wallet/Shared/Auth/otpForm.js";
|
|
21
|
+
import { useSnackBarContext as Rt } from "./context/snackBarContext.js";
|
|
22
|
+
import "./util/conversions.js";
|
|
23
|
+
import "./index-CAoLi5Qq.js";
|
|
24
|
+
import "./react-webcam-B3cXh1XT.js";
|
|
25
|
+
import "./components/Shared/transition.js";
|
|
26
|
+
import "./components/Wallet/Shared/pin.js";
|
|
27
|
+
import "./moment-h96o7c8I.js";
|
|
28
|
+
import "./web3-u4qDZYpo.js";
|
|
29
|
+
import "./index-ceeCtFuh.js";
|
|
30
|
+
import { useDialogContext as At } from "./context/dialogContext.js";
|
|
31
|
+
import { T as s } from "./Typography-pAaje37G.js";
|
|
32
|
+
import { B as S } from "./Box-B0YSYLco.js";
|
|
33
|
+
import { G as i } from "./Grid-CFe3amXO.js";
|
|
34
|
+
import { C as P } from "./CircularProgress-xZA3lvba.js";
|
|
35
|
+
import { f as Ft } from "./cryptoAssets-Q_UWeuzR.js";
|
|
36
|
+
import { u as Pt, a as St } from "./wallet-CuQDBP6a.js";
|
|
37
|
+
import { AuthContainer as Mt } from "./components/Wallet/Shared/Container/index.js";
|
|
38
|
+
import It from "./components/Wallet/Shared/CardPayment/index.js";
|
|
39
|
+
import Ot from "./components/Shared/MinimalKyc/index.js";
|
|
40
|
+
import kt from "./components/Wallet/Shared/Input/index.js";
|
|
41
|
+
import zt from "./components/Wallet/Shared/CardCorp/index.js";
|
|
42
|
+
import { c as wt } from "./countries-BVn1FubK.js";
|
|
43
|
+
import Wt from "./components/Wallet/Shared/TokenModal/index.js";
|
|
44
|
+
import { PaymentButton as Bt } from "./components/Wallet/Shared/Order/paymentButton.js";
|
|
45
|
+
import we from "./components/Wallet/Shared/Order/selectCustomIcon.js";
|
|
46
|
+
import { F as te } from "./FormControl-RtZDQMdA.js";
|
|
47
|
+
import { F as le } from "./FilledInput-DuNqnPjc.js";
|
|
48
|
+
import { F as We, I as Be } from "./TextField-DPpRUQe3.js";
|
|
49
|
+
import { S as ue } from "./Select-CB5yWmyn.js";
|
|
50
|
+
import { M as ce } from "./MenuItem-DUdYOJr4.js";
|
|
51
|
+
import { L as Te } from "./ListItemIcon-CUcyTEEm.js";
|
|
52
|
+
import { I as Le } from "./IconButton-DHm-hucF.js";
|
|
53
|
+
const Tt = ({
|
|
54
|
+
setScreen: N,
|
|
55
|
+
orderData: y,
|
|
56
|
+
dispatch: E,
|
|
57
|
+
fiatAssets: x,
|
|
58
|
+
cryptoAssets: M,
|
|
59
|
+
getCryptoAssets: R,
|
|
60
|
+
showAlertMessage: c,
|
|
61
|
+
partnerKey: u,
|
|
62
|
+
walletAddress: b,
|
|
63
|
+
setWalletAddress: n,
|
|
64
|
+
outputToken: o,
|
|
65
|
+
setOutputToken: I,
|
|
66
|
+
paymentId: g,
|
|
67
|
+
setPaymentId: O,
|
|
68
|
+
currencyId: f,
|
|
69
|
+
setCurrencyId: V,
|
|
70
|
+
paymentOptions: j,
|
|
71
|
+
setPaymentOptions: v
|
|
72
|
+
}) => {
|
|
73
|
+
var Pe, Se;
|
|
74
|
+
const H = W(pt), T = W(ut), { data: k, loader: X } = H, { data: re, loader: de } = T, L = x.fiats, ne = x.loader, z = M.featureTokens.buy.list, $ = M.featureTokens.buy.default, oe = M.loader, Y = y.loader, _ = y.estimate[B], J = _.crypto_out_amount, p = _.conversion_price, D = _.total_fee;
|
|
75
|
+
let ie = 0, ae = 0;
|
|
76
|
+
const ge = _.fee_breakdown;
|
|
77
|
+
for (let t = 0; t < ge.length; t++) {
|
|
78
|
+
const r = ge[t];
|
|
79
|
+
r.name === "ev_fee" ? ie = Number(r.value) : r.name === "network_fee" && (ae = Number(r.value));
|
|
80
|
+
}
|
|
81
|
+
const De = Ze(() => [
|
|
82
|
+
...k,
|
|
83
|
+
...re.filter(
|
|
84
|
+
(t) => !k.some(
|
|
85
|
+
(r) => r.address.toLowerCase() === t.address.toLowerCase()
|
|
86
|
+
)
|
|
87
|
+
)
|
|
88
|
+
], [k, re]), [pe, Q] = d(!1), [q, qe] = d([]), [Ce, Ue] = d(!1), [Ne, Ke] = d(50), [be, Ge] = d(3e3), [Z, Ve] = d(50), [ve, je] = d(3e3), [Ee, ee] = d(""), [U, Re] = d(
|
|
89
|
+
_.fiat_amount || Z.toString()
|
|
90
|
+
), [He, Ae] = d(!1), K = L.find((t) => t.id === f), A = Ye(K == null ? void 0 : K.symbol);
|
|
91
|
+
h(() => {
|
|
92
|
+
const t = [];
|
|
93
|
+
for (let r = 0; r < L.length; r++) {
|
|
94
|
+
const l = {}, C = L[r];
|
|
95
|
+
l.id = C.id, l.name = C.name, l.icon_uri = C.icon_uri, l.symbol = C.symbol, l.payment_options = [];
|
|
96
|
+
const F = C.payment_options;
|
|
97
|
+
for (let G = 0; G < F.length; G++) {
|
|
98
|
+
const Me = {}, se = F[G];
|
|
99
|
+
se.payment_provider !== it && se.active && se.payin_allowed && (Object.assign(Me, se), l.payment_options.push(Me));
|
|
100
|
+
}
|
|
101
|
+
l.payment_options.length > 0 && t.push(l);
|
|
102
|
+
}
|
|
103
|
+
qe(t);
|
|
104
|
+
}, [L]), h(() => {
|
|
105
|
+
if (!f || q.length === 0)
|
|
106
|
+
return;
|
|
107
|
+
const t = [];
|
|
108
|
+
for (let r = 0; r < q.length; r++) {
|
|
109
|
+
if (q[r].id === f) {
|
|
110
|
+
const l = q[r].payment_options;
|
|
111
|
+
let C = !1;
|
|
112
|
+
for (let F = 0; F < l.length; F++) {
|
|
113
|
+
const G = l[F];
|
|
114
|
+
G.active && (t.push(G), l[F].id === g && (C = !0));
|
|
115
|
+
}
|
|
116
|
+
C || O(t[0].id);
|
|
117
|
+
}
|
|
118
|
+
v(t);
|
|
119
|
+
}
|
|
120
|
+
}, [f, q]), h(() => {
|
|
121
|
+
!o.symbol && $ && $.id && I($);
|
|
122
|
+
}, [$]), h(() => {
|
|
123
|
+
f && R && R(f);
|
|
124
|
+
}, [f, b]), h(() => {
|
|
125
|
+
if (o && o.id && U && g && f) {
|
|
126
|
+
E(ht(B)), Q(!1), ee("");
|
|
127
|
+
const t = setTimeout(() => {
|
|
128
|
+
Xe();
|
|
129
|
+
}, 1e3);
|
|
130
|
+
return () => clearTimeout(t);
|
|
131
|
+
}
|
|
132
|
+
}, [o, U, g, z, f]);
|
|
133
|
+
const Xe = () => {
|
|
134
|
+
var C;
|
|
135
|
+
const t = parseFloat(U);
|
|
136
|
+
if (o.symbol === Oe) {
|
|
137
|
+
if (Ne > t)
|
|
138
|
+
return ee(
|
|
139
|
+
`Minimum value should be greater than ${A + Ne}`
|
|
140
|
+
), Q(!0), !1;
|
|
141
|
+
if (be * 1 < t)
|
|
142
|
+
return ee(
|
|
143
|
+
`Maximum value should be less than ${A + be}`
|
|
144
|
+
), Q(!0), !1;
|
|
145
|
+
} else {
|
|
146
|
+
if (Z * 1 > t)
|
|
147
|
+
return ee(
|
|
148
|
+
`Minimum value should be greater than ${A + Z}`
|
|
149
|
+
), Q(!0), !1;
|
|
150
|
+
if (ve * 1 < t)
|
|
151
|
+
return ee(
|
|
152
|
+
`Maximum value should be less than ${A + ve}`
|
|
153
|
+
), Q(!0), !1;
|
|
154
|
+
}
|
|
155
|
+
const r = j.find((F) => F.id === g), l = r.payment_type;
|
|
156
|
+
E(
|
|
157
|
+
$e(
|
|
158
|
+
{
|
|
159
|
+
apiKey: u,
|
|
160
|
+
transaction_type: o.symbol === Oe ? fe : he,
|
|
161
|
+
coin_amount: U,
|
|
162
|
+
exchange: o.exchange,
|
|
163
|
+
payment_type: l,
|
|
164
|
+
fiat_ccy: K == null ? void 0 : K.symbol,
|
|
165
|
+
crypto_ccy: o.symbol,
|
|
166
|
+
network: (C = o.network) == null ? void 0 : C.name,
|
|
167
|
+
payment_provider: r.payment_provider
|
|
168
|
+
},
|
|
169
|
+
B
|
|
170
|
+
)
|
|
171
|
+
);
|
|
172
|
+
};
|
|
173
|
+
h(() => {
|
|
174
|
+
const t = y.types.length;
|
|
175
|
+
if (t > 0)
|
|
176
|
+
for (let r = 0; r < t; r++) {
|
|
177
|
+
const l = y.types[r];
|
|
178
|
+
if (l.type === fe) {
|
|
179
|
+
Ke(parseFloat(l.min_deposit_amount)), Ge(parseFloat(l.max_deposit_amount));
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
if (l.type === he) {
|
|
183
|
+
Ve(parseFloat(l.min_deposit_amount)), je(parseFloat(l.max_deposit_amount));
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}, [y.types]);
|
|
188
|
+
const Je = (t) => {
|
|
189
|
+
const r = t.target.value;
|
|
190
|
+
r ? /^([0-9.]+)$/.test(r) && Re(r) : Re("");
|
|
191
|
+
}, Fe = (t) => {
|
|
192
|
+
const r = z.find((l) => l.symbol === t);
|
|
193
|
+
I(r);
|
|
194
|
+
}, Qe = () => {
|
|
195
|
+
if (!o.id)
|
|
196
|
+
return c({ message: "Please select token" }), !1;
|
|
197
|
+
if (!g)
|
|
198
|
+
return c({ message: "Please select payment method" }), !1;
|
|
199
|
+
if (!U)
|
|
200
|
+
return c({ message: "Please enter amount" }), !1;
|
|
201
|
+
if (!b)
|
|
202
|
+
return c({ message: "Please select wallet address" }), !1;
|
|
203
|
+
if (!J)
|
|
204
|
+
return c({
|
|
205
|
+
message: "Please wait for the estimate to be calculated and then press next"
|
|
206
|
+
}), !1;
|
|
207
|
+
N(me);
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ a(w, { children: [
|
|
210
|
+
/* @__PURE__ */ e(i, { container: !0, children: /* @__PURE__ */ e(i, { size: { xs: 6 }, children: /* @__PURE__ */ e(s, { className: m.label, variant: "caption", component: "p", children: "You Pay" }) }) }),
|
|
211
|
+
/* @__PURE__ */ a(i, { mt: 0.5, spacing: 0, container: !0, className: m["field-set"], children: [
|
|
212
|
+
/* @__PURE__ */ e(i, { size: { xs: 7 }, children: /* @__PURE__ */ a(
|
|
213
|
+
te,
|
|
214
|
+
{
|
|
215
|
+
variant: "filled",
|
|
216
|
+
className: `${m.amount} ${m["fiat-field"]}`,
|
|
217
|
+
fullWidth: !0,
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
le,
|
|
221
|
+
{
|
|
222
|
+
value: U,
|
|
223
|
+
onChange: Je,
|
|
224
|
+
type: "text",
|
|
225
|
+
placeholder: `${Z > 0 ? "$" + Z + " minimum value" : ""}`,
|
|
226
|
+
error: pe,
|
|
227
|
+
disableUnderline: !0,
|
|
228
|
+
required: !0,
|
|
229
|
+
fullWidth: !0
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ e(We, { className: m["amount-symbol"], children: " " })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
) }),
|
|
236
|
+
/* @__PURE__ */ e(i, { size: { xs: 5 }, className: "content-center", children: ne ? /* @__PURE__ */ e(
|
|
237
|
+
P,
|
|
238
|
+
{
|
|
239
|
+
sx: { ml: 1 },
|
|
240
|
+
size: 30
|
|
241
|
+
}
|
|
242
|
+
) : /* @__PURE__ */ e(
|
|
243
|
+
te,
|
|
244
|
+
{
|
|
245
|
+
variant: "filled",
|
|
246
|
+
className: `text-left ${m["fiat-picker"]}`,
|
|
247
|
+
fullWidth: !0,
|
|
248
|
+
children: /* @__PURE__ */ e(
|
|
249
|
+
ue,
|
|
250
|
+
{
|
|
251
|
+
IconComponent: we,
|
|
252
|
+
input: /* @__PURE__ */ e(le, { disableUnderline: !0 }),
|
|
253
|
+
sx: {
|
|
254
|
+
borderTopLeftRadius: 0,
|
|
255
|
+
"&::before": {
|
|
256
|
+
borderBottom: "none"
|
|
257
|
+
},
|
|
258
|
+
".MuiSelect-select": {
|
|
259
|
+
fontSize: "21px",
|
|
260
|
+
fontWeight: "bold",
|
|
261
|
+
color: "#16359d",
|
|
262
|
+
padding: "28px 12px 23px !important"
|
|
263
|
+
},
|
|
264
|
+
".dropdown-list-item, span": {
|
|
265
|
+
position: "relative",
|
|
266
|
+
bottom: "5px"
|
|
267
|
+
},
|
|
268
|
+
".MuiSvgIcon-root": {
|
|
269
|
+
fill: "#16359D !important"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
value: f,
|
|
273
|
+
variant: "filled",
|
|
274
|
+
displayEmpty: !0,
|
|
275
|
+
onChange: (t) => V(t.target.value),
|
|
276
|
+
error: pe,
|
|
277
|
+
children: q.map((t) => /* @__PURE__ */ a(ce, { value: t.id, children: [
|
|
278
|
+
/* @__PURE__ */ e(Te, { className: m["dropdown-list-item"], children: /* @__PURE__ */ e(
|
|
279
|
+
"img",
|
|
280
|
+
{
|
|
281
|
+
src: t.icon_uri,
|
|
282
|
+
onError: ({ currentTarget: r }) => {
|
|
283
|
+
r.onerror = null, r.src = Ie;
|
|
284
|
+
},
|
|
285
|
+
alt: "tokenImg",
|
|
286
|
+
width: "40",
|
|
287
|
+
height: "40"
|
|
288
|
+
}
|
|
289
|
+
) }),
|
|
290
|
+
/* @__PURE__ */ e("span", { children: t.symbol })
|
|
291
|
+
] }, t.id))
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
) }),
|
|
296
|
+
Ee && /* @__PURE__ */ e(s, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: Ee }) })
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ a(S, { className: "text-left", mt: 3, children: [
|
|
299
|
+
/* @__PURE__ */ e(s, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
|
|
300
|
+
ne ? /* @__PURE__ */ e(P, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(i, { mt: 0.5, container: !0, children: j.map((t) => /* @__PURE__ */ e(i, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
|
|
301
|
+
Bt,
|
|
302
|
+
{
|
|
303
|
+
label: t.payment_type,
|
|
304
|
+
value: t.id,
|
|
305
|
+
paymentId: g,
|
|
306
|
+
setPaymentId: O
|
|
307
|
+
}
|
|
308
|
+
) }, t.id)) })
|
|
309
|
+
] }),
|
|
310
|
+
/* @__PURE__ */ e(i, { mt: 4, container: !0, children: /* @__PURE__ */ e(i, { size: { xs: 4 }, children: /* @__PURE__ */ e(s, { className: m.label, variant: "caption", component: "p", children: "You Receive" }) }) }),
|
|
311
|
+
/* @__PURE__ */ a(i, { mt: 0.5, container: !0, className: m["field-set"], children: [
|
|
312
|
+
/* @__PURE__ */ e(i, { size: { xs: 7 }, children: /* @__PURE__ */ a(
|
|
313
|
+
te,
|
|
314
|
+
{
|
|
315
|
+
className: `${m.amount} ${m["crypto-field"]}`,
|
|
316
|
+
fullWidth: !0,
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ e(
|
|
319
|
+
le,
|
|
320
|
+
{
|
|
321
|
+
disableUnderline: !0,
|
|
322
|
+
value: J && parseFloat((+J * 1).toFixed(5)),
|
|
323
|
+
type: "text",
|
|
324
|
+
readOnly: !0,
|
|
325
|
+
fullWidth: !0
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ e(We, { className: m["crypto-helper-text"], children: +((Pe = _ == null ? void 0 : _.output_token) == null ? void 0 : Pe.fiat_amount) * 1 > 0 ? A + (+((Se = _ == null ? void 0 : _.output_token) == null ? void 0 : Se.fiat_amount) * 1).toFixed(2) : /* @__PURE__ */ e(w, { children: " " }) })
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
) }),
|
|
332
|
+
/* @__PURE__ */ e(i, { size: { xs: 5 }, className: "content-center", children: oe ? /* @__PURE__ */ e(P, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ a(
|
|
333
|
+
te,
|
|
334
|
+
{
|
|
335
|
+
variant: "filled",
|
|
336
|
+
className: `text-left ${m["crypto-picker"]}`,
|
|
337
|
+
fullWidth: !0,
|
|
338
|
+
children: [
|
|
339
|
+
(o == null ? void 0 : o.network) && /* @__PURE__ */ e(
|
|
340
|
+
Be,
|
|
341
|
+
{
|
|
342
|
+
className: `${m["network-label"]} ${m[gt(o == null ? void 0 : o.network.name)]}`,
|
|
343
|
+
children: o == null ? void 0 : o.network.name
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
/* @__PURE__ */ a(
|
|
347
|
+
ue,
|
|
348
|
+
{
|
|
349
|
+
IconComponent: we,
|
|
350
|
+
input: /* @__PURE__ */ e(le, { disableUnderline: !0 }),
|
|
351
|
+
sx: {
|
|
352
|
+
borderTopLeftRadius: 0,
|
|
353
|
+
"&::before": {
|
|
354
|
+
borderBottom: "none"
|
|
355
|
+
},
|
|
356
|
+
".MuiSelect-select": {
|
|
357
|
+
fontSize: "21px",
|
|
358
|
+
fontWeight: "bold",
|
|
359
|
+
color: "#16359d",
|
|
360
|
+
padding: "28px 12px 23px !important"
|
|
361
|
+
},
|
|
362
|
+
".dropdown-list-item, span": {
|
|
363
|
+
position: "relative",
|
|
364
|
+
bottom: "5px"
|
|
365
|
+
},
|
|
366
|
+
".MuiSvgIcon-root": {
|
|
367
|
+
fill: "#16359D !important"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
className: "buy-select-dd",
|
|
371
|
+
variant: "filled",
|
|
372
|
+
value: o.symbol,
|
|
373
|
+
displayEmpty: !0,
|
|
374
|
+
onChange: (t) => Fe(t.target.value),
|
|
375
|
+
onOpen: (t) => {
|
|
376
|
+
Ae(!0), t.preventDefault();
|
|
377
|
+
},
|
|
378
|
+
defaultOpen: !1,
|
|
379
|
+
open: !1,
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ e(ce, { value: "", children: "Please select" }),
|
|
382
|
+
z.map((t) => /* @__PURE__ */ a(ce, { value: t.symbol, children: [
|
|
383
|
+
/* @__PURE__ */ e(Te, { className: m["dropdown-list-item"], children: /* @__PURE__ */ e(
|
|
384
|
+
"img",
|
|
385
|
+
{
|
|
386
|
+
src: t.icon_uri,
|
|
387
|
+
onError: ({ currentTarget: r }) => {
|
|
388
|
+
r.onerror = null, r.src = Ie;
|
|
389
|
+
},
|
|
390
|
+
alt: "tokenImg",
|
|
391
|
+
width: "40",
|
|
392
|
+
height: "40"
|
|
393
|
+
}
|
|
394
|
+
) }),
|
|
395
|
+
/* @__PURE__ */ e("span", { children: t.symbol })
|
|
396
|
+
] }, t.id))
|
|
397
|
+
]
|
|
398
|
+
}
|
|
399
|
+
)
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
) })
|
|
403
|
+
] }),
|
|
404
|
+
/* @__PURE__ */ e(S, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ a(i, { container: !0, children: [
|
|
405
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ a(
|
|
406
|
+
Le,
|
|
407
|
+
{
|
|
408
|
+
sx: { padding: "0" },
|
|
409
|
+
onClick: () => Ue((t) => !t),
|
|
410
|
+
disableFocusRipple: !0,
|
|
411
|
+
disableRipple: !0,
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ e(s, { variant: "caption", fontWeight: 700, children: "Fee Calculation" }),
|
|
414
|
+
/* @__PURE__ */ e(
|
|
415
|
+
rt,
|
|
416
|
+
{
|
|
417
|
+
sx: {
|
|
418
|
+
transform: `rotate(${Ce ? "90" : "0"}deg)`,
|
|
419
|
+
fontSize: "15px"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
)
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
) }),
|
|
426
|
+
Ce && /* @__PURE__ */ a(w, { children: [
|
|
427
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Everest Fee" }) }),
|
|
428
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
429
|
+
A,
|
|
430
|
+
Y ? /* @__PURE__ */ e(
|
|
431
|
+
P,
|
|
432
|
+
{
|
|
433
|
+
sx: { ml: 1 },
|
|
434
|
+
size: 15,
|
|
435
|
+
color: "primary"
|
|
436
|
+
}
|
|
437
|
+
) : ie.toFixed(2)
|
|
438
|
+
] }) }),
|
|
439
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Network Fee" }) }),
|
|
440
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
441
|
+
A,
|
|
442
|
+
Y ? /* @__PURE__ */ e(
|
|
443
|
+
P,
|
|
444
|
+
{
|
|
445
|
+
sx: { ml: 1 },
|
|
446
|
+
size: 15,
|
|
447
|
+
color: "primary"
|
|
448
|
+
}
|
|
449
|
+
) : ae.toFixed(2)
|
|
450
|
+
] }) })
|
|
451
|
+
] }),
|
|
452
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
|
|
453
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
454
|
+
A,
|
|
455
|
+
Y ? /* @__PURE__ */ e(P, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(D).toFixed(2)
|
|
456
|
+
] }) }),
|
|
457
|
+
o && /* @__PURE__ */ a(w, { children: [
|
|
458
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
459
|
+
"1 ",
|
|
460
|
+
o.symbol,
|
|
461
|
+
" ",
|
|
462
|
+
/* @__PURE__ */ e(
|
|
463
|
+
xt,
|
|
464
|
+
{
|
|
465
|
+
title: at,
|
|
466
|
+
placement: "right",
|
|
467
|
+
children: /* @__PURE__ */ e(Le, { className: "info-fee-icon", children: /* @__PURE__ */ e(
|
|
468
|
+
ot,
|
|
469
|
+
{
|
|
470
|
+
sx: {
|
|
471
|
+
fontSize: "14px"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
) })
|
|
475
|
+
}
|
|
476
|
+
)
|
|
477
|
+
] }) }),
|
|
478
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
479
|
+
A,
|
|
480
|
+
Y ? /* @__PURE__ */ e(
|
|
481
|
+
P,
|
|
482
|
+
{
|
|
483
|
+
sx: { ml: 1 },
|
|
484
|
+
size: 15,
|
|
485
|
+
color: "primary"
|
|
486
|
+
}
|
|
487
|
+
) : Number(p).toFixed(2)
|
|
488
|
+
] }) })
|
|
489
|
+
] })
|
|
490
|
+
] }) }),
|
|
491
|
+
/* @__PURE__ */ e(S, { sx: { alignItems: "left", width: "100%" }, children: X || de ? /* @__PURE__ */ e(S, { mt: 2, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(P, {}) }) : /* @__PURE__ */ e(w, { children: /* @__PURE__ */ a(te, { variant: "filled", fullWidth: !0, children: [
|
|
492
|
+
!b && /* @__PURE__ */ e(Be, { children: "Select wallet address" }),
|
|
493
|
+
/* @__PURE__ */ e(
|
|
494
|
+
ue,
|
|
495
|
+
{
|
|
496
|
+
value: b,
|
|
497
|
+
onChange: (t) => n && n(t.target.value),
|
|
498
|
+
children: De.map((t, r) => /* @__PURE__ */ e(ce, { value: t.address, children: t.name + "(" + t.address + ")" }, r))
|
|
499
|
+
}
|
|
500
|
+
)
|
|
501
|
+
] }) }) }),
|
|
502
|
+
/* @__PURE__ */ e(S, { mt: 4, children: /* @__PURE__ */ e(
|
|
503
|
+
xe,
|
|
504
|
+
{
|
|
505
|
+
onClick: Qe,
|
|
506
|
+
disabled: pe || !J,
|
|
507
|
+
fullWidth: !0,
|
|
508
|
+
children: /* @__PURE__ */ e("strong", { children: "Next" })
|
|
509
|
+
}
|
|
510
|
+
) }),
|
|
511
|
+
/* @__PURE__ */ e(
|
|
512
|
+
Wt,
|
|
513
|
+
{
|
|
514
|
+
open: He,
|
|
515
|
+
setModal: Ae,
|
|
516
|
+
loader: oe,
|
|
517
|
+
tokenList: z,
|
|
518
|
+
tokenSelect: Fe
|
|
519
|
+
}
|
|
520
|
+
)
|
|
521
|
+
] });
|
|
522
|
+
}, Lt = ({
|
|
523
|
+
setScreen: N,
|
|
524
|
+
partnerKey: y,
|
|
525
|
+
orderData: E,
|
|
526
|
+
dispatch: x,
|
|
527
|
+
walletAddress: M,
|
|
528
|
+
plaidCountry: R,
|
|
529
|
+
navigate: c
|
|
530
|
+
}) => {
|
|
531
|
+
const { openDialog: u } = At(), { plaidToken: b } = W(ft), n = E.estimate[B], o = E.create.order_id, I = E.loader, g = n.fiat_amount, O = Ye(n.fiat_currency), [f, V] = d(!1), v = {
|
|
532
|
+
onSuccess: et(() => {
|
|
533
|
+
u({
|
|
534
|
+
title: "Buy Success",
|
|
535
|
+
icon: st,
|
|
536
|
+
message: "Your transaction was successful. It can take a few minutes to receive your token.",
|
|
537
|
+
cancelButtonText: "Buy again",
|
|
538
|
+
onCancel: () => {
|
|
539
|
+
x(ye()), N(_e);
|
|
540
|
+
},
|
|
541
|
+
confirmButtonText: "Track Order",
|
|
542
|
+
onConfirm: () => {
|
|
543
|
+
c && c("/history"), x(ye());
|
|
544
|
+
},
|
|
545
|
+
height: "490px"
|
|
546
|
+
});
|
|
547
|
+
}, [o]),
|
|
548
|
+
onExit: () => {
|
|
549
|
+
k(), x(bt());
|
|
550
|
+
},
|
|
551
|
+
token: b
|
|
552
|
+
}, { open: H, ready: T } = vt(v);
|
|
553
|
+
h(() => {
|
|
554
|
+
T && b && H();
|
|
555
|
+
}, [T, b]), h(() => {
|
|
556
|
+
o && f && (n.payment_provider === lt ? x(
|
|
557
|
+
Nt({
|
|
558
|
+
country_code: R,
|
|
559
|
+
payment_id: E.create.provider_token
|
|
560
|
+
})
|
|
561
|
+
) : n.payment_provider === ct ? N(Yt) : N($t));
|
|
562
|
+
}, [o]), h(() => {
|
|
563
|
+
k();
|
|
564
|
+
}, []);
|
|
565
|
+
const k = () => {
|
|
566
|
+
x(
|
|
567
|
+
$e(
|
|
568
|
+
{
|
|
569
|
+
apiKey: y,
|
|
570
|
+
transaction_type: n.transaction_type,
|
|
571
|
+
coin_amount: n.fiat_amount,
|
|
572
|
+
exchange: n.exchange,
|
|
573
|
+
payment_type: n.payment_type,
|
|
574
|
+
fiat_ccy: n.fiat_currency,
|
|
575
|
+
crypto_ccy: n.crypto_currency,
|
|
576
|
+
network: n.network,
|
|
577
|
+
payment_provider: n.payment_provider
|
|
578
|
+
},
|
|
579
|
+
B
|
|
580
|
+
)
|
|
581
|
+
);
|
|
582
|
+
}, X = () => {
|
|
583
|
+
x(
|
|
584
|
+
yt({
|
|
585
|
+
apiKey: y,
|
|
586
|
+
quoteId: n.quote_id,
|
|
587
|
+
walletAddress: M
|
|
588
|
+
})
|
|
589
|
+
), V(!0);
|
|
590
|
+
};
|
|
591
|
+
return /* @__PURE__ */ a(w, { children: [
|
|
592
|
+
/* @__PURE__ */ e(
|
|
593
|
+
Ct,
|
|
594
|
+
{
|
|
595
|
+
onClickHandler: () => N(_e),
|
|
596
|
+
backBtnText: "Confirm Your Order"
|
|
597
|
+
}
|
|
598
|
+
),
|
|
599
|
+
/* @__PURE__ */ e(s, { mt: 2, variant: "sm", fontWeight: 600, children: "Using payment method" }),
|
|
600
|
+
n.payment_type && /* @__PURE__ */ a(S, { mt: 2, className: m["confirm-payment"], children: [
|
|
601
|
+
/* @__PURE__ */ e(
|
|
602
|
+
"img",
|
|
603
|
+
{
|
|
604
|
+
src: n.payment_type === ke ? mt : dt,
|
|
605
|
+
width: 100,
|
|
606
|
+
alt: "payment"
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ e(s, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: n.payment_type === ke ? "Bank Account" : "Debit Card" }) })
|
|
610
|
+
] }),
|
|
611
|
+
/* @__PURE__ */ e(s, { mt: 4, variant: "sm", fontWeight: 600, children: "To Wallet Address" }),
|
|
612
|
+
/* @__PURE__ */ e(
|
|
613
|
+
S,
|
|
614
|
+
{
|
|
615
|
+
mt: 2,
|
|
616
|
+
className: m["confirm-payment"],
|
|
617
|
+
sx: { width: "100% !important" },
|
|
618
|
+
children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: M }) })
|
|
619
|
+
}
|
|
620
|
+
),
|
|
621
|
+
/* @__PURE__ */ e(s, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
|
|
622
|
+
/* @__PURE__ */ e(S, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ a(i, { container: !0, children: [
|
|
623
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
624
|
+
n.crypto_currency.toUpperCase(),
|
|
625
|
+
" @",
|
|
626
|
+
" ",
|
|
627
|
+
Number(n.conversion_price).toFixed(2),
|
|
628
|
+
" ",
|
|
629
|
+
n.fiat_currency
|
|
630
|
+
] }) }),
|
|
631
|
+
/* @__PURE__ */ e(i, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
632
|
+
"span",
|
|
633
|
+
{
|
|
634
|
+
className: m["confirm-transaction-network"],
|
|
635
|
+
style: {
|
|
636
|
+
backgroundColor: n.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
|
|
637
|
+
},
|
|
638
|
+
children: n.network
|
|
639
|
+
}
|
|
640
|
+
) }),
|
|
641
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
642
|
+
Number(n.crypto_out_amount).toFixed(5),
|
|
643
|
+
" ",
|
|
644
|
+
n.crypto_currency.toUpperCase()
|
|
645
|
+
] }) }),
|
|
646
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
647
|
+
(Number(g) - Number(n.total_fee)).toFixed(2),
|
|
648
|
+
" ",
|
|
649
|
+
n.fiat_currency
|
|
650
|
+
] }) }),
|
|
651
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
|
|
652
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
|
|
653
|
+
Number(n.total_fee).toFixed(2),
|
|
654
|
+
" ",
|
|
655
|
+
n.fiat_currency
|
|
656
|
+
] }) }),
|
|
657
|
+
/* @__PURE__ */ e(i, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
|
|
658
|
+
/* @__PURE__ */ e(i, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ a("strong", { children: [
|
|
659
|
+
O,
|
|
660
|
+
Number(g).toFixed(2),
|
|
661
|
+
" ",
|
|
662
|
+
n.fiat_currency
|
|
663
|
+
] }) }) })
|
|
664
|
+
] }) }),
|
|
665
|
+
/* @__PURE__ */ e(S, { mt: 4, children: /* @__PURE__ */ e(
|
|
666
|
+
xe,
|
|
667
|
+
{
|
|
668
|
+
onClick: X,
|
|
669
|
+
disabled: I,
|
|
670
|
+
fullWidth: !0,
|
|
671
|
+
children: /* @__PURE__ */ e("strong", { children: I ? /* @__PURE__ */ a(w, { children: [
|
|
672
|
+
/* @__PURE__ */ e(P, { size: 15, color: "inherit" }),
|
|
673
|
+
" Processing..."
|
|
674
|
+
] }) : "Payment Details" })
|
|
675
|
+
}
|
|
676
|
+
) })
|
|
677
|
+
] });
|
|
678
|
+
}, _e = "FORM_SCREEN", me = "CONFIRM_SCREEN", $t = "PAYMENT_SCREEN", Yt = "CARD_CORP_SCREEN", Dt = "MINIMAL_KYC_SCREEN", qt = ({
|
|
679
|
+
partnerKey: N,
|
|
680
|
+
baseUrl: y,
|
|
681
|
+
checkoutSdkKey: E,
|
|
682
|
+
cardCorpSrcUrl: x,
|
|
683
|
+
navigate: M
|
|
684
|
+
}) => {
|
|
685
|
+
const { showAlertMessage: R } = Rt(), c = Et(), u = W((p) => p.order), b = u.create.provider_token, n = u.create.checkout_integrity, o = u.error, I = W(
|
|
686
|
+
(p) => p.user.profile
|
|
687
|
+
), g = I.everWalletAddress, O = I.residentialAddress.country || "USA", f = W((p) => p.fiatAssets), V = W(
|
|
688
|
+
(p) => p.cryptoAssets
|
|
689
|
+
), [j, v] = d(_e), [H, T] = d({
|
|
690
|
+
symbol: ""
|
|
691
|
+
}), [k, X] = d(0), [re, de] = d(1), [L, ne] = d([]), [z, $] = d(g), [oe, Y] = d("");
|
|
692
|
+
return h(() => {
|
|
693
|
+
if (O) {
|
|
694
|
+
const p = wt.find((D) => D.alpha3 === O);
|
|
695
|
+
p && Y(p.alpha2);
|
|
696
|
+
}
|
|
697
|
+
}, [O]), h(() => {
|
|
698
|
+
o && R({ message: o });
|
|
699
|
+
}, [o]), h(() => {
|
|
700
|
+
u.initMinimalKyc && (R({ message: o, type: "info" }), v(Dt));
|
|
701
|
+
}, [u.initMinimalKyc]), h(() => (c(nt()), c(ze(he)), c(ze(fe)), c(Pt()), c(St()), () => {
|
|
702
|
+
c(ye());
|
|
703
|
+
}), []), /* @__PURE__ */ e(Mt, { addPadding: !0, children: {
|
|
704
|
+
FORM_SCREEN: /* @__PURE__ */ e(
|
|
705
|
+
Tt,
|
|
706
|
+
{
|
|
707
|
+
showAlertMessage: R,
|
|
708
|
+
setScreen: v,
|
|
709
|
+
fiatAssets: f,
|
|
710
|
+
cryptoAssets: V,
|
|
711
|
+
orderData: u,
|
|
712
|
+
dispatch: c,
|
|
713
|
+
getCryptoAssets: (p) => {
|
|
714
|
+
c(
|
|
715
|
+
Ft({
|
|
716
|
+
type: B,
|
|
717
|
+
id: p,
|
|
718
|
+
partnerKey: N,
|
|
719
|
+
walletAddress: z
|
|
720
|
+
})
|
|
721
|
+
);
|
|
722
|
+
},
|
|
723
|
+
partnerKey: N,
|
|
724
|
+
walletAddress: z,
|
|
725
|
+
setWalletAddress: $,
|
|
726
|
+
outputToken: H,
|
|
727
|
+
setOutputToken: T,
|
|
728
|
+
paymentId: k,
|
|
729
|
+
setPaymentId: X,
|
|
730
|
+
currencyId: re,
|
|
731
|
+
setCurrencyId: de,
|
|
732
|
+
paymentOptions: L,
|
|
733
|
+
setPaymentOptions: ne
|
|
734
|
+
}
|
|
735
|
+
),
|
|
736
|
+
CONFIRM_SCREEN: /* @__PURE__ */ e(
|
|
737
|
+
Lt,
|
|
738
|
+
{
|
|
739
|
+
partnerKey: N,
|
|
740
|
+
setScreen: v,
|
|
741
|
+
showAlertMessage: R,
|
|
742
|
+
orderData: u,
|
|
743
|
+
dispatch: c,
|
|
744
|
+
walletAddress: z,
|
|
745
|
+
plaidCountry: oe,
|
|
746
|
+
navigate: M
|
|
747
|
+
}
|
|
748
|
+
),
|
|
749
|
+
PAYMENT_SCREEN: /* @__PURE__ */ e(
|
|
750
|
+
It,
|
|
751
|
+
{
|
|
752
|
+
checkoutKey: E,
|
|
753
|
+
orderData: u,
|
|
754
|
+
initPaymentRequest: (p) => {
|
|
755
|
+
const D = u.estimate[B], ie = u.create.order_id, ae = {
|
|
756
|
+
token: p,
|
|
757
|
+
amount: Number(D.fiat_amount),
|
|
758
|
+
currency: D.fiat_currency,
|
|
759
|
+
reference: ie,
|
|
760
|
+
success_url: `${y}/dashboard?payment=success`,
|
|
761
|
+
fail_url: `${y}/dashboard?payment=failed`
|
|
762
|
+
};
|
|
763
|
+
c(_t(ae));
|
|
764
|
+
},
|
|
765
|
+
backBtnFunc: () => v(me)
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
CARD_CORP_SCREEN: /* @__PURE__ */ e(
|
|
769
|
+
zt,
|
|
770
|
+
{
|
|
771
|
+
checkoutId: b,
|
|
772
|
+
integrity: n,
|
|
773
|
+
onResultUrl: `${y}/dashboard`,
|
|
774
|
+
backBtnFunc: () => v(me),
|
|
775
|
+
srcUrl: x
|
|
776
|
+
}
|
|
777
|
+
),
|
|
778
|
+
MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
|
|
779
|
+
Ot,
|
|
780
|
+
{
|
|
781
|
+
inputComponent: kt,
|
|
782
|
+
buttonComponent: xe,
|
|
783
|
+
onComplete: () => {
|
|
784
|
+
v(me);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
}[j] });
|
|
789
|
+
}, Dr = tt(qt);
|
|
790
|
+
export {
|
|
791
|
+
Tt as B,
|
|
792
|
+
me as C,
|
|
793
|
+
_e as F,
|
|
794
|
+
Dt as M,
|
|
795
|
+
$t as P,
|
|
796
|
+
Lt as a,
|
|
797
|
+
Yt as b,
|
|
798
|
+
Dr as i
|
|
799
|
+
};
|