everest-npm-features 0.0.57 → 0.0.58

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 (98) hide show
  1. package/dist/{PlayArrow-jzz8Y3XD.js → PlayArrow-BRz9FV4L.js} +1 -1
  2. package/dist/{auth-jjVjqywi.js → auth-CD7qxhDF.js} +1 -1
  3. package/dist/{bank-BM66KfAv.js → bank-C2LtDonX.js} +1 -1
  4. package/dist/components/RocketRamp/MinimalKyc/form.js +2 -2
  5. package/dist/components/RocketRamp/Player/Buy/cardPayment.js +3 -3
  6. package/dist/components/RocketRamp/Player/Buy/confirmTransaction.js +3 -3
  7. package/dist/components/RocketRamp/Player/Buy/form.js +4 -4
  8. package/dist/components/RocketRamp/Player/Buy/index.js +5 -5
  9. package/dist/components/RocketRamp/Player/Dashboard/index.js +2 -2
  10. package/dist/components/RocketRamp/Player/Sell/confirmTransaction.js +3 -3
  11. package/dist/components/RocketRamp/Player/Sell/form.js +4 -4
  12. package/dist/components/RocketRamp/Player/Sell/index.js +5 -5
  13. package/dist/components/RocketRamp/Player/SignIn/index.js +2 -2
  14. package/dist/components/RocketRamp/Player/SignIn/loginForm.js +2 -2
  15. package/dist/components/RocketRamp/Player/SignIn/otpForm.js +2 -2
  16. package/dist/components/RocketRamp/Player/SignUp/email.js +2 -2
  17. package/dist/components/RocketRamp/Player/SignUp/index.js +2 -2
  18. package/dist/components/RocketRamp/Player/SignUp/personalInfo.js +2 -2
  19. package/dist/components/RocketRamp/ResetPassword/index.js +2 -2
  20. package/dist/components/RocketRamp/Store/SignUp/index.js +2 -2
  21. package/dist/components/RocketRamp/Store/SignUp/personalInfo.js +2 -2
  22. package/dist/components/RocketRamp/Store/SignUp/storeInfo.js +2 -2
  23. package/dist/components/RocketRamp/Transactions/index.js +2 -2
  24. package/dist/components/Shared/FullKyc/edd.js +2 -2
  25. package/dist/components/Shared/FullKyc/index.js +3 -3
  26. package/dist/components/Shared/FullKyc/pep.js +1 -1
  27. package/dist/components/Shared/FullKyc/personalDetails.js +2 -2
  28. package/dist/components/Shared/FullKyc/userInfo.js +3 -3
  29. package/dist/components/Shared/MinimalKyc/index.js +2 -2
  30. package/dist/components/Wallet/Account/createIban.js +1 -1
  31. package/dist/components/Wallet/Account/eWallet.d.ts +4 -2
  32. package/dist/components/Wallet/Account/eWallet.js +30 -28
  33. package/dist/components/Wallet/Account/iban.d.ts +4 -2
  34. package/dist/components/Wallet/Account/iban.js +30 -28
  35. package/dist/components/Wallet/Account/ibanItem.d.ts +4 -2
  36. package/dist/components/Wallet/Account/ibanItem.js +179 -175
  37. package/dist/components/Wallet/Account/index.js +190 -177
  38. package/dist/components/Wallet/Account/sendIban.js +2 -2
  39. package/dist/components/Wallet/Buy/confirmTransaction.js +4 -4
  40. package/dist/components/Wallet/Buy/form.js +4 -4
  41. package/dist/components/Wallet/Buy/index.js +6 -6
  42. package/dist/components/Wallet/Deposit/index.js +1 -1
  43. package/dist/components/Wallet/EnterpriseKyc/edd.js +1 -1
  44. package/dist/components/Wallet/EnterpriseKyc/index.js +3 -3
  45. package/dist/components/Wallet/EnterpriseKyc/orgDetails.js +2 -2
  46. package/dist/components/Wallet/EnterpriseKyc/orgInfo.js +1 -1
  47. package/dist/components/Wallet/EnterpriseKyc/verify.js +1 -1
  48. package/dist/components/Wallet/History/index.js +2 -2
  49. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.d.ts +7 -13
  50. package/dist/components/Wallet/MoveToEthereumOrEverChain/index.js +215 -231
  51. package/dist/components/Wallet/Portfolio/index.js +5 -5
  52. package/dist/components/Wallet/Portfolio/tokenRow.js +1 -1
  53. package/dist/components/Wallet/Profile/documents.js +1 -1
  54. package/dist/components/Wallet/Profile/index.js +1 -1
  55. package/dist/components/Wallet/Profile/storage.js +1 -1
  56. package/dist/components/Wallet/Receive/index.js +2 -2
  57. package/dist/components/Wallet/Sell/confirmTransaction.js +3 -3
  58. package/dist/components/Wallet/Sell/form.js +4 -4
  59. package/dist/components/Wallet/Sell/index.js +6 -6
  60. package/dist/components/Wallet/Send/index.js +3 -3
  61. package/dist/components/Wallet/Shared/Auth/otpForm.js +2 -2
  62. package/dist/components/Wallet/Shared/BankSelect/index.js +3 -3
  63. package/dist/components/Wallet/Shared/CardCorp/index.js +1 -1
  64. package/dist/components/Wallet/Shared/addBank.js +2 -2
  65. package/dist/components/Wallet/Shared/connectPlaidBank.js +2 -2
  66. package/dist/components/Wallet/Shared/manualSend.js +3 -3
  67. package/dist/components/Wallet/SignIn/index.js +2 -2
  68. package/dist/components/Wallet/SignUp/index.js +2 -2
  69. package/dist/components/Wallet/Stake/gems/index.d.ts +26 -2
  70. package/dist/components/Wallet/Stake/gems/index.js +74 -85
  71. package/dist/components/Wallet/Stake/id/index.d.ts +27 -1
  72. package/dist/components/Wallet/Stake/id/index.js +68 -78
  73. package/dist/components/Wallet/Stake/index.d.ts +4 -1
  74. package/dist/components/Wallet/Stake/index.js +232 -201
  75. package/dist/components/Wallet/Swap/form.js +5 -5
  76. package/dist/components/Wallet/Swap/index.js +5 -5
  77. package/dist/components/Wallet/Withdraw/bankSelect.js +4 -4
  78. package/dist/components/Wallet/Withdraw/confirmTransaction.js +3 -3
  79. package/dist/components/Wallet/Withdraw/form.js +4 -4
  80. package/dist/components/Wallet/Withdraw/index.js +5 -5
  81. package/dist/{constants-Dtk3Gd0Y.js → constants-Styrbvke.js} +4 -4
  82. package/dist/{cryptoAssets-DT2afvDJ.js → cryptoAssets-CFtzXGbk.js} +1 -1
  83. package/dist/{index-BEFNlxwM.js → index-AVcxYfIV.js} +4 -4
  84. package/dist/{index-JdlBukUO.js → index-CKjKCXeQ.js} +4 -4
  85. package/dist/{index-BGJ8RVKA.js → index-DAla2tRU.js} +5 -5
  86. package/dist/{index-BUnkeQv6.js → index-DM6mBQ7L.js} +6 -6
  87. package/dist/{index-B4pP4oLo.js → index-Da-BlrMH.js} +6 -6
  88. package/dist/{index-CyPm8GTl.js → index-Du_jGnyO.js} +4 -4
  89. package/dist/{index-BU6Lajc_.js → index-g4Gy1BHB.js} +2 -2
  90. package/dist/{kyc-BOm2LCSg.js → kyc-Ee4qAZby.js} +1 -1
  91. package/dist/main.js +7 -7
  92. package/dist/{order-DuPcaU0K.js → order-uVUTqaQ2.js} +1 -1
  93. package/dist/{stake-WaB8Q4v-.js → stake-Dgx86wzO.js} +1 -1
  94. package/dist/{tokenRow-B-tustzZ.js → tokenRow-C-iMHhPj.js} +14 -12
  95. package/dist/util/constants.d.ts +1 -0
  96. package/dist/util/constants.js +54 -53
  97. package/dist/{wallet-BxwOFeSW.js → wallet-BkdExH6h.js} +10 -10
  98. package/package.json +2 -2
@@ -1,18 +1,18 @@
1
1
  import { jsx as r, jsxs as o, Fragment as l } from "react/jsx-runtime";
2
- import { useRef as S, useState as g, useEffect as B } from "react";
3
- import { I as N } from "../../../Info-BVeUSPyk.js";
4
- import { DIALOG_SUCCESS_ICON as T, FEATURE_VIRTUAL_IBAN as p } from "../../../util/constants.js";
5
- import { M as w } from "../../../tooltip-3UvETWtS.js";
6
- import b from "../Shared/noData.js";
7
- import D from "./createIban.js";
8
- import { AuthInnerContainer as E } from "../Shared/Container/index.js";
9
- import P from "./ibanItem.js";
2
+ import { useRef as g, useState as B, useEffect as N } from "react";
3
+ import { I as T } from "../../../Info-BVeUSPyk.js";
4
+ import { DIALOG_SUCCESS_ICON as w, FEATURE_VIRTUAL_IBAN as p } from "../../../util/constants.js";
5
+ import { M as b } from "../../../tooltip-3UvETWtS.js";
6
+ import D from "../Shared/noData.js";
7
+ import E from "./createIban.js";
8
+ import { AuthInnerContainer as P } from "../Shared/Container/index.js";
9
+ import v from "./ibanItem.js";
10
10
  import { B as t } from "../../../Box-B0YSYLco.js";
11
11
  import { G as n } from "../../../Grid-CFe3amXO.js";
12
- import { T as v } from "../../../Typography-pAaje37G.js";
13
- import { I as z } from "../../../IconButton-DHm-hucF.js";
14
- import { C as L } from "../../../CircularProgress-xZA3lvba.js";
15
- const J = ({
12
+ import { T as z } from "../../../Typography-pAaje37G.js";
13
+ import { I as L } from "../../../IconButton-DHm-hucF.js";
14
+ import { C as R } from "../../../CircularProgress-xZA3lvba.js";
15
+ const Q = ({
16
16
  dispatch: u,
17
17
  openDialog: a,
18
18
  appKey: f,
@@ -21,45 +21,46 @@ const J = ({
21
21
  iban: e,
22
22
  navigate: i,
23
23
  AccountItem: I,
24
- createIbanRequest: y
24
+ createIbanRequest: y,
25
+ tokenData: x
25
26
  }) => {
26
- const c = e.data, x = e.loader, C = S(""), [R, A] = g("");
27
- return B(() => {
27
+ const c = e.data, C = e.loader, A = g(""), [U, S] = B("");
28
+ return N(() => {
28
29
  new URLSearchParams(window.location.search).get("paymentStatus") === "success" && a({
29
30
  title: "Payment Success",
30
31
  message: "We have received your payment and will generate your Virtual IBAN after the payment has processed",
31
- icon: T,
32
+ icon: w,
32
33
  width: "575px",
33
34
  confirmButtonText: "Continue"
34
35
  });
35
- }, []), /* @__PURE__ */ r(E, { children: /* @__PURE__ */ o(t, { p: 3, children: [
36
+ }, []), /* @__PURE__ */ r(P, { children: /* @__PURE__ */ o(t, { p: 3, children: [
36
37
  /* @__PURE__ */ o(n, { spacing: 2, container: !0, alignItems: "center", children: [
37
38
  /* @__PURE__ */ o(n, { size: 8, children: [
38
- /* @__PURE__ */ r(v, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ r("strong", { children: "Everest Accounts (Virtual IBAN)" }) }),
39
+ /* @__PURE__ */ r(z, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ r("strong", { children: "Everest Accounts (Virtual IBAN)" }) }),
39
40
  /* @__PURE__ */ r(
40
- w,
41
+ b,
41
42
  {
42
43
  title: /* @__PURE__ */ r(t, { sx: { whiteSpace: "pre-line" }, children: "Create a Virtual IBAN of selected currency. This requires KYC" }),
43
44
  placement: "bottom",
44
- children: /* @__PURE__ */ r(z, { className: "info-fee-icon", children: /* @__PURE__ */ r(N, { sx: { fontSize: "26px", color: "#D9D9D9" } }) })
45
+ children: /* @__PURE__ */ r(L, { className: "info-fee-icon", children: /* @__PURE__ */ r(T, { sx: { fontSize: "26px", color: "#D9D9D9" } }) })
45
46
  }
46
47
  )
47
48
  ] }),
48
49
  /* @__PURE__ */ r(n, { size: 4, children: /* @__PURE__ */ r(t, { sx: { textAlign: "right" }, children: /* @__PURE__ */ r(
49
- D,
50
+ E,
50
51
  {
51
52
  openDialog: a,
52
53
  createIbanRequest: y,
53
54
  iban: e,
54
55
  navigate: i,
55
- currency: C,
56
- setIbanCurrency: A,
56
+ currency: A,
57
+ setIbanCurrency: S,
57
58
  from: p
58
59
  }
59
60
  ) }) })
60
61
  ] }),
61
- x ? /* @__PURE__ */ r(t, { mt: 4, className: "flex-center", children: /* @__PURE__ */ r(L, { color: "primary", size: 50 }) }) : /* @__PURE__ */ r(l, { children: c.length > 0 ? /* @__PURE__ */ r(l, { children: c.map((s, m) => /* @__PURE__ */ r(
62
- P,
62
+ C ? /* @__PURE__ */ r(t, { mt: 4, className: "flex-center", children: /* @__PURE__ */ r(R, { color: "primary", size: 50 }) }) : /* @__PURE__ */ r(l, { children: c.length > 0 ? /* @__PURE__ */ r(l, { children: c.map((s, m) => /* @__PURE__ */ r(
63
+ v,
63
64
  {
64
65
  data: s,
65
66
  AccountItem: I,
@@ -69,12 +70,13 @@ const J = ({
69
70
  paymentWidgetSrcUrl: d,
70
71
  iban: e,
71
72
  navigate: i,
72
- from: p
73
+ from: p,
74
+ tokenData: x
73
75
  },
74
76
  m
75
- )) }) : /* @__PURE__ */ r(b, { text: "You currently have no IBAN Accounts" }) })
77
+ )) }) : /* @__PURE__ */ r(D, { text: "You currently have no IBAN Accounts" }) })
76
78
  ] }) });
77
79
  };
78
80
  export {
79
- J as default
81
+ Q as default
80
82
  };
@@ -1,5 +1,5 @@
1
1
  import { Dispatch } from 'react';
2
- import { Bank, BankActionTypes, BankState, Iban, Wallet, OrderActionTypes } from 'everest-npm-api';
2
+ import { Bank, BankActionTypes, BankState, Iban, Wallet, OrderActionTypes, WalletAppState } from 'everest-npm-api';
3
3
  interface IbanItemProps {
4
4
  iban: BankState["iban"];
5
5
  data: Iban;
@@ -8,12 +8,14 @@ interface IbanItemProps {
8
8
  appKeyEur: string;
9
9
  paymentWidgetSrcUrl: string;
10
10
  navigate: (path: string) => void;
11
- AccountItem: ({ data, type, children, }: {
11
+ AccountItem: ({ data, type, children, rightAdornment, }: {
12
12
  data: Wallet | Bank;
13
13
  type: string;
14
14
  children?: React.ReactNode;
15
+ rightAdornment?: React.ReactNode;
15
16
  }) => JSX.Element;
16
17
  from?: string;
18
+ tokenData: WalletAppState["user"]["profile"]["tokens"];
17
19
  }
18
20
  declare const IbanItem: React.FC<IbanItemProps>;
19
21
  export default IbanItem;
@@ -1,20 +1,20 @@
1
- import { jsx as e, Fragment as v, jsxs as o } from "react/jsx-runtime";
2
- import { useState as a, useMemo as B, useEffect as E } from "react";
3
- import "../../../constants-Dtk3Gd0Y.js";
4
- import { v as le } from "../../../order-DuPcaU0K.js";
5
- import z from "../Shared/appButton.js";
6
- import { C as se } from "../../../ContentCopy-coPwrEuz.js";
7
- import { C as O } from "../../../Close-CNwiMz_O.js";
8
- import L from "../../Shared/transition.js";
1
+ import { jsx as e, Fragment as I, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as u, useMemo as f, useEffect as k } from "react";
3
+ import "../../../constants-Styrbvke.js";
4
+ import { v as ye } from "../../../order-uVUTqaQ2.js";
5
+ import U from "../Shared/appButton.js";
6
+ import { C as be } from "../../../ContentCopy-coPwrEuz.js";
7
+ import { C as Y } from "../../../Close-CNwiMz_O.js";
8
+ import q from "../../Shared/transition.js";
9
9
  import "../../../index-DlQqWbXG.js";
10
10
  import "../../../hoc/withThemeProvider.js";
11
- import { u as $ } from "../../../react-redux-C7I9-1M6.js";
12
- import { GBP_ISO3 as ae, FEATURE_EWALLET as ce } from "../../../util/constants.js";
11
+ import { u as J } from "../../../react-redux-C7I9-1M6.js";
12
+ import { GBP_ISO3 as K, FEATURE_EWALLET as ge, EURO_ISO3 as Ce, SYNTHETIC_EUR as ve, SYNTHETIC_GBP as Ie } from "../../../util/constants.js";
13
13
  import "../Shared/Auth/otpForm.js";
14
- import { useSnackBarContext as V } from "../../../context/snackBarContext.js";
14
+ import { useSnackBarContext as ee } from "../../../context/snackBarContext.js";
15
15
  import "../../../util/conversions.js";
16
16
  import "../../../index-CAoLi5Qq.js";
17
- import ue from "../Shared/inputField.js";
17
+ import Te from "../Shared/inputField.js";
18
18
  import "../../../react-webcam-B3cXh1XT.js";
19
19
  import "../../../tooltip-3UvETWtS.js";
20
20
  import "../Shared/pin.js";
@@ -22,180 +22,184 @@ import "../../../moment-h96o7c8I.js";
22
22
  import "../../../index.esm-BsMAMhYW.js";
23
23
  import "../../../web3-u4qDZYpo.js";
24
24
  import "../../../index-ceeCtFuh.js";
25
- import de from "../Shared/CardCorp/index.js";
25
+ import Ne from "../Shared/CardCorp/index.js";
26
26
  import "../../../context/dialogContext.js";
27
- import me from "./sendIban.js";
28
- import { G as p } from "../../../Grid-CFe3amXO.js";
29
- import { T as m } from "../../../Typography-pAaje37G.js";
30
- import { D as j, a as G } from "../../../DialogContent-BMwlOnbW.js";
31
- import { D as H } from "../../../DialogTitle-CfS0bb2K.js";
32
- import { I as S } from "../../../IconButton-DHm-hucF.js";
33
- import { B as D } from "../../../Box-B0YSYLco.js";
34
- import { C as pe } from "../../../CircularProgress-xZA3lvba.js";
27
+ import xe from "./sendIban.js";
28
+ import { G as T } from "../../../Grid-CFe3amXO.js";
29
+ import { D as Q, a as X } from "../../../DialogContent-BMwlOnbW.js";
30
+ import { D as Z } from "../../../DialogTitle-CfS0bb2K.js";
31
+ import { T as a } from "../../../Typography-pAaje37G.js";
32
+ import { I as z } from "../../../IconButton-DHm-hucF.js";
33
+ import { B as M } from "../../../Box-B0YSYLco.js";
34
+ import { C as D } from "../../../CircularProgress-xZA3lvba.js";
35
35
  const i = ({
36
- label: x,
36
+ label: N,
37
37
  value: r,
38
- showCopyBtn: k
38
+ showCopyBtn: x
39
39
  }) => {
40
- const { showAlertMessage: I } = V();
41
- return /* @__PURE__ */ o(v, { children: [
42
- /* @__PURE__ */ e(p, { size: 5, className: "d-flex items-center", children: /* @__PURE__ */ e("strong", { children: x }) }),
43
- /* @__PURE__ */ o(p, { size: 7, className: "fw500 text-left d-flex items-center", children: [
40
+ const { showAlertMessage: B } = ee();
41
+ return /* @__PURE__ */ n(I, { children: [
42
+ /* @__PURE__ */ e(T, { size: 5, className: "d-flex items-center", children: /* @__PURE__ */ e("strong", { children: N }) }),
43
+ /* @__PURE__ */ n(T, { size: 7, className: "fw500 text-left d-flex items-center", children: [
44
44
  r,
45
- k && /* @__PURE__ */ e(S, { onClick: () => {
46
- navigator.clipboard.writeText(r), I({
47
- message: `${x} has been copied successfully.`,
45
+ x && /* @__PURE__ */ e(z, { onClick: () => {
46
+ navigator.clipboard.writeText(r), B({
47
+ message: `${N} has been copied successfully.`,
48
48
  type: "success"
49
49
  });
50
- }, children: /* @__PURE__ */ e(se, { fontSize: "small", color: "primary" }) })
50
+ }, children: /* @__PURE__ */ e(be, { fontSize: "small", color: "primary" }) })
51
51
  ] })
52
52
  ] });
53
- }, Je = ({
54
- AccountItem: x,
53
+ }, ir = ({
54
+ AccountItem: N,
55
55
  data: r,
56
- appKey: k,
57
- appKeyEur: I,
58
- paymentWidgetSrcUrl: c,
59
- dispatch: F,
60
- iban: q,
61
- navigate: J,
62
- from: K
56
+ appKey: x,
57
+ appKeyEur: B,
58
+ paymentWidgetSrcUrl: m,
59
+ dispatch: L,
60
+ iban: re,
61
+ navigate: Be,
62
+ from: ne,
63
+ tokenData: l
63
64
  }) => {
64
- var _;
65
- const [Q, M] = a(!1), [X, Y] = a(!1), [f, U] = a(!1), [P, T] = a(""), [N, h] = a(null), [R, y] = a(null), [u, l] = a(!1), { showAlertMessage: b } = V(), s = K === ce, C = $(
66
- (t) => t.order
67
- ), w = C.v4Payment ?? null, g = C.v4PaymentLoader ?? !1, Z = $((t) => t.session.uuid), ee = () => {
68
- T(""), h(null), y(null), l(!1), U(!0);
65
+ var $;
66
+ const [oe, R] = u(!1), [te, le] = u(!1), [h, O] = u(!1), [P, w] = u(""), [A, y] = u(null), [_, b] = u(null), [p, s] = u(!1), { showAlertMessage: g } = ee(), c = ne === ge, C = J(
67
+ (o) => o.order
68
+ ), E = C.v4Payment ?? null, v = C.v4PaymentLoader ?? !1, ie = J((o) => o.session.uuid), se = (l == null ? void 0 : l.loader) ?? !1, ce = () => {
69
+ w(""), y(null), b(null), s(!1), O(!0);
69
70
  }, W = () => {
70
- U(!1), T(""), h(null), y(null), l(!1);
71
- }, re = () => {
72
- const t = Number(P);
73
- if (!P || Number.isNaN(t) || t <= 0) {
74
- b({
71
+ O(!1), w(""), y(null), b(null), s(!1);
72
+ }, ue = () => {
73
+ const o = Number(P);
74
+ if (!P || Number.isNaN(o) || o <= 0) {
75
+ g({
75
76
  message: "Please enter a valid amount greater than zero.",
76
77
  type: "error"
77
78
  });
78
79
  return;
79
80
  }
80
- if (!k) {
81
- b({
81
+ if (!x) {
82
+ g({
82
83
  message: "Unable to identify application key.",
83
84
  type: "error"
84
85
  });
85
86
  return;
86
87
  }
87
- if (!I) {
88
- b({
88
+ if (!B) {
89
+ g({
89
90
  message: "Unable to identify application EUR key.",
90
91
  type: "error"
91
92
  });
92
93
  return;
93
94
  }
94
- const ie = Math.round(t * 100);
95
- F(
96
- le({
97
- apiKey: I,
95
+ const G = Math.round(o * 100);
96
+ L(
97
+ ye({
98
+ apiKey: B,
98
99
  ccy: "EUR",
99
100
  transaction_type: "CHECKOUT",
100
- amount: ie,
101
- uuid: Z ?? void 0
101
+ amount: G,
102
+ uuid: ie ?? void 0
102
103
  })
103
- ), l(!0);
104
- }, oe = () => {
105
- if (s) {
106
- ee();
104
+ ), s(!0);
105
+ }, ae = () => {
106
+ if (c) {
107
+ ce();
107
108
  return;
108
109
  }
109
- M(!0);
110
- }, n = B(() => w ?? null, [w]), d = B(() => {
111
- var t;
112
- return n ? (n == null ? void 0 : n.checkout_id) ?? ((t = n == null ? void 0 : n.order) == null ? void 0 : t.provider_token) ?? (n == null ? void 0 : n.provider_token) ?? null : null;
113
- }, [n]), A = ((_ = n == null ? void 0 : n.order) == null ? void 0 : _.order_id) ?? null, ne = B(() => c ? c.endsWith("/") ? c : `${c}/` : "", [c]), te = B(() => R ? `/?paymentId=${encodeURIComponent(R)}` : "/", [R]);
114
- return E(() => {
115
- u && d && (h(d), y(A ?? null), l(!1));
116
- }, [u, d, A]), E(() => {
117
- u && f && (!d || N || (h(d), y(A ?? null), l(!1)));
110
+ R(!0);
111
+ }, t = f(() => E ?? null, [E]), d = f(() => {
112
+ var o;
113
+ return t ? (t == null ? void 0 : t.checkout_id) ?? ((o = t == null ? void 0 : t.order) == null ? void 0 : o.provider_token) ?? (t == null ? void 0 : t.provider_token) ?? null : null;
114
+ }, [t]), S = (($ = t == null ? void 0 : t.order) == null ? void 0 : $.order_id) ?? null, me = f(() => m ? m.endsWith("/") ? m : `${m}/` : "", [m]), F = f(() => {
115
+ const o = (l == null ? void 0 : l.list) ?? [];
116
+ if (!o.length) return null;
117
+ const H = {
118
+ [Ce]: ve,
119
+ [K]: Ie
120
+ }[(r.currency ?? "").toUpperCase()] ?? null;
121
+ if (!H) return null;
122
+ const j = o.find((he) => he.symbol === H);
123
+ if (!j) return null;
124
+ const V = parseFloat(
125
+ (j.fmt_balance ?? "0").toString().replaceAll(",", "")
126
+ );
127
+ return Number.isNaN(V) ? null : V / 100;
128
+ }, [l == null ? void 0 : l.list, r.currency]), pe = f(() => F == null ? "--" : `${F.toLocaleString(void 0, {
129
+ minimumFractionDigits: 2,
130
+ maximumFractionDigits: 2
131
+ })} ${r.currency ?? ""}`, [F, r.currency]), de = f(() => _ ? `/?paymentId=${encodeURIComponent(_)}` : "/", [_]);
132
+ k(() => {
133
+ p && d && (y(d), b(S ?? null), s(!1));
134
+ }, [p, d, S]), k(() => {
135
+ p && h && (!d || A || (y(d), b(S ?? null), s(!1)));
118
136
  }, [
119
- u,
120
- f,
137
+ p,
138
+ h,
121
139
  d,
122
- N,
123
- A
124
- ]), E(() => {
125
- s && (f || (T(""), h(null), y(null)));
126
- }, [s, f]), E(() => {
127
- if (u && !g) {
128
- if (w) {
129
- l(!1);
140
+ A,
141
+ S
142
+ ]), k(() => {
143
+ c && (h || (w(""), y(null), b(null)));
144
+ }, [c, h]), k(() => {
145
+ if (p && !v) {
146
+ if (E) {
147
+ s(!1);
130
148
  return;
131
149
  }
132
- C.error && (b({
150
+ C.error && (g({
133
151
  message: C.error,
134
152
  type: "error"
135
- }), l(!1));
153
+ }), s(!1));
136
154
  }
137
155
  }, [
138
- u,
139
- g,
140
- w,
156
+ p,
157
+ v,
158
+ E,
141
159
  C.error,
142
- b
143
- ]), /* @__PURE__ */ e(v, { children: r.accountNumber ? /* @__PURE__ */ o(v, { children: [
144
- /* @__PURE__ */ e(x, { type: "iban", data: r, children: /* @__PURE__ */ o(p, { my: 1, spacing: 2, container: !0, alignItems: "center", children: [
145
- /* @__PURE__ */ e(p, { size: { md: 6, xs: 12 }, children: /* @__PURE__ */ e(z, { fullWidth: !0, onClick: oe, children: s ? "Topup" : "Deposit" }) }),
146
- /* @__PURE__ */ e(
147
- p,
148
- {
149
- size: { md: 6, xs: 12 },
150
- sx: {
151
- display: "flex",
152
- justifyContent: { md: "flex-end", xs: "flex-start" },
153
- mt: { md: 0, xs: 1.5 }
154
- },
155
- children: /* @__PURE__ */ e(
156
- m,
157
- {
158
- component: "button",
159
- sx: {
160
- background: "none",
161
- border: "none",
162
- padding: 0,
163
- cursor: "pointer",
164
- color: "primary.main",
165
- textDecoration: "underline",
166
- fontSize: 14
167
- },
168
- onClick: () => J("/history"),
169
- children: "History"
170
- }
171
- )
172
- }
173
- )
174
- ] }) }),
175
- /* @__PURE__ */ o(
176
- j,
160
+ g
161
+ ]);
162
+ const fe = /* @__PURE__ */ n(M, { display: "flex", alignItems: "center", gap: 0.75, children: [
163
+ /* @__PURE__ */ e(a, { component: "span", sx: { fontSize: 14, color: "text.secondary" }, children: "Balance:" }),
164
+ se ? /* @__PURE__ */ e(D, { size: 16, color: "inherit" }) : /* @__PURE__ */ e(
165
+ a,
177
166
  {
178
- open: Q,
167
+ component: "span",
168
+ sx: {
169
+ fontSize: 16,
170
+ fontWeight: 700,
171
+ color: "primary.main"
172
+ },
173
+ children: pe
174
+ }
175
+ )
176
+ ] });
177
+ return /* @__PURE__ */ e(I, { children: r.accountNumber ? /* @__PURE__ */ n(I, { children: [
178
+ /* @__PURE__ */ e(N, { type: "iban", data: r, rightAdornment: fe, children: /* @__PURE__ */ e(T, { my: 1, spacing: 2, container: !0, alignItems: "center", children: /* @__PURE__ */ e(T, { size: { xs: 12 }, children: /* @__PURE__ */ e(U, { fullWidth: !0, onClick: ae, children: c ? "Topup" : "Deposit" }) }) }) }),
179
+ /* @__PURE__ */ n(
180
+ Q,
181
+ {
182
+ open: oe,
179
183
  fullWidth: !0,
180
- onClose: () => M(!1),
181
- TransitionComponent: L,
184
+ onClose: () => R(!1),
185
+ TransitionComponent: q,
182
186
  maxWidth: "md",
183
187
  children: [
184
- /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
185
- /* @__PURE__ */ e(m, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "Deposit / Receive" }) }),
188
+ /* @__PURE__ */ n(Z, { className: "buy-modal-text-color", children: [
189
+ /* @__PURE__ */ e(a, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "Deposit / Receive" }) }),
186
190
  /* @__PURE__ */ e(
187
- S,
191
+ z,
188
192
  {
189
193
  "aria-label": "close",
190
- onClick: () => M(!1),
194
+ onClick: () => R(!1),
191
195
  className: "menu-buttons",
192
- children: /* @__PURE__ */ e(O, {})
196
+ children: /* @__PURE__ */ e(Y, {})
193
197
  }
194
198
  )
195
199
  ] }),
196
- /* @__PURE__ */ o(G, { dividers: !0, children: [
197
- /* @__PURE__ */ e(m, { variant: "h5", align: "center", children: /* @__PURE__ */ e("strong", { children: "Account Details" }) }),
198
- /* @__PURE__ */ o(p, { container: !0, spacing: 2, sx: { padding: "5% 15%" }, children: [
200
+ /* @__PURE__ */ n(X, { dividers: !0, children: [
201
+ /* @__PURE__ */ e(a, { variant: "h5", align: "center", children: /* @__PURE__ */ e("strong", { children: "Account Details" }) }),
202
+ /* @__PURE__ */ n(T, { container: !0, spacing: 2, sx: { padding: "5% 15%" }, children: [
199
203
  /* @__PURE__ */ e(
200
204
  i,
201
205
  {
@@ -227,7 +231,7 @@ const i = ({
227
231
  showCopyBtn: !0
228
232
  }
229
233
  ),
230
- r.currency === ae && /* @__PURE__ */ o(v, { children: [
234
+ r.currency === K && /* @__PURE__ */ n(I, { children: [
231
235
  /* @__PURE__ */ e(
232
236
  i,
233
237
  {
@@ -258,51 +262,51 @@ const i = ({
258
262
  ]
259
263
  }
260
264
  ),
261
- s && /* @__PURE__ */ o(
262
- j,
265
+ c && /* @__PURE__ */ n(
266
+ Q,
263
267
  {
264
- open: f,
268
+ open: h,
265
269
  fullWidth: !0,
266
270
  maxWidth: "sm",
267
271
  onClose: W,
268
- TransitionComponent: L,
272
+ TransitionComponent: q,
269
273
  children: [
270
- /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
271
- /* @__PURE__ */ e(m, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "E-Wallet Topup" }) }),
274
+ /* @__PURE__ */ n(Z, { className: "buy-modal-text-color", children: [
275
+ /* @__PURE__ */ e(a, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "E-Wallet Topup" }) }),
272
276
  /* @__PURE__ */ e(
273
- S,
277
+ z,
274
278
  {
275
279
  "aria-label": "close",
276
280
  onClick: W,
277
281
  className: "menu-buttons",
278
- children: /* @__PURE__ */ e(O, {})
282
+ children: /* @__PURE__ */ e(Y, {})
279
283
  }
280
284
  )
281
285
  ] }),
282
- /* @__PURE__ */ e(G, { dividers: !0, children: N ? /* @__PURE__ */ o(D, { mt: 2, children: [
283
- /* @__PURE__ */ e(m, { variant: "body1", mb: 2, children: "Complete your payment using the secure widget below." }),
286
+ /* @__PURE__ */ e(X, { dividers: !0, children: A ? /* @__PURE__ */ n(M, { mt: 2, children: [
287
+ /* @__PURE__ */ e(a, { variant: "body1", mb: 2, children: "Complete your payment using the secure widget below." }),
284
288
  /* @__PURE__ */ e(
285
- de,
289
+ Ne,
286
290
  {
287
- checkoutId: N,
288
- srcUrl: ne,
289
- onResultUrl: te
291
+ checkoutId: A,
292
+ srcUrl: me,
293
+ onResultUrl: de
290
294
  }
291
295
  )
292
- ] }) : /* @__PURE__ */ o(v, { children: [
293
- /* @__PURE__ */ e(m, { variant: "body1", children: "Enter the amount you would like to add to this E-Wallet." }),
296
+ ] }) : /* @__PURE__ */ n(I, { children: [
297
+ /* @__PURE__ */ e(a, { variant: "body1", children: "Enter the amount you would like to add to this E-Wallet." }),
294
298
  /* @__PURE__ */ e(
295
- ue,
299
+ Te,
296
300
  {
297
301
  label: "Topup Amount",
298
302
  type: "number",
299
303
  value: P,
300
- onChangeHandler: (t) => T(t),
304
+ onChangeHandler: (o) => w(o),
301
305
  inputProps: { min: "0", step: "0.01" }
302
306
  }
303
307
  ),
304
- /* @__PURE__ */ o(
305
- D,
308
+ /* @__PURE__ */ n(
309
+ M,
306
310
  {
307
311
  mt: 4,
308
312
  display: "flex",
@@ -310,22 +314,22 @@ const i = ({
310
314
  gap: 2,
311
315
  children: [
312
316
  /* @__PURE__ */ e(
313
- z,
317
+ U,
314
318
  {
315
319
  variantType: "secondary",
316
320
  onClick: W,
317
- disabled: g,
321
+ disabled: v,
318
322
  children: "Cancel"
319
323
  }
320
324
  ),
321
325
  /* @__PURE__ */ e(
322
- z,
326
+ U,
323
327
  {
324
- onClick: re,
325
- disabled: g,
326
- children: /* @__PURE__ */ o("strong", { children: [
327
- g ? /* @__PURE__ */ e(
328
- pe,
328
+ onClick: ue,
329
+ disabled: v,
330
+ children: /* @__PURE__ */ n("strong", { children: [
331
+ v ? /* @__PURE__ */ e(
332
+ D,
329
333
  {
330
334
  size: 18,
331
335
  color: "inherit",
@@ -344,18 +348,18 @@ const i = ({
344
348
  }
345
349
  ),
346
350
  /* @__PURE__ */ e(
347
- me,
351
+ xe,
348
352
  {
349
- iban: q,
353
+ iban: re,
350
354
  data: r,
351
- dispatch: F,
352
- appKey: k,
353
- openModal: X,
354
- setOpenModal: Y
355
+ dispatch: L,
356
+ appKey: x,
357
+ openModal: te,
358
+ setOpenModal: le
355
359
  }
356
360
  )
357
- ] }) : /* @__PURE__ */ o(
358
- D,
361
+ ] }) : /* @__PURE__ */ n(
362
+ M,
359
363
  {
360
364
  className: "text-center",
361
365
  sx: {
@@ -366,13 +370,13 @@ const i = ({
366
370
  borderRadius: "5px"
367
371
  },
368
372
  children: [
369
- /* @__PURE__ */ o("p", { children: [
373
+ /* @__PURE__ */ n("p", { children: [
370
374
  r.currency,
371
375
  " ",
372
- s ? "E-Wallet" : "Virtual IBAN",
376
+ c ? "E-Wallet" : "Virtual IBAN",
373
377
  " creation is in progress. Please wait while we generate your",
374
378
  " ",
375
- s ? "E-Wallet" : "Virtual IBAN",
379
+ c ? "E-Wallet" : "Virtual IBAN",
376
380
  "."
377
381
  ] }),
378
382
  /* @__PURE__ */ e("p", { children: "This may take a few moments. Thank you for your patience!" })
@@ -381,5 +385,5 @@ const i = ({
381
385
  ) });
382
386
  };
383
387
  export {
384
- Je as default
388
+ ir as default
385
389
  };