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