everest-npm-features 0.0.53 → 0.0.55

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.
@@ -1,15 +1,15 @@
1
- import { jsx as e, Fragment as R, jsxs as r } from "react/jsx-runtime";
2
- import { useState as s, useMemo as E, useEffect as M } from "react";
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
3
  import "../../../constants-Dtk3Gd0Y.js";
4
4
  import { v as ie } from "../../../order-DuPcaU0K.js";
5
5
  import g from "../Shared/appButton.js";
6
6
  import { C as le } from "../../../ContentCopy-coPwrEuz.js";
7
- import { C as O } from "../../../Close-CNwiMz_O.js";
7
+ import { C as L } from "../../../Close-CNwiMz_O.js";
8
8
  import $ from "../../Shared/transition.js";
9
9
  import "../../../index-DlQqWbXG.js";
10
10
  import "../../../hoc/withThemeProvider.js";
11
11
  import { u as j } from "../../../react-redux-C7I9-1M6.js";
12
- import { FEATURE_EWALLET as se } from "../../../util/constants.js";
12
+ import { GBP_ISO3 as se, FEATURE_EWALLET as ce } from "../../../util/constants.js";
13
13
  import "../Shared/Auth/otpForm.js";
14
14
  import { useSnackBarContext as q } from "../../../context/snackBarContext.js";
15
15
  import "../../../util/conversions.js";
@@ -22,51 +22,51 @@ 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 ce from "../Shared/CardCorp/index.js";
25
+ import ue from "../Shared/CardCorp/index.js";
26
26
  import "../../../context/dialogContext.js";
27
- import ue from "./sendIban.js";
27
+ import de from "./sendIban.js";
28
28
  import { G as a } from "../../../Grid-CFe3amXO.js";
29
- import { D as V, a as G } from "../../../DialogContent-BMwlOnbW.js";
29
+ import { D as G, a as V } from "../../../DialogContent-BMwlOnbW.js";
30
30
  import { D as H } from "../../../DialogTitle-CfS0bb2K.js";
31
31
  import { T as v } from "../../../Typography-pAaje37G.js";
32
- import { I as F } from "../../../IconButton-DHm-hucF.js";
33
- import { B as D } from "../../../Box-B0YSYLco.js";
34
- import { C as de } from "../../../CircularProgress-xZA3lvba.js";
35
- const m = ({
36
- label: k,
37
- value: o,
38
- showCopyBtn: T
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";
35
+ const i = ({
36
+ label: T,
37
+ value: r,
38
+ showCopyBtn: I
39
39
  }) => {
40
- const { showAlertMessage: I } = q();
41
- return /* @__PURE__ */ r(R, { children: [
42
- /* @__PURE__ */ e(a, { size: 5, className: "d-flex items-center", children: /* @__PURE__ */ e("strong", { children: k }) }),
43
- /* @__PURE__ */ r(a, { size: 7, className: "fw500 text-left d-flex items-center", children: [
44
- o,
45
- T && /* @__PURE__ */ e(F, { onClick: () => {
46
- navigator.clipboard.writeText(o), I({
47
- message: `${k} has been copied successfully.`,
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: [
44
+ r,
45
+ I && /* @__PURE__ */ e(D, { onClick: () => {
46
+ navigator.clipboard.writeText(r), N({
47
+ message: `${T} has been copied successfully.`,
48
48
  type: "success"
49
49
  });
50
50
  }, children: /* @__PURE__ */ e(le, { fontSize: "small", color: "primary" }) })
51
51
  ] })
52
52
  ] });
53
- }, He = ({
54
- AccountItem: k,
55
- data: o,
56
- appKey: T,
57
- appKeyEur: I,
58
- paymentWidgetSrcUrl: c,
59
- dispatch: U,
53
+ }, qe = ({
54
+ AccountItem: T,
55
+ data: r,
56
+ appKey: I,
57
+ appKeyEur: N,
58
+ paymentWidgetSrcUrl: u,
59
+ dispatch: F,
60
60
  iban: J,
61
61
  from: K
62
62
  }) => {
63
- var L;
64
- const [Q, N] = s(!1), [X, S] = s(!1), [p, _] = s(!1), [W, w] = s(""), [x, f] = s(null), [P, h] = s(null), [u, i] = s(!1), { showAlertMessage: C } = q(), l = K === se, b = j(
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
65
  (t) => t.order
66
- ), A = b.v4Payment ?? null, y = b.v4PaymentLoader ?? !1, Y = j((t) => t.session.uuid), Z = () => {
67
- w(""), f(null), h(null), i(!1), _(!0);
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
68
  }, z = () => {
69
- _(!1), w(""), f(null), h(null), i(!1);
69
+ _(!1), x(""), h(null), f(null), l(!1);
70
70
  }, ee = () => {
71
71
  const t = Number(W);
72
72
  if (!W || Number.isNaN(t) || t <= 0) {
@@ -76,14 +76,14 @@ const m = ({
76
76
  });
77
77
  return;
78
78
  }
79
- if (!T) {
79
+ if (!I) {
80
80
  C({
81
81
  message: "Unable to identify application key.",
82
82
  type: "error"
83
83
  });
84
84
  return;
85
85
  }
86
- if (!I) {
86
+ if (!N) {
87
87
  C({
88
88
  message: "Unable to identify application EUR key.",
89
89
  type: "error"
@@ -91,114 +91,138 @@ const m = ({
91
91
  return;
92
92
  }
93
93
  const te = Math.round(t * 100);
94
- U(
94
+ F(
95
95
  ie({
96
- apiKey: I,
96
+ apiKey: N,
97
97
  ccy: "EUR",
98
98
  transaction_type: "CHECKOUT",
99
99
  amount: te,
100
100
  uuid: Y ?? void 0
101
101
  })
102
- ), i(!0);
102
+ ), l(!0);
103
103
  }, re = () => {
104
- if (l) {
104
+ if (s) {
105
105
  Z();
106
106
  return;
107
107
  }
108
- N(!0);
109
- }, n = E(() => A ?? null, [A]), d = E(() => {
108
+ w(!0);
109
+ }, n = M(() => B ?? null, [B]), m = M(() => {
110
110
  var t;
111
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]), B = ((L = n == null ? void 0 : n.order) == null ? void 0 : L.order_id) ?? null, oe = E(() => c ? c.endsWith("/") ? c : `${c}/` : "", [c]), ne = E(() => P ? `/?paymentId=${encodeURIComponent(P)}` : "/", [P]);
113
- return M(() => {
114
- u && d && (f(d), h(B ?? null), i(!1));
115
- }, [u, d, B]), M(() => {
116
- u && p && (!d || x || (f(d), h(B ?? null), i(!1)));
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)));
117
117
  }, [
118
- u,
119
- p,
120
118
  d,
121
- x,
122
- B
123
- ]), M(() => {
124
- l && (p || (w(""), f(null), h(null)));
125
- }, [l, p]), M(() => {
126
- if (u && !y) {
127
- if (A) {
128
- i(!1);
119
+ p,
120
+ m,
121
+ 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);
129
129
  return;
130
130
  }
131
131
  b.error && (C({
132
132
  message: b.error,
133
133
  type: "error"
134
- }), i(!1));
134
+ }), l(!1));
135
135
  }
136
- }, [u, y, A, b.error, C]), /* @__PURE__ */ e(R, { children: o.accountNumber ? /* @__PURE__ */ r(R, { children: [
137
- /* @__PURE__ */ e(k, { type: "iban", data: o, children: /* @__PURE__ */ r(a, { my: 1, spacing: 2, container: !0, children: [
138
- /* @__PURE__ */ e(a, { size: { md: 6 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: re, children: l ? "Topup" : "Deposit" }) }),
139
- /* @__PURE__ */ e(a, { size: { md: 3 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: () => S(!0), children: "Send" }) }),
140
- /* @__PURE__ */ e(a, { size: { md: 3 }, children: /* @__PURE__ */ e(g, { fullWidth: !0, onClick: () => N(!0), children: "Receive" }) })
136
+ }, [
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" }) })
141
147
  ] }) }),
142
- /* @__PURE__ */ r(
143
- V,
148
+ /* @__PURE__ */ o(
149
+ G,
144
150
  {
145
151
  open: Q,
146
152
  fullWidth: !0,
147
- onClose: () => N(!1),
153
+ onClose: () => w(!1),
148
154
  TransitionComponent: $,
149
155
  maxWidth: "md",
150
156
  children: [
151
- /* @__PURE__ */ r(H, { className: "buy-modal-text-color", children: [
157
+ /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
152
158
  /* @__PURE__ */ e(v, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "Deposit / Receive" }) }),
153
159
  /* @__PURE__ */ e(
154
- F,
160
+ D,
155
161
  {
156
162
  "aria-label": "close",
157
- onClick: () => N(!1),
163
+ onClick: () => w(!1),
158
164
  className: "menu-buttons",
159
- children: /* @__PURE__ */ e(O, {})
165
+ children: /* @__PURE__ */ e(L, {})
160
166
  }
161
167
  )
162
168
  ] }),
163
- /* @__PURE__ */ r(G, { dividers: !0, children: [
169
+ /* @__PURE__ */ o(V, { dividers: !0, children: [
164
170
  /* @__PURE__ */ e(v, { variant: "h5", align: "center", children: /* @__PURE__ */ e("strong", { children: "Account Details" }) }),
165
- /* @__PURE__ */ r(a, { container: !0, spacing: 2, sx: { padding: "5% 15%" }, children: [
171
+ /* @__PURE__ */ o(a, { container: !0, spacing: 2, sx: { padding: "5% 15%" }, children: [
166
172
  /* @__PURE__ */ e(
167
- m,
173
+ i,
168
174
  {
169
175
  label: "Account Title",
170
- value: `${o.ownerFirstName} ${o.ownerLastName}`
176
+ value: `${r.ownerFirstName} ${r.ownerLastName}`
171
177
  }
172
178
  ),
173
179
  /* @__PURE__ */ e(
174
- m,
180
+ i,
175
181
  {
176
182
  label: "Bank Account Currency",
177
- value: o.currency || ""
183
+ value: r.currency || ""
178
184
  }
179
185
  ),
180
- /* @__PURE__ */ e(m, { label: "Bank Name", value: o.bankName || "" }),
186
+ /* @__PURE__ */ e(i, { label: "Bank Name", value: r.bankName || "" }),
181
187
  /* @__PURE__ */ e(
182
- m,
188
+ i,
183
189
  {
184
190
  label: "Bank Address",
185
- value: o.bankBranchAddress || "",
191
+ value: r.bankBranchAddress || "",
186
192
  showCopyBtn: !0
187
193
  }
188
194
  ),
189
195
  /* @__PURE__ */ e(
190
- m,
196
+ i,
191
197
  {
192
198
  label: "Virtual IBAN",
193
- value: o.accountNumber || "",
199
+ value: r.accountNumber || "",
194
200
  showCopyBtn: !0
195
201
  }
196
202
  ),
203
+ r.currency === se && /* @__PURE__ */ o(k, { children: [
204
+ /* @__PURE__ */ e(
205
+ i,
206
+ {
207
+ label: "Account Number",
208
+ value: (r.accountNumber || "").slice(-8),
209
+ showCopyBtn: !0
210
+ }
211
+ ),
212
+ /* @__PURE__ */ e(
213
+ i,
214
+ {
215
+ label: "Sort Code",
216
+ value: r.sortCode || "",
217
+ showCopyBtn: !0
218
+ }
219
+ )
220
+ ] }),
197
221
  /* @__PURE__ */ e(
198
- m,
222
+ i,
199
223
  {
200
224
  label: "BIC/Swift Code",
201
- value: o.bicCode || "",
225
+ value: r.bicCode || "",
202
226
  showCopyBtn: !0
203
227
  }
204
228
  )
@@ -207,8 +231,8 @@ const m = ({
207
231
  ]
208
232
  }
209
233
  ),
210
- l && /* @__PURE__ */ r(
211
- V,
234
+ s && /* @__PURE__ */ o(
235
+ G,
212
236
  {
213
237
  open: p,
214
238
  fullWidth: !0,
@@ -216,29 +240,29 @@ const m = ({
216
240
  onClose: z,
217
241
  TransitionComponent: $,
218
242
  children: [
219
- /* @__PURE__ */ r(H, { className: "buy-modal-text-color", children: [
243
+ /* @__PURE__ */ o(H, { className: "buy-modal-text-color", children: [
220
244
  /* @__PURE__ */ e(v, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ e("strong", { children: "E-Wallet Topup" }) }),
221
245
  /* @__PURE__ */ e(
222
- F,
246
+ D,
223
247
  {
224
248
  "aria-label": "close",
225
249
  onClick: z,
226
250
  className: "menu-buttons",
227
- children: /* @__PURE__ */ e(O, {})
251
+ children: /* @__PURE__ */ e(L, {})
228
252
  }
229
253
  )
230
254
  ] }),
231
- /* @__PURE__ */ e(G, { dividers: !0, children: x ? /* @__PURE__ */ r(D, { mt: 2, children: [
255
+ /* @__PURE__ */ e(V, { dividers: !0, children: A ? /* @__PURE__ */ o(S, { mt: 2, children: [
232
256
  /* @__PURE__ */ e(v, { variant: "body1", mb: 2, children: "Complete your payment using the secure widget below." }),
233
257
  /* @__PURE__ */ e(
234
- ce,
258
+ ue,
235
259
  {
236
- checkoutId: x,
260
+ checkoutId: A,
237
261
  srcUrl: oe,
238
262
  onResultUrl: ne
239
263
  }
240
264
  )
241
- ] }) : /* @__PURE__ */ r(R, { children: [
265
+ ] }) : /* @__PURE__ */ o(k, { children: [
242
266
  /* @__PURE__ */ e(v, { variant: "body1", children: "Enter the amount you would like to add to this E-Wallet." }),
243
267
  /* @__PURE__ */ e(
244
268
  ae,
@@ -246,56 +270,65 @@ const m = ({
246
270
  label: "Topup Amount",
247
271
  type: "number",
248
272
  value: W,
249
- onChangeHandler: (t) => w(t),
273
+ onChangeHandler: (t) => x(t),
250
274
  inputProps: { min: "0", step: "0.01" }
251
275
  }
252
276
  ),
253
- /* @__PURE__ */ r(D, { mt: 4, display: "flex", justifyContent: "flex-end", gap: 2, children: [
254
- /* @__PURE__ */ e(
255
- g,
256
- {
257
- variantType: "secondary",
258
- onClick: z,
259
- disabled: y,
260
- children: "Cancel"
261
- }
262
- ),
263
- /* @__PURE__ */ e(
264
- g,
265
- {
266
- onClick: ee,
267
- disabled: y,
268
- children: /* @__PURE__ */ r("strong", { children: [
269
- y ? /* @__PURE__ */ e(
270
- de,
271
- {
272
- size: 18,
273
- color: "inherit",
274
- sx: { mr: 1 }
275
- }
276
- ) : null,
277
- "Confirm Topup"
278
- ] })
279
- }
280
- )
281
- ] })
277
+ /* @__PURE__ */ o(
278
+ S,
279
+ {
280
+ mt: 4,
281
+ display: "flex",
282
+ justifyContent: "flex-end",
283
+ gap: 2,
284
+ children: [
285
+ /* @__PURE__ */ e(
286
+ g,
287
+ {
288
+ variantType: "secondary",
289
+ onClick: z,
290
+ disabled: y,
291
+ children: "Cancel"
292
+ }
293
+ ),
294
+ /* @__PURE__ */ e(
295
+ g,
296
+ {
297
+ onClick: ee,
298
+ disabled: y,
299
+ children: /* @__PURE__ */ o("strong", { children: [
300
+ y ? /* @__PURE__ */ e(
301
+ me,
302
+ {
303
+ size: 18,
304
+ color: "inherit",
305
+ sx: { mr: 1 }
306
+ }
307
+ ) : null,
308
+ "Confirm Topup"
309
+ ] })
310
+ }
311
+ )
312
+ ]
313
+ }
314
+ )
282
315
  ] }) })
283
316
  ]
284
317
  }
285
318
  ),
286
319
  /* @__PURE__ */ e(
287
- ue,
320
+ de,
288
321
  {
289
322
  iban: J,
290
- data: o,
291
- dispatch: U,
292
- appKey: T,
323
+ data: r,
324
+ dispatch: F,
325
+ appKey: I,
293
326
  openModal: X,
294
- setOpenModal: S
327
+ setOpenModal: U
295
328
  }
296
329
  )
297
- ] }) : /* @__PURE__ */ r(
298
- D,
330
+ ] }) : /* @__PURE__ */ o(
331
+ S,
299
332
  {
300
333
  className: "text-center",
301
334
  sx: {
@@ -306,12 +339,13 @@ const m = ({
306
339
  borderRadius: "5px"
307
340
  },
308
341
  children: [
309
- /* @__PURE__ */ r("p", { children: [
310
- o.currency,
342
+ /* @__PURE__ */ o("p", { children: [
343
+ r.currency,
344
+ " ",
345
+ s ? "E-Wallet" : "Virtual IBAN",
346
+ " creation is in progress. Please wait while we generate your",
311
347
  " ",
312
- l ? "E-Wallet" : "Virtual IBAN",
313
- " creation is in progress. Please wait while we generate your ",
314
- l ? "E-Wallet" : "Virtual IBAN",
348
+ s ? "E-Wallet" : "Virtual IBAN",
315
349
  "."
316
350
  ] }),
317
351
  /* @__PURE__ */ e("p", { children: "This may take a few moments. Thank you for your patience!" })
@@ -320,5 +354,5 @@ const m = ({
320
354
  ) });
321
355
  };
322
356
  export {
323
- He as default
357
+ qe as default
324
358
  };