everest-npm-features 0.0.17 → 0.0.18

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 (133) hide show
  1. package/dist/CheckCircle-BiltyzEJ.js +8 -0
  2. package/dist/PlayArrow-BYMBg9J8.js +8 -0
  3. package/dist/assets/index10.css +1 -1
  4. package/dist/assets/index11.css +1 -1
  5. package/dist/assets/index2.css +1 -1
  6. package/dist/assets/index3.css +1 -1
  7. package/dist/assets/index4.css +1 -1
  8. package/dist/assets/index5.css +1 -1
  9. package/dist/assets/index6.css +1 -1
  10. package/dist/assets/index7.css +1 -1
  11. package/dist/assets/index8.css +1 -1
  12. package/dist/assets/index9.css +1 -1
  13. package/dist/assets/styles2.css +1 -1
  14. package/dist/assets/styles3.css +1 -0
  15. package/dist/{auth-PInt5Jrb.js → auth-RJ36qeYb.js} +1 -1
  16. package/dist/{bank-BDnnvwyk.js → bank-Dml7vXW5.js} +10 -10
  17. package/dist/components/RocketRamp/MinimalKyc/form.js +5 -5
  18. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  19. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  20. package/dist/components/RocketRamp/Player/Buy/form.js +5 -5
  21. package/dist/components/RocketRamp/Player/Buy/index.js +6 -6
  22. package/dist/components/RocketRamp/Player/Dashboard/index.js +13 -15
  23. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  24. package/dist/components/RocketRamp/Player/Sell/form.js +5 -5
  25. package/dist/components/RocketRamp/Player/Sell/index.js +8 -8
  26. package/dist/components/RocketRamp/Player/SignIn/index.js +3 -3
  27. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  28. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  29. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  30. package/dist/components/RocketRamp/Player/SignUp/index.js +3 -3
  31. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
  32. package/dist/components/RocketRamp/ResetPassword/index.js +3 -3
  33. package/dist/components/RocketRamp/Shared/Input/index.js +9 -9
  34. package/dist/components/RocketRamp/Store/SignUp/index.js +3 -3
  35. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
  36. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
  37. package/dist/components/RocketRamp/Transactions/index.js +7 -7
  38. package/dist/components/Shared/HistoryItem/index.js +40 -40
  39. package/dist/components/Shared/MinimalKyc/index.js +3 -3
  40. package/dist/components/Shared/tooltip.js +5 -2108
  41. package/dist/components/Wallet/Account/createIban.js +1 -1
  42. package/dist/components/Wallet/Account/iban.js +5 -5
  43. package/dist/components/Wallet/Account/index.js +17 -17
  44. package/dist/components/Wallet/Account/sendIban.js +16 -16
  45. package/dist/components/Wallet/Buy/confirmTransaction.d.ts +2 -2
  46. package/dist/components/Wallet/Buy/confirmTransaction.js +5 -4
  47. package/dist/components/Wallet/Buy/form.d.ts +2 -2
  48. package/dist/components/Wallet/Buy/form.js +9 -6
  49. package/dist/components/Wallet/Buy/index.d.ts +1 -1
  50. package/dist/components/Wallet/Buy/index.js +7 -7
  51. package/dist/components/Wallet/Deposit/index.d.ts +2 -0
  52. package/dist/components/Wallet/Deposit/index.js +110 -0
  53. package/dist/components/Wallet/EnterpriseKyc/edd.js +92 -80
  54. package/dist/components/Wallet/EnterpriseKyc/index.js +121 -108
  55. package/dist/components/Wallet/EnterpriseKyc/orgDetails.d.ts +1 -1
  56. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +110 -85
  57. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +2 -2
  58. package/dist/components/Wallet/EnterpriseKyc/types.d.ts +1 -0
  59. package/dist/components/Wallet/EnterpriseKyc/verify.js +2 -2
  60. package/dist/components/Wallet/History/index.js +4 -4
  61. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +33 -33
  62. package/dist/components/Wallet/Portfolio/index.js +171 -138
  63. package/dist/components/Wallet/Profile/documents.js +4 -4
  64. package/dist/components/Wallet/Profile/index.js +4 -4
  65. package/dist/components/Wallet/Receive/index.js +8 -8
  66. package/dist/components/Wallet/Sell/confirmTransaction.d.ts +3 -0
  67. package/dist/components/Wallet/Sell/confirmTransaction.js +18 -0
  68. package/dist/components/Wallet/Sell/form.d.ts +3 -0
  69. package/dist/components/Wallet/Sell/form.js +32 -0
  70. package/dist/components/Wallet/Sell/index.d.ts +6 -0
  71. package/dist/components/Wallet/Sell/index.js +22 -0
  72. package/dist/components/Wallet/Send/index.js +6 -6
  73. package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
  74. package/dist/components/Wallet/Shared/ConnectWallet/index.js +1 -1
  75. package/dist/components/Wallet/Shared/Container/index.js +1 -1
  76. package/dist/components/Wallet/Shared/Order/types.d.ts +51 -0
  77. package/dist/components/Wallet/Shared/TokenModal/index.d.ts +1 -1
  78. package/dist/components/Wallet/Shared/TokenModal/index.js +5 -5
  79. package/dist/components/Wallet/Shared/TokenModal/tokenGrid.js +4 -4
  80. package/dist/components/Wallet/Shared/addBank.js +6 -6
  81. package/dist/components/Wallet/Shared/connectPlaidBank.js +7 -7
  82. package/dist/components/Wallet/Shared/pin.js +1 -1
  83. package/dist/components/Wallet/SignIn/index.js +3 -3
  84. package/dist/components/Wallet/SignUp/index.js +3 -3
  85. package/dist/components/Wallet/Stake/gems/index.js +1 -1
  86. package/dist/components/Wallet/Stake/id/index.js +3 -3
  87. package/dist/components/Wallet/Stake/index.js +7 -7
  88. package/dist/components/Wallet/Swap/index.d.ts +3 -2
  89. package/dist/components/Wallet/Swap/index.js +327 -271
  90. package/dist/components/Wallet/SwapAndUniSwap/index.js +31 -35
  91. package/dist/components/Wallet/{Buy → SwapAndUniSwap}/types.d.ts +4 -13
  92. package/dist/components/Wallet/SwapAndUniSwap/types.js +1 -0
  93. package/dist/components/Wallet/Withdraw/bankSelect.d.ts +4 -0
  94. package/dist/components/Wallet/Withdraw/bankSelect.js +21 -0
  95. package/dist/components/Wallet/Withdraw/confirmTransaction.d.ts +3 -0
  96. package/dist/components/Wallet/Withdraw/confirmTransaction.js +19 -0
  97. package/dist/components/Wallet/Withdraw/form.d.ts +3 -0
  98. package/dist/components/Wallet/Withdraw/form.js +26 -0
  99. package/dist/components/Wallet/Withdraw/index.d.ts +7 -0
  100. package/dist/components/Wallet/Withdraw/index.js +22 -0
  101. package/dist/constants-QcvnheTz.js +5307 -0
  102. package/dist/cryptoAssets-DBfxll21.js +16 -0
  103. package/dist/{documents-b3tR38Qf.js → documents-Bd28UFLu.js} +3 -3
  104. package/dist/{fiatAssets-Di1Dvl51.js → fiatAssets-w5Lh-MSu.js} +1 -1
  105. package/dist/hooks/useDialog/index.js +22 -22
  106. package/dist/hooks/useRrDialog/index.js +1 -1
  107. package/dist/{iban-D3Y3E3cN.js → iban-CKaN4sIM.js} +6 -6
  108. package/dist/index-BEdISdN-.js +709 -0
  109. package/dist/{index-BhJeqQtm.js → index-BNaxzTKI.js} +164 -163
  110. package/dist/index-BvftsxV1.js +677 -0
  111. package/dist/index-DSHZv8ZQ.js +569 -0
  112. package/dist/{index-D2XCPzg3.js → index-_KAhqkWc.js} +144 -143
  113. package/dist/{index-DQaPU81n.js → index-f15o1nhn.js} +3 -3
  114. package/dist/{kyc-8mSMgUlU.js → kyc-V7cIa71M.js} +1 -1
  115. package/dist/main.d.ts +4 -0
  116. package/dist/main.js +47 -39
  117. package/dist/order-6L4LZOBs.js +41 -0
  118. package/dist/{react-redux-B4BZippc.js → react-redux-C7I9-1M6.js} +2 -2
  119. package/dist/{stake-Cf5t27F3.js → stake-r4KUlRcz.js} +1 -1
  120. package/dist/styles.module-BFHktEw2.js +30 -0
  121. package/dist/{styles.module-Ctfaq7f2.js → styles.module-DJk7Pf0F.js} +1 -1
  122. package/dist/tooltip-BVZ66d8C.js +2111 -0
  123. package/dist/util/constants.d.ts +1 -0
  124. package/dist/util/constants.js +84 -83
  125. package/dist/{wallet-Bghw0_Nm.js → wallet-D7MEPP5y.js} +1 -1
  126. package/package.json +2 -2
  127. package/dist/PlayArrow-Dent7shn.js +0 -21
  128. package/dist/assets/index12.css +0 -1
  129. package/dist/assets/index13.css +0 -1
  130. package/dist/constants-A8X7fywY.js +0 -3882
  131. package/dist/index-Bqxs_jIU.js +0 -709
  132. package/dist/order-DTnCUIx0.js +0 -34
  133. /package/dist/components/Wallet/{Buy → Shared/Order}/types.js +0 -0
@@ -1,709 +0,0 @@
1
- import { jsxs as a, Fragment as B, jsx as e } from "react/jsx-runtime";
2
- import { useState as m, useEffect as y } from "react";
3
- import Ye from "./hoc/withThemeProvider.js";
4
- import { P as Le, F as Ke } from "./PlayArrow-Dent7shn.js";
5
- import { I as Ve } from "./Info-DPMWjNcQ.js";
6
- import { G as ye } from "./generic-token-B_ptO5yb.js";
7
- import { PAYMENT_PROVIDER_PAYSAFE as Ue, ID_TOKEN_SYMBOL as be, FIAT_TO_EVER_ID as Z, FIAT_TO_TOKEN as ee, ESTIMATE_TOOLTIP_TEXT as je, VISA_PAYMENT as De, VISA_PAYMENT_ACTIVE as Ge, SEPA_PAYMENT as He, SEPA_PAYMENT_ACTIVE as Xe, PAYMENT_BANK as xe, SEPA_ICON as Je, VISA_ICON as Qe } from "./util/constants.js";
8
- import "./constants-A8X7fywY.js";
9
- import { b as Ze, c as ke, d as et, e as ge, f as tt } from "./order-DTnCUIx0.js";
10
- import nt from "./components/Shared/tooltip.js";
11
- import { getCurrencySymbol as Ae, getNetworkBackGround as rt, getOrionBalance as ot } from "./util/functions.js";
12
- import ne from "./components/Wallet/Shared/appButton.js";
13
- import it from "./components/Wallet/Shared/backBtn.js";
14
- import { T as s } from "./Typography-DiFeMX5p.js";
15
- import { B as M } from "./Box-rIIGCyb6.js";
16
- import { G as o } from "./Grid2-DJW3x_WO.js";
17
- import { C as I } from "./CircularProgress-CBhr9Pli.js";
18
- import { u as at, a as V } from "./react-redux-B4BZippc.js";
19
- import { f as st } from "./fiatAssets-Di1Dvl51.js";
20
- import { useSnackBarContext as ct } from "./context/snackBarContext.js";
21
- import { AuthContainer as lt } from "./components/Wallet/Shared/Container/index.js";
22
- import mt from "./components/Wallet/Shared/CardPayment/index.js";
23
- import dt from "./components/Shared/MinimalKyc/index.js";
24
- import pt from "./components/Wallet/Shared/Input/index.js";
25
- import ut from "./components/Wallet/Shared/TokenModal/index.js";
26
- import { F as G } from "./FormControl-uQi14shL.js";
27
- import { F as H } from "./FilledInput-Bvhqpjsa.js";
28
- import { F as Ne, I as ft } from "./TextField-BtFFWrf2.js";
29
- import { S as ve } from "./Select-BsqVGicz.js";
30
- import { M as Q } from "./MenuItem-BKHoKEhO.js";
31
- import { L as Ce } from "./ListItemIcon-BO6nZHNq.js";
32
- import { I as Ee } from "./IconButton-DRnoPKKH.js";
33
- import './assets/index8.css';const ht = "_label_qmb7n_77", _t = "_amount_qmb7n_147", d = {
34
- "confirm-payment": "_confirm-payment_qmb7n_1",
35
- "confirm-transaction-network": "_confirm-transaction-network_qmb7n_33",
36
- "buy-info": "_buy-info_qmb7n_57",
37
- label: ht,
38
- "balance-label": "_balance-label_qmb7n_89",
39
- "max-btn": "_max-btn_qmb7n_101",
40
- amount: _t,
41
- "MuiFilledInput-root": "_MuiFilledInput-root_qmb7n_159",
42
- "fiat-field": "_fiat-field_qmb7n_175",
43
- "amount-symbol": "_amount-symbol_qmb7n_183",
44
- "crypto-picker": "_crypto-picker_qmb7n_201",
45
- "fiat-picker": "_fiat-picker_qmb7n_209",
46
- "network-label": "_network-label_qmb7n_217",
47
- "eth-network": "_eth-network_qmb7n_243",
48
- "everchain-network": "_everchain-network_qmb7n_251",
49
- "buy-select-dd": "_buy-select-dd_qmb7n_261",
50
- "MuiSelect-select": "_MuiSelect-select_qmb7n_277",
51
- "dropdown-list-item": "_dropdown-list-item_qmb7n_291",
52
- "fee-area": "_fee-area_qmb7n_315",
53
- "info-fee-icon": "_info-fee-icon_qmb7n_325",
54
- "wallet-caption-text": "_wallet-caption-text_qmb7n_335"
55
- }, yt = ({
56
- setScreen: k,
57
- orderData: b,
58
- dispatch: A,
59
- fiatAssets: f,
60
- cryptoAssets: p,
61
- getCryptoAssets: r,
62
- showAlertMessage: h,
63
- partnerKey: S
64
- }) => {
65
- var fe, he;
66
- const N = f.fiats, w = f.loader, v = p.featureTokens.list, _ = p.featureTokens.default, P = p.loader, F = b.loader, l = b.estimate, W = l.crypto_out_amount, re = l.conversion_price, u = l.total_fee;
67
- let $ = 0, U = 0;
68
- const j = l.fee_breakdown;
69
- for (let t = 0; t < j.length; t++) {
70
- const n = j[t];
71
- n.name === "ev_fee" ? $ = Number(n.value) : n.name === "network_fee" && (U = Number(n.value));
72
- }
73
- const [c, X] = m({
74
- symbol: ""
75
- }), [J, Y] = m(!1), [T, oe] = m(0), [g, Ie] = m(1), [ie, Me] = m([]), [R, Te] = m([]), [ae, Se] = m(!1), [se, we] = m(50), [ce, Pe] = m(3e3), [L, Re] = m(50), [le, ze] = m(3e3), [me, K] = m(""), [z, de] = m(
76
- l.fiat_amount || L.toString()
77
- ), [Oe, pe] = m(!1), O = N.find((t) => t.id === g), C = Ae(O == null ? void 0 : O.symbol);
78
- y(() => {
79
- const t = [];
80
- for (let n = 0; n < N.length; n++) {
81
- const i = {}, x = N[n];
82
- i.id = x.id, i.name = x.name, i.icon_uri = x.icon_uri, i.symbol = x.symbol, i.payment_options = [];
83
- const E = x.payment_options;
84
- for (let q = 0; q < E.length; q++) {
85
- const _e = {}, D = E[q];
86
- D.payment_provider !== Ue && D.active && D.payin_allowed && (Object.assign(_e, D), i.payment_options.push(_e));
87
- }
88
- i.payment_options.length > 0 && t.push(i);
89
- }
90
- Te(t);
91
- }, [N]), y(() => {
92
- if (!g || R.length === 0)
93
- return;
94
- const t = [];
95
- for (let n = 0; n < R.length; n++) {
96
- if (R[n].id === g) {
97
- const i = R[n].payment_options;
98
- let x = !1;
99
- for (let E = 0; E < i.length; E++) {
100
- const q = i[E];
101
- q.active && (t.push(q), i[E].id === T && (x = !0));
102
- }
103
- x || oe(t[0].id);
104
- }
105
- Me(t);
106
- }
107
- }, [g, R]), y(() => {
108
- if (l.crypto_currency) {
109
- const t = v.find(
110
- (n) => n.symbol === l.crypto_currency
111
- );
112
- X(t);
113
- } else
114
- _ && _.id && X(_);
115
- }, [_, l.crypto_currency]), y(() => {
116
- g && r(g);
117
- }, [g]), y(() => {
118
- if (c && c.id && z && T && g) {
119
- A(Ze()), Y(!1), K("");
120
- const t = setTimeout(() => {
121
- qe();
122
- }, 1e3);
123
- return () => clearTimeout(t);
124
- }
125
- }, [c, z, T, v, g]);
126
- const qe = () => {
127
- var x;
128
- const t = parseFloat(z);
129
- if (c.symbol === be) {
130
- if (se > t)
131
- return K(
132
- `Minimum value should be greater than ${C + se}`
133
- ), Y(!0), !1;
134
- if (ce * 1 < t)
135
- return K(
136
- `Maximum value should be less than ${C + ce}`
137
- ), Y(!0), !1;
138
- } else {
139
- if (L * 1 > t)
140
- return K(
141
- `Minimum value should be greater than ${C + L}`
142
- ), Y(!0), !1;
143
- if (le * 1 < t)
144
- return K(
145
- `Maximum value should be less than ${C + le}`
146
- ), Y(!0), !1;
147
- }
148
- const n = ie.find((E) => E.id === T), i = n.payment_type;
149
- A(
150
- ke({
151
- apiKey: S,
152
- transaction_type: c.symbol === be ? Z : ee,
153
- coin_amount: z,
154
- exchange: c.exchange,
155
- payment_type: i,
156
- fiat_ccy: O == null ? void 0 : O.symbol,
157
- crypto_ccy: c.symbol,
158
- network: (x = c.network) == null ? void 0 : x.name,
159
- payment_provider: n.payment_provider
160
- })
161
- );
162
- }, Be = ({ value: t, label: n }) => {
163
- let i;
164
- if (n === "credit_debit_card" ? (i = De, T === t && (i = Ge)) : (i = He, T === t && (i = Xe)), n)
165
- return /* @__PURE__ */ e(
166
- M,
167
- {
168
- mt: 0.5,
169
- sx: { cursor: "pointer" },
170
- onClick: () => oe(t * 1),
171
- children: /* @__PURE__ */ e("img", { src: i, alt: "payment", width: "90%" })
172
- }
173
- );
174
- };
175
- y(() => {
176
- const t = b.types.length;
177
- if (t > 0)
178
- for (let n = 0; n < t; n++) {
179
- const i = b.types[n];
180
- if (i.type === Z) {
181
- we(parseFloat(i.min_deposit_amount)), Pe(parseFloat(i.max_deposit_amount));
182
- break;
183
- }
184
- if (i.type === ee) {
185
- Re(parseFloat(i.min_deposit_amount)), ze(parseFloat(i.max_deposit_amount));
186
- break;
187
- }
188
- }
189
- }, [b.types]);
190
- const We = (t) => {
191
- const n = t.target.value;
192
- n ? /^([0-9]+)$/.test(n) && de(n) : de("");
193
- }, ue = (t) => {
194
- const n = v.find((i) => i.symbol === t);
195
- X(n);
196
- }, $e = () => {
197
- if (!c.id)
198
- return h({ message: "Please select token" }), !1;
199
- if (!T)
200
- return h({ message: "Please select payment method" }), !1;
201
- if (!z)
202
- return h({ message: "Please enter amount" }), !1;
203
- if (!W)
204
- return h({
205
- message: "Please wait for the estimate to be calculated and then press next"
206
- }), !1;
207
- k(te);
208
- };
209
- return /* @__PURE__ */ a(B, { children: [
210
- /* @__PURE__ */ e(o, { container: !0, children: /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(s, { className: d.label, variant: "caption", component: "p", children: "You Pay" }) }) }),
211
- /* @__PURE__ */ a(o, { mt: 0.5, spacing: 0, container: !0, children: [
212
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ a(
213
- G,
214
- {
215
- variant: "filled",
216
- className: `${d.amount} ${d["fiat-field"]}`,
217
- fullWidth: !0,
218
- children: [
219
- /* @__PURE__ */ e(
220
- H,
221
- {
222
- value: z,
223
- onChange: We,
224
- type: "text",
225
- placeholder: `${L > 0 ? "$" + L + " minimum value" : ""}`,
226
- error: J,
227
- disableUnderline: !0,
228
- required: !0,
229
- fullWidth: !0
230
- }
231
- ),
232
- /* @__PURE__ */ e(Ne, { className: d["amount-symbol"], children: " " })
233
- ]
234
- }
235
- ) }),
236
- /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: w ? /* @__PURE__ */ e(
237
- I,
238
- {
239
- sx: { ml: 1 },
240
- size: 30
241
- }
242
- ) : /* @__PURE__ */ e(
243
- G,
244
- {
245
- variant: "filled",
246
- className: `text-left ${d["fiat-picker"]}`,
247
- fullWidth: !0,
248
- children: /* @__PURE__ */ e(
249
- ve,
250
- {
251
- input: /* @__PURE__ */ e(H, { disableUnderline: !0 }),
252
- sx: {
253
- borderTopLeftRadius: 0,
254
- "&::before": {
255
- borderBottom: "none"
256
- },
257
- ".MuiSelect-select": {
258
- fontSize: "21px",
259
- fontWeight: "bold",
260
- color: "#16359d",
261
- padding: "27px 12px 10px !important"
262
- },
263
- ".dropdown-list-item, span": {
264
- position: "relative",
265
- bottom: "5px"
266
- },
267
- ".MuiSvgIcon-root": {
268
- fill: "#16359D !important"
269
- }
270
- },
271
- value: g,
272
- variant: "filled",
273
- displayEmpty: !0,
274
- onChange: (t) => Ie(t.target.value),
275
- error: J,
276
- children: R.map((t) => /* @__PURE__ */ a(Q, { value: t.id, children: [
277
- /* @__PURE__ */ e(Ce, { className: d["dropdown-list-item"], children: /* @__PURE__ */ e(
278
- "img",
279
- {
280
- src: t.icon_uri,
281
- onError: ({ currentTarget: n }) => {
282
- n.onerror = null, n.src = ye;
283
- },
284
- alt: "tokenImg",
285
- width: "40",
286
- height: "40"
287
- }
288
- ) }),
289
- /* @__PURE__ */ e("span", { children: t.symbol })
290
- ] }, t.id))
291
- }
292
- )
293
- }
294
- ) }),
295
- me && /* @__PURE__ */ e(s, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: me }) })
296
- ] }),
297
- /* @__PURE__ */ a(M, { className: "text-left", mt: 3, children: [
298
- /* @__PURE__ */ e(s, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
299
- w ? /* @__PURE__ */ e(I, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(o, { mt: 0.5, container: !0, children: ie.map((t) => /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
300
- Be,
301
- {
302
- label: t.payment_type,
303
- value: t.id
304
- }
305
- ) }, t.id)) })
306
- ] }),
307
- /* @__PURE__ */ e(o, { mt: 4, container: !0, children: /* @__PURE__ */ e(o, { size: { xs: 4 }, children: /* @__PURE__ */ e(s, { className: d.label, variant: "caption", component: "p", children: "You Receive" }) }) }),
308
- /* @__PURE__ */ a(o, { mt: 0.5, container: !0, children: [
309
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ a(
310
- G,
311
- {
312
- className: `${d.amount} ${d["fiat-field"]}`,
313
- fullWidth: !0,
314
- children: [
315
- /* @__PURE__ */ e(
316
- H,
317
- {
318
- disableUnderline: !0,
319
- value: W && parseFloat((+W * 1).toFixed(5)),
320
- type: "text",
321
- readOnly: !0,
322
- fullWidth: !0
323
- }
324
- ),
325
- /* @__PURE__ */ e(Ne, { className: d["amount-symbol"], children: +((fe = l == null ? void 0 : l.output_token) == null ? void 0 : fe.fiat_amount) * 1 > 0 ? C + (+((he = l == null ? void 0 : l.output_token) == null ? void 0 : he.fiat_amount) * 1).toFixed(2) : /* @__PURE__ */ e(B, { children: " " }) })
326
- ]
327
- }
328
- ) }),
329
- /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: P ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ a(
330
- G,
331
- {
332
- variant: "filled",
333
- className: `text-left ${d["crypto-picker"]}`,
334
- fullWidth: !0,
335
- children: [
336
- (c == null ? void 0 : c.network) && /* @__PURE__ */ e(
337
- ft,
338
- {
339
- className: `${d["network-label"]} ${d[rt(c == null ? void 0 : c.network.name)]}`,
340
- children: c == null ? void 0 : c.network.name
341
- }
342
- ),
343
- /* @__PURE__ */ a(
344
- ve,
345
- {
346
- input: /* @__PURE__ */ e(H, { disableUnderline: !0 }),
347
- sx: {
348
- borderTopLeftRadius: 0,
349
- "&::before": {
350
- borderBottom: "none"
351
- },
352
- ".MuiSelect-select": {
353
- fontSize: "21px",
354
- fontWeight: "bold",
355
- color: "#16359d",
356
- padding: "27px 12px 10px !important"
357
- },
358
- ".dropdown-list-item, span": {
359
- position: "relative",
360
- bottom: "5px"
361
- },
362
- ".MuiSvgIcon-root": {
363
- fill: "#16359D !important"
364
- }
365
- },
366
- className: "buy-select-dd",
367
- variant: "filled",
368
- value: c.symbol,
369
- displayEmpty: !0,
370
- onChange: (t) => ue(t.target.value),
371
- onOpen: (t) => {
372
- pe(!0), t.preventDefault();
373
- },
374
- defaultOpen: !1,
375
- open: !1,
376
- children: [
377
- /* @__PURE__ */ e(Q, { value: "", children: "Please select" }),
378
- v.map((t) => /* @__PURE__ */ a(Q, { value: t.symbol, children: [
379
- /* @__PURE__ */ e(Ce, { className: d["dropdown-list-item"], children: /* @__PURE__ */ e(
380
- "img",
381
- {
382
- src: t.icon_uri,
383
- onError: ({ currentTarget: n }) => {
384
- n.onerror = null, n.src = ye;
385
- },
386
- alt: "tokenImg",
387
- width: "40",
388
- height: "40"
389
- }
390
- ) }),
391
- /* @__PURE__ */ e("span", { children: t.symbol.toUpperCase() })
392
- ] }, t.id))
393
- ]
394
- }
395
- )
396
- ]
397
- }
398
- ) })
399
- ] }),
400
- /* @__PURE__ */ e(M, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ a(o, { container: !0, children: [
401
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ a(
402
- Ee,
403
- {
404
- sx: { padding: "0" },
405
- onClick: () => Se((t) => !t),
406
- disableFocusRipple: !0,
407
- disableRipple: !0,
408
- children: [
409
- /* @__PURE__ */ e(s, { variant: "caption", fontWeight: 500, children: "Fee Calculation" }),
410
- /* @__PURE__ */ e(
411
- Le,
412
- {
413
- sx: {
414
- transform: `rotate(${ae ? "90" : "0"}deg)`,
415
- fontSize: "15px"
416
- }
417
- }
418
- )
419
- ]
420
- }
421
- ) }),
422
- ae && /* @__PURE__ */ a(B, { children: [
423
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Everest Fee" }) }),
424
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
425
- C,
426
- F ? /* @__PURE__ */ e(I, { size: 30, color: "primary" }) : $.toFixed(2)
427
- ] }) }),
428
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Network Fee" }) }),
429
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
430
- C,
431
- F ? /* @__PURE__ */ e(
432
- I,
433
- {
434
- sx: { ml: 1 },
435
- size: 15,
436
- color: "primary"
437
- }
438
- ) : U.toFixed(2)
439
- ] }) })
440
- ] }),
441
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
442
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
443
- C,
444
- F ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(u).toFixed(2)
445
- ] }) }),
446
- c && /* @__PURE__ */ a(B, { children: [
447
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
448
- "1 ",
449
- c.symbol,
450
- " ",
451
- /* @__PURE__ */ e(
452
- nt,
453
- {
454
- title: je,
455
- placement: "right",
456
- children: /* @__PURE__ */ e(Ee, { className: "info-fee-icon", children: /* @__PURE__ */ e(
457
- Ve,
458
- {
459
- sx: {
460
- fontSize: "14px"
461
- }
462
- }
463
- ) })
464
- }
465
- )
466
- ] }) }),
467
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
468
- C,
469
- F ? /* @__PURE__ */ e(
470
- I,
471
- {
472
- sx: { ml: 1 },
473
- size: 15,
474
- color: "primary"
475
- }
476
- ) : Number(re).toFixed(2)
477
- ] }) })
478
- ] })
479
- ] }) }),
480
- /* @__PURE__ */ e(M, { mt: 4, children: /* @__PURE__ */ e(
481
- ne,
482
- {
483
- onClick: $e,
484
- disabled: J || !W,
485
- fullWidth: !0,
486
- children: /* @__PURE__ */ e("strong", { children: "Next" })
487
- }
488
- ) }),
489
- /* @__PURE__ */ e(
490
- ut,
491
- {
492
- open: Oe,
493
- setModal: pe,
494
- loader: P,
495
- tokenList: v,
496
- tokenSelect: ue
497
- }
498
- )
499
- ] });
500
- }, bt = ({
501
- setScreen: k,
502
- partnerKey: b,
503
- orderData: A,
504
- dispatch: f,
505
- walletAddress: p
506
- }) => {
507
- const r = A.estimate, h = A.create.order_id, S = A.loader, N = r.fiat_amount, w = Ae(r.fiat_currency), [v, _] = m(!1);
508
- y(() => {
509
- h && v && k(xt);
510
- }, [h]), y(() => {
511
- P();
512
- }, []);
513
- const P = () => {
514
- f(
515
- ke({
516
- ...r,
517
- apiKey: b,
518
- transaction_type: r.transaction_type,
519
- coin_amount: r.fiat_amount,
520
- exchange: r.exchange,
521
- payment_type: r.payment_type,
522
- fiat_ccy: r.fiat_currency,
523
- crypto_ccy: r.crypto_currency,
524
- network: r.network,
525
- payment_provider: r.payment_provider
526
- })
527
- );
528
- }, F = () => {
529
- f(
530
- et({
531
- apiKey: b,
532
- quoteId: r.quote_id,
533
- walletAddress: p
534
- })
535
- ), _(!0);
536
- };
537
- return /* @__PURE__ */ a(B, { children: [
538
- /* @__PURE__ */ e(
539
- it,
540
- {
541
- onClickHandler: () => k(Fe),
542
- backBtnText: "Confirm Your Order"
543
- }
544
- ),
545
- /* @__PURE__ */ e(s, { mt: 2, variant: "sm", fontWeight: 600, children: "Using payment method" }),
546
- /* @__PURE__ */ a(M, { mt: 2, className: d["confirm-payment"], children: [
547
- /* @__PURE__ */ e(
548
- "img",
549
- {
550
- src: r.payment_type === xe ? Je : Qe,
551
- width: 100,
552
- alt: "payment"
553
- }
554
- ),
555
- /* @__PURE__ */ e(s, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: r.payment_type === xe ? "Bank Account" : "Debit Card" }) })
556
- ] }),
557
- /* @__PURE__ */ e(s, { mt: 4, variant: "sm", fontWeight: 600, children: "To Wallet Address" }),
558
- /* @__PURE__ */ e(
559
- M,
560
- {
561
- mt: 2,
562
- className: d["confirm-payment"],
563
- sx: { width: "100% !important" },
564
- children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: p }) })
565
- }
566
- ),
567
- /* @__PURE__ */ e(s, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
568
- /* @__PURE__ */ e(M, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ a(o, { container: !0, children: [
569
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
570
- r.crypto_currency.toUpperCase(),
571
- " @",
572
- " ",
573
- Number(r.conversion_price).toFixed(2),
574
- " ",
575
- r.fiat_currency
576
- ] }) }),
577
- /* @__PURE__ */ e(o, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
578
- "span",
579
- {
580
- className: d["confirm-transaction-network"],
581
- style: {
582
- backgroundColor: r.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
583
- },
584
- children: r.network
585
- }
586
- ) }),
587
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
588
- Number(r.crypto_out_amount).toFixed(5),
589
- " ",
590
- r.crypto_currency.toUpperCase()
591
- ] }) }),
592
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
593
- (Number(N) - Number(r.total_fee)).toFixed(2),
594
- " ",
595
- r.fiat_currency
596
- ] }) }),
597
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
598
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ a(s, { variant: "caption", children: [
599
- Number(r.total_fee).toFixed(2),
600
- " ",
601
- r.fiat_currency
602
- ] }) }),
603
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
604
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ a("strong", { children: [
605
- w,
606
- Number(N).toFixed(2),
607
- " ",
608
- r.fiat_currency
609
- ] }) }) })
610
- ] }) }),
611
- /* @__PURE__ */ e(M, { mt: 4, children: /* @__PURE__ */ e(
612
- ne,
613
- {
614
- onClick: F,
615
- disabled: S,
616
- fullWidth: !0,
617
- children: /* @__PURE__ */ e("strong", { children: S ? /* @__PURE__ */ a(B, { children: [
618
- /* @__PURE__ */ e(I, { size: 15, color: "inherit" }),
619
- " Processing..."
620
- ] }) : "Payment Details" })
621
- }
622
- ) })
623
- ] });
624
- }, Fe = "FORM_SCREEN", te = "CONFIRM_SCREEN", xt = "PAYMENT_SCREEN", gt = "MINIMAL_KYC_SCREEN", Nt = ({ partnerKey: k, baseUrl: b, checkoutSdkKey: A }) => {
625
- const f = at(), p = V((u) => u.order), r = V(
626
- (u) => u.user.profile
627
- ), h = p.error, S = V(
628
- (u) => u.user.profile.everWalletAddress
629
- ), N = V(
630
- (u) => u.fiatAssets
631
- ), w = V(
632
- (u) => u.cryptoAssets
633
- ), [v, _] = m(Fe), [P, F] = m(0), { showAlertMessage: l } = ct();
634
- return y(() => {
635
- F(ot(r.tokens.list));
636
- }, [r.tokens]), y(() => {
637
- h && l({ message: h });
638
- }, [h]), y(() => {
639
- p.initMinimalKyc && (l({ message: h, type: "info" }), _(gt));
640
- }, [p.initMinimalKyc]), y(() => {
641
- f(st()), f(ge(ee)), f(ge(Z));
642
- }, []), /* @__PURE__ */ e(lt, { addPadding: !0, children: {
643
- FORM_SCREEN: /* @__PURE__ */ e(
644
- yt,
645
- {
646
- showAlertMessage: l,
647
- setScreen: _,
648
- fiatAssets: N,
649
- cryptoAssets: w,
650
- orderData: p,
651
- dispatch: f,
652
- getCryptoAssets: (u) => {
653
- f(Ke({ type: "buy", id: u, partnerKey: k }));
654
- },
655
- partnerKey: k,
656
- balance: P
657
- }
658
- ),
659
- CONFIRM_SCREEN: /* @__PURE__ */ e(
660
- bt,
661
- {
662
- partnerKey: k,
663
- setScreen: _,
664
- showAlertMessage: l,
665
- orderData: p,
666
- dispatch: f,
667
- walletAddress: S
668
- }
669
- ),
670
- PAYMENT_SCREEN: /* @__PURE__ */ e(
671
- mt,
672
- {
673
- checkoutKey: A,
674
- orderData: p,
675
- initPaymentRequest: (u) => {
676
- const $ = p.estimate, U = p.create.order_id, j = {
677
- token: u,
678
- amount: Number($.fiat_amount),
679
- currency: $.fiat_currency,
680
- reference: U,
681
- success_url: `${b}/dashboard?payment=success`,
682
- fail_url: `${b}/dashboard?payment=failed`
683
- };
684
- f(tt(j));
685
- },
686
- backBtnFunc: () => _(te)
687
- }
688
- ),
689
- MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
690
- dt,
691
- {
692
- inputComponent: pt,
693
- buttonComponent: ne,
694
- onComplete: () => {
695
- _(te);
696
- }
697
- }
698
- )
699
- }[v] });
700
- }, en = Ye(Nt);
701
- export {
702
- yt as B,
703
- te as C,
704
- Fe as F,
705
- gt as M,
706
- xt as P,
707
- bt as a,
708
- en as i
709
- };