everest-npm-features 0.0.20 → 0.0.21

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.
@@ -6,7 +6,7 @@ import "../../../styles.module-BFHktEw2.js";
6
6
  import "../Shared/appButton.js";
7
7
  import "../../../constants-CdVZO8DH.js";
8
8
  import "../../../order-DNSedxgT.js";
9
- import { a as g } from "../../../index-CTglGXWu.js";
9
+ import { a as g } from "../../../index-DHrWPN34.js";
10
10
  import "../../../hooks/useDialog/index.js";
11
11
  import "../../../util/constants.js";
12
12
  import "../../../Typography-Ds4fpvK8.js";
@@ -9,7 +9,7 @@ import "../../../index-f15o1nhn.js";
9
9
  import "../../../order-DNSedxgT.js";
10
10
  import "../../../tooltip-CwdohO6q.js";
11
11
  import "../../../util/functions.js";
12
- import { S as D } from "../../../index-CTglGXWu.js";
12
+ import { S as D } from "../../../index-DHrWPN34.js";
13
13
  import "../../../styles.module-BFHktEw2.js";
14
14
  import "../Shared/TokenModal/index.js";
15
15
  import "../Shared/appButton.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../hoc/withThemeProvider.js";
4
- import { C as e, F as f, M as O, i as d } from "../../../index-CTglGXWu.js";
4
+ import { C as e, F as f, M as O, i as d } from "../../../index-DHrWPN34.js";
5
5
  import "../../../react-redux-C7I9-1M6.js";
6
6
  import "../../../constants-CdVZO8DH.js";
7
7
  import "../../../fiatAssets-yeCL6wA9.js";
@@ -4,9 +4,9 @@ import { u as P, a as Ee } from "../../../react-redux-C7I9-1M6.js";
4
4
  import { P as Le } from "../../../PlayArrow-1Y66tCVx.js";
5
5
  import { I as We } from "../../../Info-83BXSu73.js";
6
6
  import { G as $e } from "../../../generic-token-B_ptO5yb.js";
7
- import { getCentralLedgetNetwork as B, getNetworkBackGround as ie, getCurrencySymbol as Pe } from "../../../util/functions.js";
8
- import le from "../Shared/TokenModal/index.js";
9
- import { formatNumberWithoutRounding as ce } from "../../../util/conversions.js";
7
+ import { getCentralLedgetNetwork as B, getNetworkBackGround as le, getCurrencySymbol as Pe } from "../../../util/functions.js";
8
+ import ce from "../Shared/TokenModal/index.js";
9
+ import { formatNumberWithoutRounding as me } from "../../../util/conversions.js";
10
10
  import { F as Be } from "../../../constants-CdVZO8DH.js";
11
11
  import { u as De } from "../../../index-f15o1nhn.js";
12
12
  import { f as ze, a as Ue, b as qe } from "../../../cryptoAssets-awZZ9HTs.js";
@@ -35,37 +35,37 @@ import { G as n } from "../../../Grid-BaaKMDwM.js";
35
35
  import { T as l } from "../../../Typography-Ds4fpvK8.js";
36
36
  import { F as N } from "../../../FormControl-Cc-02KHW.js";
37
37
  import { F as A } from "../../../FilledInput-n9W_V8GV.js";
38
- import { F as me, I as z } from "../../../TextField-Cm9apaOp.js";
38
+ import { F as de, I as z } from "../../../TextField-Cm9apaOp.js";
39
39
  import { C as f } from "../../../CircularProgress-fePUtoaj.js";
40
40
  import { S as U } from "../../../Select-DpKw-a6h.js";
41
41
  import { M as g } from "../../../MenuItem-BkJ_C9Xs.js";
42
- import { L as de } from "../../../ListItemIcon-DIz-ZmJ0.js";
43
- import { I as ue } from "../../../IconButton-8B2ygvr4.js";
42
+ import { L as ue } from "../../../ListItemIcon-DIz-ZmJ0.js";
43
+ import { I as pe } from "../../../IconButton-8B2ygvr4.js";
44
44
  import { B as ot } from "../../../Button-DCBtFwk3.js";
45
45
  const at = ({ partnerKey: I, navigate: q }) => {
46
- var ne, se;
47
- const G = Re(null), { openDialog: pe, ConfirmDialog: fe } = rt(), { showAlertMessage: m } = tt(), k = P((t) => t.order), b = P(
46
+ var se, ie;
47
+ const G = Re(null), { openDialog: fe, ConfirmDialog: he } = rt(), { showAlertMessage: m } = tt(), k = P((t) => t.order), b = P(
48
48
  (t) => t.cryptoAssets
49
- ), Y = P(De), he = Y.data, { loader: xe } = Y, M = b.featureTokens.swap.inputList, r = b.featureTokens.swap.inputDefault, w = b.featureTokens.swap.outputList, o = b.featureTokens.swap.outputDefault, _ = b.loader, O = k.error, j = k.create.order_id, S = k.loader, c = k.estimate, C = c.output_token.amount, ge = c.conversion_price, be = c.total_fee, F = Number((ne = c == null ? void 0 : c.input_token) == null ? void 0 : ne.fiat_amount), H = Number((se = c == null ? void 0 : c.output_token) == null ? void 0 : se.fiat_amount);
50
- let K = 0, X = 0;
51
- const V = c.fee_breakdown;
52
- for (let t = 0; t < V.length; t++) {
53
- const i = V[t];
54
- i.name === "ev_fee" ? K = Number(i.value) : i.name === "network_fee" && (X = Number(i.value));
49
+ ), Y = P(De), xe = Y.data, { loader: ge } = Y, M = b.featureTokens.swap.inputList, r = b.featureTokens.swap.inputDefault, w = b.featureTokens.swap.outputList, o = b.featureTokens.swap.outputDefault, _ = b.loader, O = k.error, j = k.create.order_id, S = k.loader, c = k.estimate, C = c.output_token.amount, H = c.conversion_price, be = c.total_fee, F = Number((se = c == null ? void 0 : c.input_token) == null ? void 0 : se.fiat_amount), K = Number((ie = c == null ? void 0 : c.output_token) == null ? void 0 : ie.fiat_amount);
50
+ let X = 0, V = 0;
51
+ const J = c.fee_breakdown;
52
+ for (let t = 0; t < J.length; t++) {
53
+ const i = J[t];
54
+ i.name === "ev_fee" ? X = Number(i.value) : i.name === "network_fee" && (V = Number(i.value));
55
55
  }
56
- const [h, R] = u("50"), [E, we] = u(!1), [ve, J] = u(!1), [ye, Q] = u(!1), [Z, Ne] = u(!1), [L, ee] = u(!1), [p, ke] = u(""), [W, nt] = u(50), [_e, st] = u(1e4), [te, Se] = u(""), Ce = /^([0-9]*(\,|\.)[0-9]+|[0-9]+)$/, $ = Pe("USD"), d = Ee(), Fe = (t) => {
56
+ const [h, R] = u("50"), [E, we] = u(!1), [ve, Q] = u(!1), [ye, Z] = u(!1), [ee, Ne] = u(!1), [L, te] = u(!1), [p, ke] = u(""), [W, nt] = u(50), [_e, st] = u(1e4), [re, Se] = u(""), Ce = /^([0-9]*(\,|\.)[0-9]+|[0-9]+)$/, $ = Pe("USD"), d = Ee(), Fe = (t) => {
57
57
  d(Ue(t));
58
- }, re = (t) => {
58
+ }, oe = (t) => {
59
59
  d(qe(t));
60
60
  };
61
61
  v(() => {
62
- j && L && pe({
62
+ j && L && fe({
63
63
  icon: Ke,
64
64
  title: "Swap Success",
65
65
  message: "Your transaction was successful for more details on the transaction, please view your transaction history.",
66
66
  cancelButtonText: "Swap again",
67
67
  onCancel: () => {
68
- d(D()), ee(!1);
68
+ d(D()), te(!1);
69
69
  },
70
70
  confirmButtonText: "Track Order",
71
71
  onConfirm: () => {
@@ -116,14 +116,14 @@ const at = ({ partnerKey: I, navigate: q }) => {
116
116
  ke(t);
117
117
  }, Ie = (t) => {
118
118
  const i = t.target.value;
119
- i ? /^([0-9.]+)$/.test(i) && R(ce(i, 8)) : R("");
120
- }, oe = (t) => {
119
+ i ? /^([0-9.]+)$/.test(i) && R(me(i, 8)) : R("");
120
+ }, ae = (t) => {
121
121
  if (w) {
122
122
  const i = w.find((T) => T.symbol === t);
123
- re(i);
123
+ oe(i);
124
124
  }
125
- }, ae = (t) => {
126
- re({ symbol: "" });
125
+ }, ne = (t) => {
126
+ oe({ symbol: "" });
127
127
  const i = M.find((T) => T.symbol === t);
128
128
  Fe(i);
129
129
  }, Me = () => {
@@ -159,7 +159,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
159
159
  }), !1;
160
160
  if (L)
161
161
  return !1;
162
- ee(!0), d(
162
+ te(!0), d(
163
163
  He({
164
164
  apiKey: I,
165
165
  quoteId: c.quote_id,
@@ -167,11 +167,11 @@ const at = ({ partnerKey: I, navigate: q }) => {
167
167
  })
168
168
  );
169
169
  }, Oe = () => {
170
- r && R(ce(r.fmt_balance + "", 8));
170
+ r && R(me(r.fmt_balance + "", 8));
171
171
  };
172
172
  return /* @__PURE__ */ a(et, { addPadding: !0, children: [
173
173
  /* @__PURE__ */ a(y, { children: [
174
- /* @__PURE__ */ e(fe, {}),
174
+ /* @__PURE__ */ e(he, {}),
175
175
  /* @__PURE__ */ a(n, { container: !0, children: [
176
176
  /* @__PURE__ */ e(n, { item: !0, xs: 2.5, children: /* @__PURE__ */ e(
177
177
  l,
@@ -219,7 +219,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
219
219
  fullWidth: !0
220
220
  }
221
221
  ),
222
- /* @__PURE__ */ e(me, { className: s["amount-symbol"], children: F > 0 ? "$" + (F * 1).toFixed(2) : /* @__PURE__ */ e(x, { children: " " }) })
222
+ /* @__PURE__ */ e(de, { className: s["amount-symbol"], children: F > 0 ? "$" + (F * 1).toFixed(2) : /* @__PURE__ */ e(x, { children: " " }) })
223
223
  ]
224
224
  }
225
225
  ) }),
@@ -233,7 +233,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
233
233
  (r == null ? void 0 : r.network) && /* @__PURE__ */ e(
234
234
  z,
235
235
  {
236
- className: `${s["network-label"]} ${s[ie(r == null ? void 0 : r.network.name)]}`,
236
+ className: `${s["network-label"]} ${s[le(r == null ? void 0 : r.network.name)]}`,
237
237
  children: B(r == null ? void 0 : r.network.name)
238
238
  }
239
239
  ),
@@ -265,9 +265,9 @@ const at = ({ partnerKey: I, navigate: q }) => {
265
265
  variant: "filled",
266
266
  value: r && r.symbol,
267
267
  displayEmpty: !0,
268
- onChange: (t) => ae(t.target.value),
268
+ onChange: (t) => ne(t.target.value),
269
269
  onOpen: (t) => {
270
- Q(!0), t.preventDefault();
270
+ Z(!0), t.preventDefault();
271
271
  },
272
272
  defaultOpen: !1,
273
273
  open: !1,
@@ -275,7 +275,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
275
275
  children: [
276
276
  /* @__PURE__ */ e(g, { value: "", children: "Please select input" }),
277
277
  M.map((t) => /* @__PURE__ */ a(g, { value: t.symbol, children: [
278
- /* @__PURE__ */ e(de, { className: s["dropdown-list-item"], children: /* @__PURE__ */ e(
278
+ /* @__PURE__ */ e(ue, { className: s["dropdown-list-item"], children: /* @__PURE__ */ e(
279
279
  "img",
280
280
  {
281
281
  src: t.icon_uri,
@@ -292,7 +292,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
292
292
  ]
293
293
  }
294
294
  ) }),
295
- te && /* @__PURE__ */ e(l, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: te }) })
295
+ re && /* @__PURE__ */ e(l, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: re }) })
296
296
  ] }),
297
297
  /* @__PURE__ */ a(n, { mt: 4, container: !0, children: [
298
298
  /* @__PURE__ */ e(n, { item: !0, xs: 4, children: /* @__PURE__ */ e(
@@ -332,7 +332,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
332
332
  fullWidth: !0
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ e(me, { className: s["amount-symbol"], children: H > 0 ? "$" + (H * 1).toFixed(2) : /* @__PURE__ */ e(x, { children: " " }) })
335
+ /* @__PURE__ */ e(de, { className: s["amount-symbol"], children: K > 0 ? "$" + (K * 1).toFixed(2) : /* @__PURE__ */ e(x, { children: " " }) })
336
336
  ]
337
337
  }
338
338
  ) }),
@@ -352,7 +352,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
352
352
  (o == null ? void 0 : o.network) && /* @__PURE__ */ e(
353
353
  z,
354
354
  {
355
- className: `${s["network-label"]} ${s[ie(o == null ? void 0 : o.network.name)]}`,
355
+ className: `${s["network-label"]} ${s[le(o == null ? void 0 : o.network.name)]}`,
356
356
  children: o == null ? void 0 : o.network.name
357
357
  }
358
358
  ),
@@ -384,16 +384,16 @@ const at = ({ partnerKey: I, navigate: q }) => {
384
384
  variant: "filled",
385
385
  value: o && o.symbol,
386
386
  displayEmpty: !0,
387
- onChange: (t) => oe(t.target.value),
387
+ onChange: (t) => ae(t.target.value),
388
388
  onOpen: (t) => {
389
- J(!0), t.preventDefault();
389
+ Q(!0), t.preventDefault();
390
390
  },
391
391
  defaultOpen: !1,
392
392
  open: !1,
393
393
  children: [
394
394
  /* @__PURE__ */ e(g, { value: "", children: "Please select output" }),
395
395
  w && w.map((t) => /* @__PURE__ */ a(g, { value: t.symbol, children: [
396
- /* @__PURE__ */ e(de, { className: s["dropdown-list-item"], children: /* @__PURE__ */ e(
396
+ /* @__PURE__ */ e(ue, { className: s["dropdown-list-item"], children: /* @__PURE__ */ e(
397
397
  "img",
398
398
  {
399
399
  src: t.icon_uri,
@@ -416,7 +416,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
416
416
  ] }),
417
417
  /* @__PURE__ */ e(y, { mt: 2.5, className: s["fee-area"], children: /* @__PURE__ */ a(n, { container: !0, children: [
418
418
  /* @__PURE__ */ e(n, { className: "text-left", item: !0, xs: 12, children: /* @__PURE__ */ a(
419
- ue,
419
+ pe,
420
420
  {
421
421
  sx: { padding: "0" },
422
422
  onClick: () => Ne((t) => !t),
@@ -428,7 +428,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
428
428
  Le,
429
429
  {
430
430
  sx: {
431
- transform: `rotate(${Z ? "90" : "0"}deg)`,
431
+ transform: `rotate(${ee ? "90" : "0"}deg)`,
432
432
  fontSize: "15px"
433
433
  }
434
434
  }
@@ -436,7 +436,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
436
436
  ]
437
437
  }
438
438
  ) }),
439
- Z && /* @__PURE__ */ a(x, { children: [
439
+ ee && /* @__PURE__ */ a(x, { children: [
440
440
  /* @__PURE__ */ e(n, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(l, { variant: "caption", children: "Everest Fee" }) }),
441
441
  /* @__PURE__ */ e(n, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ a(l, { variant: "caption", children: [
442
442
  $,
@@ -446,7 +446,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
446
446
  sx: { ml: 1 },
447
447
  size: 15
448
448
  }
449
- ) : K.toFixed(2)
449
+ ) : X.toFixed(2)
450
450
  ] }) }),
451
451
  /* @__PURE__ */ e(n, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(l, { variant: "caption", children: "Network Fee" }) }),
452
452
  /* @__PURE__ */ e(n, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ a(l, { variant: "caption", children: [
@@ -457,7 +457,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
457
457
  sx: { ml: 1 },
458
458
  size: 15
459
459
  }
460
- ) : X.toFixed(2)
460
+ ) : V.toFixed(2)
461
461
  ] }) })
462
462
  ] }),
463
463
  /* @__PURE__ */ e(n, { className: "text-left", item: !0, xs: 6, children: /* @__PURE__ */ e(l, { variant: "caption", children: "Total Fees" }) }),
@@ -476,7 +476,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
476
476
  "1 ",
477
477
  r == null ? void 0 : r.symbol,
478
478
  " ",
479
- /* @__PURE__ */ e(Qe, { title: Je, placement: "right", children: /* @__PURE__ */ e(ue, { className: s["info-fee-icon"], children: /* @__PURE__ */ e(We, { sx: { fontSize: "14px" } }) }) })
479
+ /* @__PURE__ */ e(Qe, { title: Je, placement: "right", children: /* @__PURE__ */ e(pe, { className: s["info-fee-icon"], children: /* @__PURE__ */ e(We, { sx: { fontSize: "14px" } }) }) })
480
480
  ] }) }),
481
481
  /* @__PURE__ */ e(n, { className: "text-right", item: !0, xs: 6, children: /* @__PURE__ */ e(l, { variant: "caption", children: S ? /* @__PURE__ */ e(
482
482
  f,
@@ -484,10 +484,10 @@ const at = ({ partnerKey: I, navigate: q }) => {
484
484
  sx: { ml: 1 },
485
485
  size: 15
486
486
  }
487
- ) : parseFloat(ge).toFixed(6) + " " + (o == null ? void 0 : o.symbol) }) })
487
+ ) : H && parseFloat(H).toFixed(6) + " " + (o == null ? void 0 : o.symbol) }) })
488
488
  ] })
489
489
  ] }) }),
490
- /* @__PURE__ */ e(y, { sx: { alignItems: "left", width: "100%" }, children: xe ? /* @__PURE__ */ e(y, { mt: 2, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(f, {}) }) : /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
490
+ /* @__PURE__ */ e(y, { sx: { alignItems: "left", width: "100%" }, children: ge ? /* @__PURE__ */ e(y, { mt: 2, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(f, {}) }) : /* @__PURE__ */ e(x, { children: /* @__PURE__ */ a(
491
491
  N,
492
492
  {
493
493
  variant: "filled",
@@ -501,7 +501,7 @@ const at = ({ partnerKey: I, navigate: q }) => {
501
501
  onChange: (t) => Ae(t.target.value),
502
502
  children: [
503
503
  /* @__PURE__ */ e(g, { value: "", children: /* @__PURE__ */ e("em", { children: "None" }) }),
504
- he.map((t, i) => /* @__PURE__ */ e(g, { value: t.address, children: t.name + "(" + t.address + ")" }, i))
504
+ xe.map((t, i) => /* @__PURE__ */ e(g, { value: t.address, children: t.name + "(" + t.address + ")" }, i))
505
505
  ]
506
506
  }
507
507
  )
@@ -524,23 +524,23 @@ const at = ({ partnerKey: I, navigate: q }) => {
524
524
  ) })
525
525
  ] }),
526
526
  /* @__PURE__ */ e(
527
- le,
527
+ ce,
528
528
  {
529
529
  open: ye,
530
- setModal: Q,
530
+ setModal: Z,
531
531
  loader: _,
532
532
  tokenList: M,
533
- tokenSelect: ae
533
+ tokenSelect: ne
534
534
  }
535
535
  ),
536
536
  /* @__PURE__ */ e(
537
- le,
537
+ ce,
538
538
  {
539
539
  open: ve,
540
- setModal: J,
540
+ setModal: Q,
541
541
  loader: _,
542
542
  tokenList: w ?? [],
543
- tokenSelect: oe,
543
+ tokenSelect: ae,
544
544
  showBalance: !1
545
545
  }
546
546
  )
@@ -1,134 +1,138 @@
1
- import { jsxs as n, Fragment as k, jsx as e } from "react/jsx-runtime";
2
- import { useState as u, useEffect as x } from "react";
3
- import Pe from "./hoc/withThemeProvider.js";
4
- import { P as $e } from "./PlayArrow-1Y66tCVx.js";
5
- import { I as Ue } from "./Info-83BXSu73.js";
6
- import { G as fe } from "./generic-token-B_ptO5yb.js";
7
- import { TOKEN_TO_FIAT as Z, ESTIMATE_TOOLTIP_TEXT as Ye, SELL_WITHDRAW_ICON as qe, DIALOG_SUCCESS_ICON as Ge } from "./util/constants.js";
8
- import { aa as Ke } from "./constants-CdVZO8DH.js";
9
- import { u as De } from "./index-f15o1nhn.js";
10
- import { a as He, b as be, o as ee, c as je, f as Xe } from "./order-DNSedxgT.js";
11
- import { M as Ve } from "./tooltip-CwdohO6q.js";
12
- import { getCurrencySymbol as _e, getNetworkBackGround as Je } from "./util/functions.js";
13
- import Qe from "./components/Wallet/Shared/backBtn.js";
1
+ import { jsxs as r, Fragment as _, jsx as e } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as x } from "react";
3
+ import Ue from "./hoc/withThemeProvider.js";
4
+ import { P as qe } from "./PlayArrow-1Y66tCVx.js";
5
+ import { I as Ye } from "./Info-83BXSu73.js";
6
+ import { G as xe } from "./generic-token-B_ptO5yb.js";
7
+ import { TOKEN_TO_FIAT as Z, ESTIMATE_TOOLTIP_TEXT as Ge, SELL_WITHDRAW_ICON as Ke, DIALOG_SUCCESS_ICON as He } from "./util/constants.js";
8
+ import { aa as De } from "./constants-CdVZO8DH.js";
9
+ import { u as je } from "./index-f15o1nhn.js";
10
+ import { a as Xe, b as ve, o as ee, c as Ve, f as Je } from "./order-DNSedxgT.js";
11
+ import { M as Qe } from "./tooltip-CwdohO6q.js";
12
+ import { getCurrencySymbol as Ne, getNetworkBackGround as Ze } from "./util/functions.js";
13
+ import et from "./components/Wallet/Shared/backBtn.js";
14
14
  import { s as l } from "./styles.module-BFHktEw2.js";
15
15
  import K from "./components/Wallet/Shared/appButton.js";
16
- import { useDialog as Ne } from "./hooks/useDialog/index.js";
16
+ import { useDialog as Ce } from "./hooks/useDialog/index.js";
17
17
  import { T as s } from "./Typography-Ds4fpvK8.js";
18
18
  import { B as I } from "./Box-Be0E_-eR.js";
19
19
  import { G as o } from "./Grid2-DX2sucnU.js";
20
- import { C } from "./CircularProgress-fePUtoaj.js";
21
- import { u as W, a as Ze } from "./react-redux-C7I9-1M6.js";
22
- import { f as et } from "./fiatAssets-yeCL6wA9.js";
23
- import { f as tt } from "./cryptoAssets-awZZ9HTs.js";
24
- import { u as rt } from "./wallet-D76D_QSY.js";
25
- import { useSnackBarContext as nt } from "./context/snackBarContext.js";
26
- import { AuthContainer as ot } from "./components/Wallet/Shared/Container/index.js";
27
- import it from "./components/Shared/MinimalKyc/index.js";
28
- import at from "./components/Wallet/Shared/Input/index.js";
29
- import st from "./components/Wallet/Shared/TokenModal/index.js";
30
- import { formatNumberWithoutRounding as lt } from "./util/conversions.js";
20
+ import { C as S } from "./CircularProgress-fePUtoaj.js";
21
+ import { u as W, a as tt } from "./react-redux-C7I9-1M6.js";
22
+ import { f as nt } from "./fiatAssets-yeCL6wA9.js";
23
+ import { f as rt } from "./cryptoAssets-awZZ9HTs.js";
24
+ import { u as ot } from "./wallet-D76D_QSY.js";
25
+ import { useSnackBarContext as it } from "./context/snackBarContext.js";
26
+ import { AuthContainer as at } from "./components/Wallet/Shared/Container/index.js";
27
+ import st from "./components/Shared/MinimalKyc/index.js";
28
+ import lt from "./components/Wallet/Shared/Input/index.js";
29
+ import ct from "./components/Wallet/Shared/TokenModal/index.js";
30
+ import { formatNumberWithoutRounding as mt } from "./util/conversions.js";
31
31
  import { F as A } from "./FormControl-Cc-02KHW.js";
32
- import { F as q } from "./FilledInput-n9W_V8GV.js";
33
- import { F as he, I as xe } from "./TextField-Cm9apaOp.js";
32
+ import { F as Y } from "./FilledInput-n9W_V8GV.js";
33
+ import { F as ye, I as be } from "./TextField-Cm9apaOp.js";
34
34
  import { S as Q } from "./Select-DpKw-a6h.js";
35
35
  import { M as G } from "./MenuItem-BkJ_C9Xs.js";
36
- import { L as ye } from "./ListItemIcon-DIz-ZmJ0.js";
37
- import { I as ge } from "./IconButton-8B2ygvr4.js";
38
- const ct = ({
39
- setScreen: _,
40
- orderData: p,
36
+ import { L as ge } from "./ListItemIcon-DIz-ZmJ0.js";
37
+ import { I as _e } from "./IconButton-8B2ygvr4.js";
38
+ const dt = ({
39
+ setScreen: v,
40
+ orderData: f,
41
41
  dispatch: c,
42
- fiatAssets: m,
43
- cryptoAssets: f,
44
- getCryptoAssets: S,
45
- showAlertMessage: w,
46
- partnerKey: z,
47
- walletAddress: r,
48
- setWalletAddress: g,
49
- navigate: F
42
+ fiatAssets: d,
43
+ cryptoAssets: h,
44
+ getCryptoAssets: F,
45
+ showAlertMessage: N,
46
+ partnerKey: R,
47
+ walletAddress: n,
48
+ setWalletAddress: b,
49
+ navigate: w
50
50
  }) => {
51
- var ue, pe;
52
- const { openDialog: b, ConfirmDialog: O } = Ne(), D = W((t) => t.app.features).withdraw, L = W(De), H = L.data, { error: pt, message: ft, loader: Ce } = L, B = m.fiats, ke = m.loader, P = f.featureTokens.sell.list, $ = f.featureTokens.sell.default, re = f.loader, U = p.loader, h = p.estimate, N = h.fiat_out_amount, Se = h.conversion_price, we = h.total_fee;
53
- let ne = 0, oe = 0;
54
- const ie = h.fee_breakdown;
51
+ var pe, fe, he;
52
+ const { openDialog: g, ConfirmDialog: O } = Ce(), H = W((t) => t.app.features).withdraw, L = W(je), D = L.data, { loader: Se } = L, B = d.fiats, Fe = d.loader, P = h.featureTokens.sell.list, $ = h.featureTokens.sell.default, ne = h.loader, U = f.loader, m = f.estimate, C = m.fiat_out_amount, we = m.conversion_price, Ee = m.total_fee;
53
+ let re = 0, oe = 0;
54
+ const ie = m.fee_breakdown;
55
55
  for (let t = 0; t < ie.length; t++) {
56
- const i = ie[t];
57
- i.name === "ev_fee" ? ne = Number(i.value) : i.name === "network_fee" && (oe = Number(i.value));
56
+ const a = ie[t];
57
+ a.name === "ev_fee" ? re = Number(a.value) : a.name === "network_fee" && (oe = Number(a.value));
58
58
  }
59
- const [a, ae] = u({
59
+ const [i, ae] = p({
60
60
  symbol: ""
61
- }), [j, X] = u(!1), [E, Fe] = u(2), [Ee, Ie] = u([]), [se, Te] = u(!1), [Y, ze] = u(50), [le, Me] = u(3e3), [ce, V] = u(""), [M, J] = u(h.fiat_amount || "0.5"), [Re, me] = u(!1), T = B.find((t) => t.id === E), v = _e(T == null ? void 0 : T.symbol);
61
+ }), [j, X] = p(!1), [E, Ie] = p(2), [Te, ze] = p([]), [se, Re] = p(!1), [q, Me] = p(50), [le, Ae] = p(3e3), [ce, V] = p(""), [T, J] = p(m.crypto_amount || "0.5"), [We, me] = p(!1), de = Number((pe = m == null ? void 0 : m.input_token) == null ? void 0 : pe.fiat_amount), z = B.find((t) => t.id === E), k = Ne(z == null ? void 0 : z.symbol);
62
62
  x(() => {
63
63
  const t = [];
64
- for (let i = 0; i < B.length; i++) {
65
- const d = {}, R = B[i];
66
- R.symbol === "EUR" && (d.id = R.id, d.name = R.name, d.icon_uri = R.icon_uri, d.symbol = R.symbol, d.payment_options = [], t.push(d));
64
+ for (let a = 0; a < B.length; a++) {
65
+ const u = {}, M = B[a];
66
+ M.symbol === "EUR" && (u.id = M.id, u.name = M.name, u.icon_uri = M.icon_uri, u.symbol = M.symbol, u.payment_options = [], t.push(u));
67
67
  }
68
- Ie(t);
68
+ ze(t);
69
69
  }, [B]), x(() => {
70
70
  $ && $.id && ae($);
71
71
  }, [$]), x(() => {
72
- N && (Y > +N * 1 && (V(
73
- `Minimum value should be greater than ${v + Y}`
74
- ), X(!0)), le < +N * 1 && (V(
75
- `Maximum value should be less than ${v + le}`
72
+ C && (q > +C * 1 && (V(
73
+ `Minimum value should be greater than ${k + q}`
74
+ ), X(!0)), le < +C * 1 && (V(
75
+ `Maximum value should be less than ${k + le}`
76
76
  ), X(!0)));
77
- }, [N]), x(() => {
78
- E && S && S(E);
79
- }, [E, r]), x(() => {
80
- if (a && a.id && M && E) {
81
- c(He()), X(!1), V("");
77
+ }, [C]), x(() => {
78
+ E && F && F(E);
79
+ }, [E, n]), x(() => {
80
+ if (i && i.id && T && E) {
81
+ c(Xe()), X(!1), V("");
82
82
  const t = setTimeout(() => {
83
- Ae();
83
+ Oe();
84
84
  }, 1e3);
85
85
  return () => clearTimeout(t);
86
86
  }
87
- }, [a, M, P, E]);
88
- const Ae = () => {
87
+ }, [i, T, P, E]);
88
+ const Oe = () => {
89
89
  var t;
90
90
  c(
91
- be({
92
- apiKey: z,
91
+ ve({
92
+ apiKey: R,
93
93
  transaction_type: Z,
94
- coin_amount: M,
95
- exchange: a.exchange,
96
- fiat_ccy: T == null ? void 0 : T.symbol,
97
- crypto_ccy: a.symbol,
98
- network: (t = a.network) == null ? void 0 : t.name
94
+ coin_amount: T,
95
+ exchange: i.exchange,
96
+ fiat_ccy: z == null ? void 0 : z.symbol,
97
+ crypto_ccy: i.symbol,
98
+ network: (t = i.network) == null ? void 0 : t.name
99
99
  })
100
100
  );
101
101
  };
102
102
  x(() => {
103
- const t = p.types.length;
103
+ const t = f.types.length;
104
104
  if (t > 0)
105
- for (let i = 0; i < t; i++) {
106
- const d = p.types[i];
107
- if (d.type === Z) {
108
- ze(parseFloat(d.min_deposit_amount)), Me(parseFloat(d.max_deposit_amount));
105
+ for (let a = 0; a < t; a++) {
106
+ const u = f.types[a];
107
+ if (u.type === Z) {
108
+ Me(parseFloat(u.min_deposit_amount)), Ae(parseFloat(u.max_deposit_amount));
109
109
  break;
110
110
  }
111
111
  }
112
- }, [p.types]);
113
- const We = (t) => {
114
- const i = t.target.value;
115
- i ? /^([0-9.]+)$/.test(i) && J(i) : J("");
116
- }, de = (t) => {
117
- const i = P.find((d) => d.symbol === t);
118
- ae(i);
119
- }, Oe = () => {
120
- if (!a.id)
121
- return w({ message: "Please select token" }), !1;
122
- if (!M)
123
- return w({ message: "Please enter amount" }), !1;
124
- if (!N)
125
- return w({
112
+ }, [f.types]);
113
+ const Le = (t) => {
114
+ const a = t.target.value;
115
+ a ? /^([0-9.]+)$/.test(a) && J(a) : J("");
116
+ }, ue = (t) => {
117
+ const a = P.find((u) => u.symbol === t);
118
+ ae(a);
119
+ }, Be = () => {
120
+ if (!i.id)
121
+ return N({ message: "Please select token" }), !1;
122
+ if (!T)
123
+ return N({ message: "Please enter amount" }), !1;
124
+ if (!C)
125
+ return N({
126
126
  message: "Please wait for the estimate to be calculated and then press next"
127
127
  }), !1;
128
- _(ve);
129
- }, Le = () => {
130
- b({
131
- icon: qe,
128
+ if (i.fmt_balance && +T > parseFloat(i.fmt_balance))
129
+ return N({
130
+ message: "Insufficient Funds. Please provide amount less or equal to available balance"
131
+ }), !1;
132
+ v(ke);
133
+ }, Pe = () => {
134
+ g({
135
+ icon: Ke,
132
136
  title: "Sell & Withdraw",
133
137
  message: `When you sell your token you receive fiat tokens into your account. You can re-invest that fiat directly into other tokens, or if you would like, you can withdraw those funds to your bank account.<br /><br />
134
138
  <p style="text-align: left; padding-left: 25%">1. Go to the Sell screen<br />
@@ -141,14 +145,14 @@ const ct = ({
141
145
  confirmButtonText: "Ok",
142
146
  cancelButtonShow: !1
143
147
  });
144
- }, Be = () => {
145
- a && J(lt(a.fmt_balance + "", 8));
148
+ }, $e = () => {
149
+ i && J(mt(i.fmt_balance + "", 8));
146
150
  };
147
- return /* @__PURE__ */ n(k, { children: [
151
+ return /* @__PURE__ */ r(_, { children: [
148
152
  /* @__PURE__ */ e(O, {}),
149
- /* @__PURE__ */ n(o, { container: !0, children: [
153
+ /* @__PURE__ */ r(o, { container: !0, children: [
150
154
  /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(s, { className: l.label, variant: "caption", component: "p", children: "You Pay" }) }),
151
- /* @__PURE__ */ e(o, { size: { xs: 9.5 }, children: r && a && /* @__PURE__ */ n(
155
+ /* @__PURE__ */ e(o, { size: { xs: 9.5 }, children: n && i && /* @__PURE__ */ r(
152
156
  s,
153
157
  {
154
158
  className: l["balance-label"],
@@ -156,17 +160,17 @@ const ct = ({
156
160
  component: "p",
157
161
  children: [
158
162
  "You Have: ",
159
- a.fmt_balance,
163
+ i.fmt_balance,
160
164
  " ",
161
- a.symbol,
165
+ i.symbol,
162
166
  " ",
163
- /* @__PURE__ */ e("span", { className: l["max-btn"], onClick: Be, children: "MAX" })
167
+ /* @__PURE__ */ e("span", { className: l["max-btn"], onClick: $e, children: "MAX" })
164
168
  ]
165
169
  }
166
170
  ) })
167
171
  ] }),
168
- /* @__PURE__ */ n(o, { mt: 0.5, spacing: 0, container: !0, children: [
169
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ n(
172
+ /* @__PURE__ */ r(o, { mt: 0.5, spacing: 0, container: !0, children: [
173
+ /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ r(
170
174
  A,
171
175
  {
172
176
  variant: "filled",
@@ -174,40 +178,40 @@ const ct = ({
174
178
  fullWidth: !0,
175
179
  children: [
176
180
  /* @__PURE__ */ e(
177
- q,
181
+ Y,
178
182
  {
179
- value: M,
180
- onChange: We,
183
+ value: T,
184
+ onChange: Le,
181
185
  type: "text",
182
- placeholder: `${Y > 0 ? v + Y + " minimum value" : ""}`,
186
+ placeholder: `${q > 0 ? k + q + " minimum value" : ""}`,
183
187
  error: j,
184
188
  disableUnderline: !0,
185
189
  required: !0,
186
190
  fullWidth: !0
187
191
  }
188
192
  ),
189
- /* @__PURE__ */ e(he, { className: l["amount-symbol"], children: " " })
193
+ /* @__PURE__ */ e(ye, { className: l["amount-symbol"], children: de > 0 ? "$" + (de * 1).toFixed(2) : /* @__PURE__ */ e(_, { children: " " }) })
190
194
  ]
191
195
  }
192
196
  ) }),
193
- /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: re ? /* @__PURE__ */ e(C, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ n(
197
+ /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: ne ? /* @__PURE__ */ e(S, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ r(
194
198
  A,
195
199
  {
196
200
  variant: "filled",
197
201
  className: `text-left ${l["crypto-picker"]}`,
198
202
  fullWidth: !0,
199
203
  children: [
200
- (a == null ? void 0 : a.network) && /* @__PURE__ */ e(
201
- xe,
204
+ (i == null ? void 0 : i.network) && /* @__PURE__ */ e(
205
+ be,
202
206
  {
203
- className: `${l["network-label"]} ${l[Je(a == null ? void 0 : a.network.name)]}`,
204
- children: a == null ? void 0 : a.network.name
207
+ className: `${l["network-label"]} ${l[Ze(i == null ? void 0 : i.network.name)]}`,
208
+ children: i == null ? void 0 : i.network.name
205
209
  }
206
210
  ),
207
- /* @__PURE__ */ n(
211
+ /* @__PURE__ */ r(
208
212
  Q,
209
213
  {
210
- input: /* @__PURE__ */ e(q, { disableUnderline: !0 }),
214
+ input: /* @__PURE__ */ e(Y, { disableUnderline: !0 }),
211
215
  sx: {
212
216
  borderTopLeftRadius: 0,
213
217
  "&::before": {
@@ -229,9 +233,9 @@ const ct = ({
229
233
  },
230
234
  className: "buy-select-dd",
231
235
  variant: "filled",
232
- value: a.symbol,
236
+ value: i.symbol,
233
237
  displayEmpty: !0,
234
- onChange: (t) => de(t.target.value),
238
+ onChange: (t) => ue(t.target.value),
235
239
  onOpen: (t) => {
236
240
  me(!0), t.preventDefault();
237
241
  },
@@ -239,13 +243,13 @@ const ct = ({
239
243
  open: !1,
240
244
  children: [
241
245
  /* @__PURE__ */ e(G, { value: "", children: "Please select" }),
242
- P.map((t) => /* @__PURE__ */ n(G, { value: t.symbol, children: [
243
- /* @__PURE__ */ e(ye, { className: l["dropdown-list-item"], children: /* @__PURE__ */ e(
246
+ P.map((t) => /* @__PURE__ */ r(G, { value: t.symbol, children: [
247
+ /* @__PURE__ */ e(ge, { className: l["dropdown-list-item"], children: /* @__PURE__ */ e(
244
248
  "img",
245
249
  {
246
250
  src: t.icon_uri,
247
- onError: ({ currentTarget: i }) => {
248
- i.onerror = null, i.src = fe;
251
+ onError: ({ currentTarget: a }) => {
252
+ a.onerror = null, a.src = xe;
249
253
  },
250
254
  alt: "tokenImg",
251
255
  width: "40",
@@ -263,29 +267,29 @@ const ct = ({
263
267
  ce && /* @__PURE__ */ e(s, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: ce }) })
264
268
  ] }),
265
269
  /* @__PURE__ */ e(o, { mt: 4, container: !0, children: /* @__PURE__ */ e(o, { size: { xs: 4 }, children: /* @__PURE__ */ e(s, { className: l.label, variant: "caption", component: "p", children: "You Receive" }) }) }),
266
- /* @__PURE__ */ n(o, { mt: 0.5, container: !0, children: [
267
- /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ n(
270
+ /* @__PURE__ */ r(o, { mt: 0.5, container: !0, children: [
271
+ /* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ r(
268
272
  A,
269
273
  {
270
274
  className: `${l.amount} ${l["fiat-field"]}`,
271
275
  fullWidth: !0,
272
276
  children: [
273
277
  /* @__PURE__ */ e(
274
- q,
278
+ Y,
275
279
  {
276
280
  disableUnderline: !0,
277
- value: N && parseFloat((+N * 1).toFixed(5)),
281
+ value: C && parseFloat((+C * 1).toFixed(5)),
278
282
  type: "text",
279
283
  readOnly: !0,
280
284
  fullWidth: !0
281
285
  }
282
286
  ),
283
- /* @__PURE__ */ e(he, { className: l["amount-symbol"], children: +((ue = h == null ? void 0 : h.output_token) == null ? void 0 : ue.fiat_amount) * 1 > 0 ? v + (+((pe = h == null ? void 0 : h.output_token) == null ? void 0 : pe.fiat_amount) * 1).toFixed(2) : /* @__PURE__ */ e(k, { children: " " }) })
287
+ /* @__PURE__ */ e(ye, { className: l["amount-symbol"], children: +((fe = m == null ? void 0 : m.output_token) == null ? void 0 : fe.fiat_amount) * 1 > 0 ? k + (+((he = m == null ? void 0 : m.output_token) == null ? void 0 : he.fiat_amount) * 1).toFixed(2) : /* @__PURE__ */ e(_, { children: " " }) })
284
288
  ]
285
289
  }
286
290
  ) }),
287
- /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: ke ? /* @__PURE__ */ e(
288
- C,
291
+ /* @__PURE__ */ e(o, { size: { xs: 6 }, className: "content-center", children: Fe ? /* @__PURE__ */ e(
292
+ S,
289
293
  {
290
294
  sx: { ml: 1 },
291
295
  size: 30
@@ -299,7 +303,7 @@ const ct = ({
299
303
  children: /* @__PURE__ */ e(
300
304
  Q,
301
305
  {
302
- input: /* @__PURE__ */ e(q, { disableUnderline: !0 }),
306
+ input: /* @__PURE__ */ e(Y, { disableUnderline: !0 }),
303
307
  sx: {
304
308
  borderTopLeftRadius: 0,
305
309
  "&::before": {
@@ -322,15 +326,15 @@ const ct = ({
322
326
  value: E,
323
327
  variant: "filled",
324
328
  displayEmpty: !0,
325
- onChange: (t) => Fe(t.target.value),
329
+ onChange: (t) => Ie(t.target.value),
326
330
  error: j,
327
- children: Ee.map((t) => /* @__PURE__ */ n(G, { value: t.id, children: [
328
- /* @__PURE__ */ e(ye, { className: l["dropdown-list-item"], children: /* @__PURE__ */ e(
331
+ children: Te.map((t) => /* @__PURE__ */ r(G, { value: t.id, children: [
332
+ /* @__PURE__ */ e(ge, { className: l["dropdown-list-item"], children: /* @__PURE__ */ e(
329
333
  "img",
330
334
  {
331
335
  src: t.icon_uri,
332
- onError: ({ currentTarget: i }) => {
333
- i.onerror = null, i.src = fe;
336
+ onError: ({ currentTarget: a }) => {
337
+ a.onerror = null, a.src = xe;
334
338
  },
335
339
  alt: "tokenImg",
336
340
  width: "40",
@@ -344,18 +348,18 @@ const ct = ({
344
348
  }
345
349
  ) })
346
350
  ] }),
347
- /* @__PURE__ */ e(I, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ n(o, { container: !0, children: [
348
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ n(
349
- ge,
351
+ /* @__PURE__ */ e(I, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ r(o, { container: !0, children: [
352
+ /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ r(
353
+ _e,
350
354
  {
351
355
  sx: { padding: "0" },
352
- onClick: () => Te((t) => !t),
356
+ onClick: () => Re((t) => !t),
353
357
  disableFocusRipple: !0,
354
358
  disableRipple: !0,
355
359
  children: [
356
360
  /* @__PURE__ */ e(s, { variant: "caption", fontWeight: 500, children: "Fee Calculation" }),
357
361
  /* @__PURE__ */ e(
358
- $e,
362
+ qe,
359
363
  {
360
364
  sx: {
361
365
  transform: `rotate(${se ? "90" : "0"}deg)`,
@@ -366,17 +370,17 @@ const ct = ({
366
370
  ]
367
371
  }
368
372
  ) }),
369
- se && /* @__PURE__ */ n(k, { children: [
373
+ se && /* @__PURE__ */ r(_, { children: [
370
374
  /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Everest Fee" }) }),
371
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
372
- v,
373
- U ? /* @__PURE__ */ e(C, { size: 30, color: "primary" }) : ne.toFixed(2)
375
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
376
+ k,
377
+ U ? /* @__PURE__ */ e(S, { size: 30, color: "primary" }) : re.toFixed(2)
374
378
  ] }) }),
375
379
  /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Network Fee" }) }),
376
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
377
- v,
380
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
381
+ k,
378
382
  U ? /* @__PURE__ */ e(
379
- C,
383
+ S,
380
384
  {
381
385
  sx: { ml: 1 },
382
386
  size: 15,
@@ -386,22 +390,22 @@ const ct = ({
386
390
  ] }) })
387
391
  ] }),
388
392
  /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
389
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
390
- v,
391
- U ? /* @__PURE__ */ e(C, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(we).toFixed(2)
393
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
394
+ k,
395
+ U ? /* @__PURE__ */ e(S, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(Ee).toFixed(2)
392
396
  ] }) }),
393
- a && /* @__PURE__ */ n(k, { children: [
394
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
397
+ i && /* @__PURE__ */ r(_, { children: [
398
+ /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
395
399
  "1 ",
396
- a.symbol,
400
+ i.symbol,
397
401
  " ",
398
402
  /* @__PURE__ */ e(
399
- Ve,
403
+ Qe,
400
404
  {
401
- title: Ye,
405
+ title: Ge,
402
406
  placement: "right",
403
- children: /* @__PURE__ */ e(ge, { className: "info-fee-icon", children: /* @__PURE__ */ e(
404
- Ue,
407
+ children: /* @__PURE__ */ e(_e, { className: "info-fee-icon", children: /* @__PURE__ */ e(
408
+ Ye,
405
409
  {
406
410
  sx: {
407
411
  fontSize: "14px"
@@ -411,41 +415,41 @@ const ct = ({
411
415
  }
412
416
  )
413
417
  ] }) }),
414
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
415
- v,
418
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
419
+ k,
416
420
  U ? /* @__PURE__ */ e(
417
- C,
421
+ S,
418
422
  {
419
423
  sx: { ml: 1 },
420
424
  size: 15,
421
425
  color: "primary"
422
426
  }
423
- ) : Number(Se).toFixed(2)
427
+ ) : Number(we).toFixed(2)
424
428
  ] }) })
425
429
  ] })
426
430
  ] }) }),
427
- /* @__PURE__ */ e(I, { sx: { alignItems: "left", width: "100%" }, children: Ce ? /* @__PURE__ */ e(I, { mt: 2, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(C, {}) }) : /* @__PURE__ */ e(k, { children: /* @__PURE__ */ n(A, { variant: "filled", fullWidth: !0, children: [
428
- !r && /* @__PURE__ */ e(xe, { children: "Select wallet address" }),
431
+ /* @__PURE__ */ e(I, { sx: { alignItems: "left", width: "100%" }, children: Se ? /* @__PURE__ */ e(I, { mt: 2, sx: { textAlign: "center" }, children: /* @__PURE__ */ e(S, {}) }) : /* @__PURE__ */ e(_, { children: /* @__PURE__ */ r(A, { variant: "filled", fullWidth: !0, children: [
432
+ !n && /* @__PURE__ */ e(be, { children: "Select wallet address" }),
429
433
  /* @__PURE__ */ e(
430
434
  Q,
431
435
  {
432
- value: r,
433
- onChange: (t) => g && g(t.target.value),
434
- children: H.map((t, i) => /* @__PURE__ */ e(G, { value: t.address, children: t.name + "(" + t.address + ")" }, i))
436
+ value: n,
437
+ onChange: (t) => b && b(t.target.value),
438
+ children: D.map((t, a) => /* @__PURE__ */ e(G, { value: t.address, children: t.name + "(" + t.address + ")" }, a))
435
439
  }
436
440
  )
437
441
  ] }) }) }),
438
- /* @__PURE__ */ n(I, { mt: 4, children: [
442
+ /* @__PURE__ */ r(I, { mt: 4, children: [
439
443
  /* @__PURE__ */ e(
440
444
  K,
441
445
  {
442
- onClick: Oe,
443
- disabled: j || !N,
446
+ onClick: Be,
447
+ disabled: j || !C,
444
448
  fullWidth: !0,
445
449
  children: /* @__PURE__ */ e("strong", { children: "Next" })
446
450
  }
447
451
  ),
448
- D && /* @__PURE__ */ n(k, { children: [
452
+ H && /* @__PURE__ */ r(_, { children: [
449
453
  /* @__PURE__ */ e(
450
454
  K,
451
455
  {
@@ -453,7 +457,7 @@ const ct = ({
453
457
  sx: { mt: 3 },
454
458
  fullWidth: !0,
455
459
  variant: "contained",
456
- onClick: () => F && F("/withdraw"),
460
+ onClick: () => w && w("/withdraw"),
457
461
  children: /* @__PURE__ */ e("strong", { children: "Withdraw" })
458
462
  }
459
463
  ),
@@ -463,80 +467,79 @@ const ct = ({
463
467
  className: l["connect-wallet-signup"],
464
468
  color: "primary",
465
469
  variant: "caption",
466
- onClick: Le,
470
+ onClick: Pe,
467
471
  children: /* @__PURE__ */ e("strong", { children: "Sell & Withdraw Info" })
468
472
  }
469
473
  )
470
474
  ] })
471
475
  ] }),
472
476
  /* @__PURE__ */ e(
473
- st,
477
+ ct,
474
478
  {
475
- open: Re,
479
+ open: We,
476
480
  setModal: me,
477
- loader: re,
481
+ loader: ne,
478
482
  tokenList: P,
479
- tokenSelect: de
483
+ tokenSelect: ue
480
484
  }
481
485
  )
482
486
  ] });
483
- }, mt = ({
484
- setScreen: _,
485
- partnerKey: p,
487
+ }, ut = ({
488
+ setScreen: v,
489
+ partnerKey: f,
486
490
  orderData: c,
487
- dispatch: m,
488
- walletAddress: f,
489
- navigate: S
491
+ dispatch: d,
492
+ walletAddress: h,
493
+ navigate: F
490
494
  }) => {
491
- const { openDialog: w, ConfirmDialog: z } = Ne(), r = c.estimate, g = c.create.order_id, F = c.loader, b = r.fiat_amount, O = _e(r.fiat_currency), [y, D] = u(!1);
495
+ const { openDialog: N, ConfirmDialog: R } = Ce(), n = c.estimate, b = c.create.order_id, w = c.loader, g = n.fiat_amount, O = Ne(n.fiat_currency), [y, H] = p(!1);
492
496
  x(() => {
493
- g && y && w({
494
- icon: Ge,
497
+ b && y && N({
498
+ icon: He,
495
499
  title: "Sell Success",
496
500
  message: "Your transaction was successful for more details on the transaction please track your order.",
497
501
  cancelButtonText: "Sell again",
498
502
  onCancel: () => {
499
- m(ee()), _(te);
503
+ d(ee()), v(te);
500
504
  },
501
505
  confirmButtonText: "Track Order",
502
506
  onConfirm: () => {
503
- S && S("/history"), m(ee());
507
+ F && F("/history"), d(ee());
504
508
  },
505
509
  height: "490px"
506
510
  });
507
- }, [g]), x(() => {
511
+ }, [b]), x(() => {
508
512
  L();
509
513
  }, []);
510
514
  const L = () => {
511
- m(
512
- be({
513
- // ...sellData,
514
- apiKey: p,
515
- transaction_type: r.transaction_type,
516
- coin_amount: r.fiat_amount,
517
- exchange: r.exchange,
518
- payment_type: r.payment_type,
519
- fiat_ccy: r.fiat_currency,
520
- crypto_ccy: r.crypto_currency,
521
- network: r.network,
522
- payment_provider: r.payment_provider
515
+ d(
516
+ ve({
517
+ apiKey: f,
518
+ transaction_type: n.transaction_type,
519
+ coin_amount: n.crypto_amount,
520
+ exchange: n.exchange,
521
+ payment_type: n.payment_type,
522
+ fiat_ccy: n.fiat_currency,
523
+ crypto_ccy: n.crypto_currency,
524
+ network: n.network,
525
+ payment_provider: n.payment_provider
523
526
  })
524
527
  );
525
- }, H = () => {
526
- m(
527
- je({
528
- apiKey: p,
529
- quoteId: r.quote_id,
530
- walletAddress: f
528
+ }, D = () => {
529
+ d(
530
+ Ve({
531
+ apiKey: f,
532
+ quoteId: n.quote_id,
533
+ walletAddress: h
531
534
  })
532
- ), D(!0);
535
+ ), H(!0);
533
536
  };
534
- return /* @__PURE__ */ n(k, { children: [
535
- /* @__PURE__ */ e(z, {}),
537
+ return /* @__PURE__ */ r(_, { children: [
538
+ /* @__PURE__ */ e(R, {}),
536
539
  /* @__PURE__ */ e(
537
- Qe,
540
+ et,
538
541
  {
539
- onClickHandler: () => _(te),
542
+ onClickHandler: () => v(te),
540
543
  backBtnText: "Confirm Your Order"
541
544
  }
542
545
  ),
@@ -547,131 +550,131 @@ const ct = ({
547
550
  mt: 2,
548
551
  className: l["confirm-payment"],
549
552
  sx: { width: "100% !important" },
550
- children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: f }) })
553
+ children: /* @__PURE__ */ e(s, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: h }) })
551
554
  }
552
555
  ),
553
556
  /* @__PURE__ */ e(s, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
554
- /* @__PURE__ */ e(I, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ n(o, { container: !0, children: [
555
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
556
- r.crypto_currency.toUpperCase(),
557
+ /* @__PURE__ */ e(I, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ r(o, { container: !0, children: [
558
+ /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
559
+ n.crypto_currency.toUpperCase(),
557
560
  " @",
558
561
  " ",
559
- Number(r.conversion_price).toFixed(2),
562
+ Number(n.conversion_price).toFixed(2),
560
563
  " ",
561
- r.fiat_currency
564
+ n.fiat_currency
562
565
  ] }) }),
563
566
  /* @__PURE__ */ e(o, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
564
567
  "span",
565
568
  {
566
569
  className: l["confirm-transaction-network"],
567
570
  style: {
568
- backgroundColor: r.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
571
+ backgroundColor: n.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
569
572
  },
570
- children: r.network
573
+ children: n.network
571
574
  }
572
575
  ) }),
573
- /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
574
- Number(r.crypto_out_amount).toFixed(5),
576
+ /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
577
+ Number(n.crypto_out_amount).toFixed(5),
575
578
  " ",
576
- r.crypto_currency.toUpperCase()
579
+ n.crypto_currency.toUpperCase()
577
580
  ] }) }),
578
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
579
- (Number(b) - Number(r.total_fee)).toFixed(2),
581
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
582
+ (Number(g) - Number(n.total_fee)).toFixed(2),
580
583
  " ",
581
- r.fiat_currency
584
+ n.fiat_currency
582
585
  ] }) }),
583
586
  /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: "Total Fees" }) }),
584
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ n(s, { variant: "caption", children: [
585
- Number(r.total_fee).toFixed(2),
587
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ r(s, { variant: "caption", children: [
588
+ Number(n.total_fee).toFixed(2),
586
589
  " ",
587
- r.fiat_currency
590
+ n.fiat_currency
588
591
  ] }) }),
589
592
  /* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
590
- /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ n("strong", { children: [
593
+ /* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(s, { variant: "caption", children: /* @__PURE__ */ r("strong", { children: [
591
594
  O,
592
- Number(b).toFixed(2),
595
+ Number(g).toFixed(2),
593
596
  " ",
594
- r.fiat_currency
597
+ n.fiat_currency
595
598
  ] }) }) })
596
599
  ] }) }),
597
600
  /* @__PURE__ */ e(I, { mt: 4, children: /* @__PURE__ */ e(
598
601
  K,
599
602
  {
600
- onClick: H,
601
- disabled: F,
603
+ onClick: D,
604
+ disabled: w,
602
605
  fullWidth: !0,
603
- children: /* @__PURE__ */ e("strong", { children: F ? /* @__PURE__ */ n(k, { children: [
604
- /* @__PURE__ */ e(C, { size: 15, color: "inherit" }),
606
+ children: /* @__PURE__ */ e("strong", { children: w ? /* @__PURE__ */ r(_, { children: [
607
+ /* @__PURE__ */ e(S, { size: 15, color: "inherit" }),
605
608
  " Processing..."
606
609
  ] }) : "Sell" })
607
610
  }
608
611
  ) })
609
612
  ] });
610
- }, te = "FORM_SCREEN", ve = "CONFIRM_SCREEN", dt = "MINIMAL_KYC_SCREEN", ut = ({ partnerKey: _, navigate: p }) => {
611
- const c = Ze(), m = W((y) => y.order), f = m.error, S = W((y) => y.fiatAssets), w = W(
613
+ }, te = "FORM_SCREEN", ke = "CONFIRM_SCREEN", pt = "MINIMAL_KYC_SCREEN", ft = ({ partnerKey: v, navigate: f }) => {
614
+ const c = tt(), d = W((y) => y.order), h = d.error, F = W((y) => y.fiatAssets), N = W(
612
615
  (y) => y.cryptoAssets
613
- ), [z, r] = u(te), [g, F] = u(""), { showAlertMessage: b } = nt();
616
+ ), [R, n] = p(te), [b, w] = p(""), { showAlertMessage: g } = it();
614
617
  return x(() => {
615
- f && b({ message: f });
616
- }, [f]), x(() => {
617
- m.initMinimalKyc && (b({ message: f, type: "info" }), r(dt));
618
- }, [m.initMinimalKyc]), x(() => (c(et()), c(Xe(Z)), c(rt()), () => {
618
+ h && g({ message: h });
619
+ }, [h]), x(() => {
620
+ d.initMinimalKyc && (g({ message: h, type: "info" }), n(pt));
621
+ }, [d.initMinimalKyc]), x(() => (c(nt()), c(Je(Z)), c(ot()), () => {
619
622
  c(ee());
620
- }), []), /* @__PURE__ */ e(ot, { addPadding: !0, children: {
623
+ }), []), /* @__PURE__ */ e(at, { addPadding: !0, children: {
621
624
  FORM_SCREEN: /* @__PURE__ */ e(
622
- ct,
625
+ dt,
623
626
  {
624
- showAlertMessage: b,
625
- setScreen: r,
626
- fiatAssets: S,
627
- cryptoAssets: w,
628
- orderData: m,
627
+ showAlertMessage: g,
628
+ setScreen: n,
629
+ fiatAssets: F,
630
+ cryptoAssets: N,
631
+ orderData: d,
629
632
  dispatch: c,
630
633
  getCryptoAssets: (y) => {
631
634
  c(
632
- tt({
633
- type: Ke,
635
+ rt({
636
+ type: De,
634
637
  id: y,
635
- walletAddress: g,
636
- partnerKey: _
638
+ walletAddress: b,
639
+ partnerKey: v
637
640
  })
638
641
  );
639
642
  },
640
- partnerKey: _,
641
- walletAddress: g,
642
- setWalletAddress: F,
643
- navigate: p
643
+ partnerKey: v,
644
+ walletAddress: b,
645
+ setWalletAddress: w,
646
+ navigate: f
644
647
  }
645
648
  ),
646
649
  CONFIRM_SCREEN: /* @__PURE__ */ e(
647
- mt,
650
+ ut,
648
651
  {
649
- partnerKey: _,
650
- setScreen: r,
651
- showAlertMessage: b,
652
- orderData: m,
652
+ partnerKey: v,
653
+ setScreen: n,
654
+ showAlertMessage: g,
655
+ orderData: d,
653
656
  dispatch: c,
654
- walletAddress: g,
655
- navigate: p
657
+ walletAddress: b,
658
+ navigate: f
656
659
  }
657
660
  ),
658
661
  MINIMAL_KYC_SCREEN: /* @__PURE__ */ e(
659
- it,
662
+ st,
660
663
  {
661
- inputComponent: at,
664
+ inputComponent: lt,
662
665
  buttonComponent: K,
663
666
  onComplete: () => {
664
- r(ve);
667
+ n(ke);
665
668
  }
666
669
  }
667
670
  )
668
- }[z] });
669
- }, Qt = Pe(ut);
671
+ }[R] });
672
+ }, Qt = Ue(ft);
670
673
  export {
671
- ve as C,
674
+ ke as C,
672
675
  te as F,
673
- dt as M,
674
- ct as S,
675
- mt as a,
676
+ pt as M,
677
+ dt as S,
678
+ ut as a,
676
679
  Qt as i
677
680
  };
package/dist/main.js CHANGED
@@ -10,7 +10,7 @@ import { default as k } from "./components/Wallet/Stake/index.js";
10
10
  import { default as g } from "./components/Wallet/MoveToEthereumOrEverChain/index.js";
11
11
  import { default as w } from "./components/Wallet/SwapAndUniSwap/index.js";
12
12
  import { i as P } from "./index-98VYd3cT.js";
13
- import { i as v } from "./index-CTglGXWu.js";
13
+ import { i as v } from "./index-DHrWPN34.js";
14
14
  import { i as D } from "./index-CFWL7CoB.js";
15
15
  import { default as K } from "./components/Wallet/Swap/index.js";
16
16
  import { default as A } from "./components/Wallet/EnterpriseKyc/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everest-npm-features",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Everest frontend features library.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -32,7 +32,7 @@
32
32
  "@mui/icons-material": "^6.0.2",
33
33
  "@mui/material": "^6.0.2",
34
34
  "@walletconnect/ethereum-provider": "^2.17.1",
35
- "everest-npm-api": "^0.0.15",
35
+ "everest-npm-api": "^0.0.16",
36
36
  "frames-react": "^1.2.2",
37
37
  "moment": "^2.30.1",
38
38
  "mui-one-time-password-input": "^5.0.0",