everest-npm-features 0.0.56 → 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 +49 -46
  33. package/dist/components/Wallet/Account/iban.d.ts +4 -2
  34. package/dist/components/Wallet/Account/iban.js +51 -48
  35. package/dist/components/Wallet/Account/ibanItem.d.ts +5 -2
  36. package/dist/components/Wallet/Account/ibanItem.js +184 -153
  37. package/dist/components/Wallet/Account/index.js +192 -196
  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,79 +1,82 @@
1
- import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
2
- import { useRef as g, useState as S, 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 l } from "../../../util/constants.js";
5
- import { M as w } from "../../../tooltip-3UvETWtS.js";
6
- import b from "../Shared/noData.js";
7
- import v from "./createIban.js";
8
- import { AuthInnerContainer as D } from "../Shared/Container/index.js";
9
- import E from "./ibanItem.js";
1
+ import { jsx as r, jsxs as o, Fragment as l } from "react/jsx-runtime";
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 P } 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 = ({
16
- dispatch: p,
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
+ dispatch: u,
17
17
  openDialog: a,
18
- appKey: u,
19
- appKeyEur: f,
20
- paymentWidgetSrcUrl: h,
21
- iban: r,
22
- navigate: d,
18
+ appKey: f,
19
+ appKeyEur: h,
20
+ paymentWidgetSrcUrl: d,
21
+ iban: e,
22
+ navigate: i,
23
23
  AccountItem: I,
24
- createIbanRequest: y
24
+ createIbanRequest: y,
25
+ tokenData: x
25
26
  }) => {
26
- const i = r.data, x = r.loader, C = g(""), [R, A] = S("");
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__ */ e(D, { 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__ */ e(P, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ e("strong", { children: "Everest Accounts (Virtual IBAN)" }) }),
39
- /* @__PURE__ */ e(
40
- w,
39
+ /* @__PURE__ */ r(z, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ r("strong", { children: "Everest Accounts (Virtual IBAN)" }) }),
40
+ /* @__PURE__ */ r(
41
+ b,
41
42
  {
42
- title: /* @__PURE__ */ e(t, { sx: { whiteSpace: "pre-line" }, children: "Create a Virtual IBAN of selected currency. This requires KYC" }),
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__ */ e(z, { className: "info-fee-icon", children: /* @__PURE__ */ e(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
- /* @__PURE__ */ e(n, { size: 4, children: /* @__PURE__ */ e(t, { sx: { textAlign: "right" }, children: /* @__PURE__ */ e(
49
- v,
49
+ /* @__PURE__ */ r(n, { size: 4, children: /* @__PURE__ */ r(t, { sx: { textAlign: "right" }, children: /* @__PURE__ */ r(
50
+ E,
50
51
  {
51
52
  openDialog: a,
52
53
  createIbanRequest: y,
53
- iban: r,
54
- navigate: d,
55
- currency: C,
56
- setIbanCurrency: A,
57
- from: l
54
+ iban: e,
55
+ navigate: i,
56
+ currency: A,
57
+ setIbanCurrency: S,
58
+ from: p
58
59
  }
59
60
  ) }) })
60
61
  ] }),
61
- x ? /* @__PURE__ */ e(t, { mt: 4, className: "flex-center", children: /* @__PURE__ */ e(L, { color: "primary", size: 50 }) }) : /* @__PURE__ */ e(m, { children: i.length > 0 ? /* @__PURE__ */ e(m, { children: i.map((c, s) => /* @__PURE__ */ e(
62
- E,
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
- data: c,
65
+ data: s,
65
66
  AccountItem: I,
66
- dispatch: p,
67
- appKey: u,
68
- appKeyEur: f,
69
- paymentWidgetSrcUrl: h,
70
- iban: r,
71
- from: l
67
+ dispatch: u,
68
+ appKey: f,
69
+ appKeyEur: h,
70
+ paymentWidgetSrcUrl: d,
71
+ iban: e,
72
+ navigate: i,
73
+ from: p,
74
+ tokenData: x
72
75
  },
73
- s
74
- )) }) : /* @__PURE__ */ e(b, { text: "You currently have no IBAN Accounts" }) })
76
+ m
77
+ )) }) : /* @__PURE__ */ r(D, { text: "You currently have no IBAN Accounts" }) })
75
78
  ] }) });
76
79
  };
77
80
  export {
78
- J as default
81
+ Q as default
79
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;
@@ -7,12 +7,15 @@ interface IbanItemProps {
7
7
  appKey: string;
8
8
  appKeyEur: string;
9
9
  paymentWidgetSrcUrl: string;
10
- AccountItem: ({ data, type, children, }: {
10
+ navigate: (path: string) => void;
11
+ AccountItem: ({ data, type, children, rightAdornment, }: {
11
12
  data: Wallet | Bank;
12
13
  type: string;
13
14
  children?: React.ReactNode;
15
+ rightAdornment?: React.ReactNode;
14
16
  }) => JSX.Element;
15
17
  from?: string;
18
+ tokenData: WalletAppState["user"]["profile"]["tokens"];
16
19
  }
17
20
  declare const IbanItem: React.FC<IbanItemProps>;
18
21
  export default IbanItem;
@@ -1,20 +1,20 @@
1
- import { jsx as e, Fragment as k, jsxs as o } from "react/jsx-runtime";
2
- import { useState as c, useMemo as M, useEffect as R } from "react";
3
- import "../../../constants-Dtk3Gd0Y.js";
4
- import { v as ie } from "../../../order-DuPcaU0K.js";
5
- import g from "../Shared/appButton.js";
6
- import { C as le } from "../../../ContentCopy-coPwrEuz.js";
7
- import { C as L } from "../../../Close-CNwiMz_O.js";
8
- import $ 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 j } from "../../../react-redux-C7I9-1M6.js";
12
- import { GBP_ISO3 as se, 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 q } 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 ae 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,153 +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 ue from "../Shared/CardCorp/index.js";
25
+ import Ne from "../Shared/CardCorp/index.js";
26
26
  import "../../../context/dialogContext.js";
27
- import de from "./sendIban.js";
28
- import { G as a } from "../../../Grid-CFe3amXO.js";
29
- import { D as G, a as V } from "../../../DialogContent-BMwlOnbW.js";
30
- import { D as H } from "../../../DialogTitle-CfS0bb2K.js";
31
- import { T as v } from "../../../Typography-pAaje37G.js";
32
- import { I as D } from "../../../IconButton-DHm-hucF.js";
33
- import { B as S } from "../../../Box-B0YSYLco.js";
34
- import { C as me } 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: T,
36
+ label: N,
37
37
  value: r,
38
- showCopyBtn: I
38
+ showCopyBtn: x
39
39
  }) => {
40
- const { showAlertMessage: N } = q();
41
- return /* @__PURE__ */ o(k, { children: [
42
- /* @__PURE__ */ e(a, { size: 5, className: "d-flex items-center", children: /* @__PURE__ */ e("strong", { children: T }) }),
43
- /* @__PURE__ */ o(a, { 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
- I && /* @__PURE__ */ e(D, { onClick: () => {
46
- navigator.clipboard.writeText(r), N({
47
- message: `${T} 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(le, { fontSize: "small", color: "primary" }) })
50
+ }, children: /* @__PURE__ */ e(be, { fontSize: "small", color: "primary" }) })
51
51
  ] })
52
52
  ] });
53
- }, qe = ({
54
- AccountItem: T,
53
+ }, ir = ({
54
+ AccountItem: N,
55
55
  data: r,
56
- appKey: I,
57
- appKeyEur: N,
58
- paymentWidgetSrcUrl: u,
59
- dispatch: F,
60
- iban: J,
61
- 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
62
64
  }) => {
63
- var O;
64
- const [Q, w] = c(!1), [X, U] = c(!1), [p, _] = c(!1), [W, x] = c(""), [A, h] = c(null), [P, f] = c(null), [d, l] = c(!1), { showAlertMessage: C } = q(), s = K === ce, b = j(
65
- (t) => t.order
66
- ), B = b.v4Payment ?? null, y = b.v4PaymentLoader ?? !1, Y = j((t) => t.session.uuid), Z = () => {
67
- x(""), h(null), f(null), l(!1), _(!0);
68
- }, z = () => {
69
- _(!1), x(""), h(null), f(null), l(!1);
70
- }, ee = () => {
71
- const t = Number(W);
72
- if (!W || Number.isNaN(t) || t <= 0) {
73
- C({
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);
70
+ }, W = () => {
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({
74
76
  message: "Please enter a valid amount greater than zero.",
75
77
  type: "error"
76
78
  });
77
79
  return;
78
80
  }
79
- if (!I) {
80
- C({
81
+ if (!x) {
82
+ g({
81
83
  message: "Unable to identify application key.",
82
84
  type: "error"
83
85
  });
84
86
  return;
85
87
  }
86
- if (!N) {
87
- C({
88
+ if (!B) {
89
+ g({
88
90
  message: "Unable to identify application EUR key.",
89
91
  type: "error"
90
92
  });
91
93
  return;
92
94
  }
93
- const te = Math.round(t * 100);
94
- F(
95
- ie({
96
- apiKey: N,
95
+ const G = Math.round(o * 100);
96
+ L(
97
+ ye({
98
+ apiKey: B,
97
99
  ccy: "EUR",
98
100
  transaction_type: "CHECKOUT",
99
- amount: te,
100
- uuid: Y ?? void 0
101
+ amount: G,
102
+ uuid: ie ?? void 0
101
103
  })
102
- ), l(!0);
103
- }, re = () => {
104
- if (s) {
105
- Z();
104
+ ), s(!0);
105
+ }, ae = () => {
106
+ if (c) {
107
+ ce();
106
108
  return;
107
109
  }
108
- w(!0);
109
- }, n = M(() => B ?? null, [B]), m = M(() => {
110
- var t;
111
- 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;
112
- }, [n]), E = ((O = n == null ? void 0 : n.order) == null ? void 0 : O.order_id) ?? null, oe = M(() => u ? u.endsWith("/") ? u : `${u}/` : "", [u]), ne = M(() => P ? `/?paymentId=${encodeURIComponent(P)}` : "/", [P]);
113
- return R(() => {
114
- d && m && (h(m), f(E ?? null), l(!1));
115
- }, [d, m, E]), R(() => {
116
- d && p && (!m || A || (h(m), f(E ?? 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)));
117
136
  }, [
118
- d,
119
137
  p,
120
- m,
138
+ h,
139
+ d,
121
140
  A,
122
- E
123
- ]), R(() => {
124
- s && (p || (x(""), h(null), f(null)));
125
- }, [s, p]), R(() => {
126
- if (d && !y) {
127
- if (B) {
128
- l(!1);
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);
129
148
  return;
130
149
  }
131
- b.error && (C({
132
- message: b.error,
150
+ C.error && (g({
151
+ message: C.error,
133
152
  type: "error"
134
- }), l(!1));
153
+ }), s(!1));
135
154
  }
136
155
  }, [
137
- d,
138
- y,
139
- B,
140
- b.error,
141
- C
142
- ]), /* @__PURE__ */ e(k, { children: r.accountNumber ? /* @__PURE__ */ o(k, { children: [
143
- /* @__PURE__ */ e(T, { type: "iban", data: r, children: /* @__PURE__ */ o(a, { my: 1, spacing: 2, container: !0, children: [
144
- /* @__PURE__ */ e(a, { size: { md: 6 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: re, children: s ? "Topup" : "Deposit" }) }),
145
- /* @__PURE__ */ e(a, { size: { md: 3 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: () => U(!0), children: "Send" }) }),
146
- /* @__PURE__ */ e(a, { size: { md: 3 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: () => w(!0), children: "Receive" }) })
147
- ] }) }),
148
- /* @__PURE__ */ o(
149
- G,
156
+ p,
157
+ v,
158
+ E,
159
+ C.error,
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,
166
+ {
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,
150
181
  {
151
- open: Q,
182
+ open: oe,
152
183
  fullWidth: !0,
153
- onClose: () => w(!1),
154
- TransitionComponent: $,
184
+ onClose: () => R(!1),
185
+ TransitionComponent: q,
155
186
  maxWidth: "md",
156
187
  children: [
157
- /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
158
- /* @__PURE__ */ e(v, { 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" }) }),
159
190
  /* @__PURE__ */ e(
160
- D,
191
+ z,
161
192
  {
162
193
  "aria-label": "close",
163
- onClick: () => w(!1),
194
+ onClick: () => R(!1),
164
195
  className: "menu-buttons",
165
- children: /* @__PURE__ */ e(L, {})
196
+ children: /* @__PURE__ */ e(Y, {})
166
197
  }
167
198
  )
168
199
  ] }),
169
- /* @__PURE__ */ o(V, { dividers: !0, children: [
170
- /* @__PURE__ */ e(v, { variant: "h5", align: "center", children: /* @__PURE__ */ e("strong", { children: "Account Details" }) }),
171
- /* @__PURE__ */ o(a, { 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: [
172
203
  /* @__PURE__ */ e(
173
204
  i,
174
205
  {
@@ -200,7 +231,7 @@ const i = ({
200
231
  showCopyBtn: !0
201
232
  }
202
233
  ),
203
- r.currency === se && /* @__PURE__ */ o(k, { children: [
234
+ r.currency === K && /* @__PURE__ */ n(I, { children: [
204
235
  /* @__PURE__ */ e(
205
236
  i,
206
237
  {
@@ -231,51 +262,51 @@ const i = ({
231
262
  ]
232
263
  }
233
264
  ),
234
- s && /* @__PURE__ */ o(
235
- G,
265
+ c && /* @__PURE__ */ n(
266
+ Q,
236
267
  {
237
- open: p,
268
+ open: h,
238
269
  fullWidth: !0,
239
270
  maxWidth: "sm",
240
- onClose: z,
241
- TransitionComponent: $,
271
+ onClose: W,
272
+ TransitionComponent: q,
242
273
  children: [
243
- /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
244
- /* @__PURE__ */ e(v, { 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" }) }),
245
276
  /* @__PURE__ */ e(
246
- D,
277
+ z,
247
278
  {
248
279
  "aria-label": "close",
249
- onClick: z,
280
+ onClick: W,
250
281
  className: "menu-buttons",
251
- children: /* @__PURE__ */ e(L, {})
282
+ children: /* @__PURE__ */ e(Y, {})
252
283
  }
253
284
  )
254
285
  ] }),
255
- /* @__PURE__ */ e(V, { dividers: !0, children: A ? /* @__PURE__ */ o(S, { mt: 2, children: [
256
- /* @__PURE__ */ e(v, { 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." }),
257
288
  /* @__PURE__ */ e(
258
- ue,
289
+ Ne,
259
290
  {
260
291
  checkoutId: A,
261
- srcUrl: oe,
262
- onResultUrl: ne
292
+ srcUrl: me,
293
+ onResultUrl: de
263
294
  }
264
295
  )
265
- ] }) : /* @__PURE__ */ o(k, { children: [
266
- /* @__PURE__ */ e(v, { 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." }),
267
298
  /* @__PURE__ */ e(
268
- ae,
299
+ Te,
269
300
  {
270
301
  label: "Topup Amount",
271
302
  type: "number",
272
- value: W,
273
- onChangeHandler: (t) => x(t),
303
+ value: P,
304
+ onChangeHandler: (o) => w(o),
274
305
  inputProps: { min: "0", step: "0.01" }
275
306
  }
276
307
  ),
277
- /* @__PURE__ */ o(
278
- S,
308
+ /* @__PURE__ */ n(
309
+ M,
279
310
  {
280
311
  mt: 4,
281
312
  display: "flex",
@@ -283,22 +314,22 @@ const i = ({
283
314
  gap: 2,
284
315
  children: [
285
316
  /* @__PURE__ */ e(
286
- g,
317
+ U,
287
318
  {
288
319
  variantType: "secondary",
289
- onClick: z,
290
- disabled: y,
320
+ onClick: W,
321
+ disabled: v,
291
322
  children: "Cancel"
292
323
  }
293
324
  ),
294
325
  /* @__PURE__ */ e(
295
- g,
326
+ U,
296
327
  {
297
- onClick: ee,
298
- disabled: y,
299
- children: /* @__PURE__ */ o("strong", { children: [
300
- y ? /* @__PURE__ */ e(
301
- me,
328
+ onClick: ue,
329
+ disabled: v,
330
+ children: /* @__PURE__ */ n("strong", { children: [
331
+ v ? /* @__PURE__ */ e(
332
+ D,
302
333
  {
303
334
  size: 18,
304
335
  color: "inherit",
@@ -317,18 +348,18 @@ const i = ({
317
348
  }
318
349
  ),
319
350
  /* @__PURE__ */ e(
320
- de,
351
+ xe,
321
352
  {
322
- iban: J,
353
+ iban: re,
323
354
  data: r,
324
- dispatch: F,
325
- appKey: I,
326
- openModal: X,
327
- setOpenModal: U
355
+ dispatch: L,
356
+ appKey: x,
357
+ openModal: te,
358
+ setOpenModal: le
328
359
  }
329
360
  )
330
- ] }) : /* @__PURE__ */ o(
331
- S,
361
+ ] }) : /* @__PURE__ */ n(
362
+ M,
332
363
  {
333
364
  className: "text-center",
334
365
  sx: {
@@ -339,13 +370,13 @@ const i = ({
339
370
  borderRadius: "5px"
340
371
  },
341
372
  children: [
342
- /* @__PURE__ */ o("p", { children: [
373
+ /* @__PURE__ */ n("p", { children: [
343
374
  r.currency,
344
375
  " ",
345
- s ? "E-Wallet" : "Virtual IBAN",
376
+ c ? "E-Wallet" : "Virtual IBAN",
346
377
  " creation is in progress. Please wait while we generate your",
347
378
  " ",
348
- s ? "E-Wallet" : "Virtual IBAN",
379
+ c ? "E-Wallet" : "Virtual IBAN",
349
380
  "."
350
381
  ] }),
351
382
  /* @__PURE__ */ e("p", { children: "This may take a few moments. Thank you for your patience!" })
@@ -354,5 +385,5 @@ const i = ({
354
385
  ) });
355
386
  };
356
387
  export {
357
- qe as default
388
+ ir as default
358
389
  };