everest-npm-features 0.0.41 → 0.0.43

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