everest-npm-features 0.0.49 → 0.0.50

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,7 +1,7 @@
1
1
  import { jsx as a, jsxs as o, Fragment as v } from "react/jsx-runtime";
2
2
  import { useState as _, useRef as V } from "react";
3
3
  import { u as y } from "../../../react-redux-C7I9-1M6.js";
4
- import { FEATURE_EWALLET as g, DIALOG_ERROR_ICON as c, DIALOG_SUCCESS_ICON as k } from "../../../util/constants.js";
4
+ import { FEATURE_EWALLET as p, DIALOG_ERROR_ICON as d, DIALOG_SUCCESS_ICON as k } from "../../../util/constants.js";
5
5
  import { C as D } from "../../../Close-CNwiMz_O.js";
6
6
  import M from "../../Shared/transition.js";
7
7
  import O from "../Shared/CardPayment/index.js";
@@ -23,12 +23,12 @@ import "../../../context/dialogContext.js";
23
23
  import "../../../index-ceeCtFuh.js";
24
24
  import { B } from "../../../Box-B0YSYLco.js";
25
25
  import { C as W } from "../../../CircularProgress-xZA3lvba.js";
26
- import { T as h } from "../../../Typography-pAaje37G.js";
26
+ import { T as f } from "../../../Typography-pAaje37G.js";
27
27
  import { D as H, a as z } from "../../../DialogContent-BMwlOnbW.js";
28
28
  import { D as $ } from "../../../DialogTitle-CfS0bb2K.js";
29
29
  import { I as j } from "../../../IconButton-DHm-hucF.js";
30
30
  import { S as Z } from "../../../Select-CB5yWmyn.js";
31
- import { M as u } from "../../../MenuItem-DUdYOJr4.js";
31
+ import { M as C } from "../../../MenuItem-DUdYOJr4.js";
32
32
  const q = [
33
33
  {
34
34
  alpha3: "AUT",
@@ -195,22 +195,22 @@ const q = [
195
195
  alpha2: "GB",
196
196
  name: "United Kingdom"
197
197
  }
198
- ], Aa = ({
199
- openDialog: t,
198
+ ], wa = ({
199
+ openDialog: r,
200
200
  checkoutSdkKey: E,
201
201
  paymentRequest: T,
202
- iban: d,
202
+ iban: S,
203
203
  navigate: I,
204
- currency: r,
205
- setIbanCurrency: f,
206
- from: C
204
+ currency: t,
205
+ setIbanCurrency: h,
206
+ from: i
207
207
  }) => {
208
- const { showAlertMessage: S } = b(), s = y((e) => e.user), i = s.profile, x = y((e) => e.order), L = i.loader, N = s.kyc.loader, p = s.kyc.status, w = i.email, [A, m] = _(!1), n = V(!1), R = () => {
209
- if (!w) {
210
- t({
208
+ const { showAlertMessage: g } = b(), u = y((e) => e.user), s = u.profile, x = y((e) => e.order), L = s.loader, N = u.kyc.loader, m = u.kyc.status, R = s.email, [w, c] = _(!1), n = V(!1), A = () => {
209
+ if (!R) {
210
+ r({
211
211
  title: "No Email",
212
212
  message: "Please contact support to update your email address.",
213
- icon: c,
213
+ icon: d,
214
214
  width: "575px",
215
215
  confirmButtonText: "Contact Suuport",
216
216
  cancelButtonShow: !0,
@@ -220,8 +220,8 @@ const q = [
220
220
  });
221
221
  return;
222
222
  }
223
- if (p === F || p === G) {
224
- t({
223
+ if (m === F || m === G) {
224
+ r({
225
225
  title: "Under Review",
226
226
  message: "Your profile is currently being reviewed. If approved, you will have additional capabilities on the Everest platform.",
227
227
  width: "550px",
@@ -231,8 +231,8 @@ const q = [
231
231
  });
232
232
  return;
233
233
  }
234
- if (p !== K && p !== Y) {
235
- t({
234
+ if (m !== K && m !== Y) {
235
+ r({
236
236
  title: "Verifying",
237
237
  message: "We are gathering information, and will provision your Virtual IBAN shortly.",
238
238
  width: "575px",
@@ -244,12 +244,12 @@ const q = [
244
244
  return;
245
245
  }
246
246
  if (!q.find(
247
- (l) => l.alpha3 === i.residentialAddress.country
247
+ (l) => l.alpha3 === s.residentialAddress.country
248
248
  )) {
249
- t({
249
+ r({
250
250
  title: "Not Allowed",
251
251
  message: "Currently we are not supporting your country for Virtual IBAN.",
252
- icon: c,
252
+ icon: d,
253
253
  width: "575px",
254
254
  height: "450px",
255
255
  confirmButtonText: "Continue",
@@ -257,11 +257,11 @@ const q = [
257
257
  });
258
258
  return;
259
259
  }
260
- if (i.memberType !== "individual") {
261
- t({
260
+ if (s.memberType !== "individual") {
261
+ r({
262
262
  title: "Not Allowed",
263
263
  message: "Currently we are not supporting organizational wallet(KYB) for Virtual IBAN.",
264
- icon: c,
264
+ icon: d,
265
265
  width: "575px",
266
266
  height: "450px",
267
267
  confirmButtonText: "Continue",
@@ -269,24 +269,24 @@ const q = [
269
269
  });
270
270
  return;
271
271
  }
272
- t({
272
+ i === p && (t.current = "EUR", h("EUR")), r({
273
273
  title: "Payment",
274
274
  message: /* @__PURE__ */ o(B, { children: [
275
- /* @__PURE__ */ a(h, { children: C === g ? "You will be charged $2 per annum for creating an E-Wallet. Please select the currency for the E-Wallet and proceed." : "You will be charged $12 per annum for creating a Virtual IBAN. Please select the currency for the Virtual IBAN and proceed." }),
276
- /* @__PURE__ */ o(
275
+ /* @__PURE__ */ a(f, { children: i === p ? "You will be charged $2 per annum for creating an E-Wallet. Please proceed to payment." : "You will be charged $12 per annum for creating a Virtual IBAN. Please select the currency for the Virtual IBAN and proceed." }),
276
+ i !== p && /* @__PURE__ */ o(
277
277
  Z,
278
278
  {
279
279
  defaultValue: "",
280
280
  onChange: (l) => {
281
- r.current = l.target.value, f(l.target.value);
281
+ t.current = l.target.value, h(l.target.value);
282
282
  },
283
283
  style: { marginTop: "10px" },
284
284
  displayEmpty: !0,
285
285
  fullWidth: !0,
286
286
  children: [
287
- /* @__PURE__ */ a(u, { value: "", children: "Select currency" }),
288
- /* @__PURE__ */ a(u, { value: "EUR", children: "EUR" }),
289
- /* @__PURE__ */ a(u, { value: "GBP", children: "GBP" })
287
+ /* @__PURE__ */ a(C, { value: "", children: "Select currency" }),
288
+ /* @__PURE__ */ a(C, { value: "EUR", children: "EUR" }),
289
+ /* @__PURE__ */ a(C, { value: "GBP", children: "GBP" })
290
290
  ]
291
291
  }
292
292
  )
@@ -299,57 +299,57 @@ const q = [
299
299
  closeModalConfirm: P,
300
300
  onConfirm: U,
301
301
  onCancel: () => {
302
- r.current = "", f(""), n.current = !1;
302
+ t.current = "", h(""), n.current = !1;
303
303
  },
304
304
  onClose: () => {
305
- r.current = "", n.current = !1;
305
+ t.current = "", n.current = !1;
306
306
  }
307
307
  });
308
308
  }, P = () => !n.current, U = () => {
309
- if (n.current = !1, !r.current)
310
- return n.current = !0, S({
311
- message: "Please select currency for Virtual IBAN."
309
+ if (n.current = !1, !t.current)
310
+ return n.current = !0, g({
311
+ message: i === p ? "Currency selection is missing." : "Please select currency for Virtual IBAN."
312
312
  }), !1;
313
- if (d.data.length > 0) {
314
- const e = d.data.find(
315
- (l) => l.currency === r.current
313
+ if (S.data.length > 0) {
314
+ const e = S.data.find(
315
+ (l) => l.currency === t.current
316
316
  );
317
317
  if (e != null && e.id)
318
- return n.current = !0, S({
319
- message: `You already have the ${r.current} Virtual IBAN.`
318
+ return n.current = !0, g({
319
+ message: `You already have the ${t.current} Virtual IBAN.`
320
320
  }), !1;
321
321
  }
322
- m(!0);
322
+ c(!0);
323
323
  };
324
324
  return L || N ? /* @__PURE__ */ a(B, { mt: 4, className: "flex-center", children: /* @__PURE__ */ a(W, { color: "primary", size: 50 }) }) : /* @__PURE__ */ o(v, { children: [
325
325
  /* @__PURE__ */ a(
326
- h,
326
+ f,
327
327
  {
328
- onClick: R,
328
+ onClick: A,
329
329
  component: "span",
330
330
  color: "primary",
331
331
  sx: { cursor: "pointer" },
332
332
  children: /* @__PURE__ */ o("span", { className: "text-underline", children: [
333
333
  "+ Add ",
334
- C === g ? "E-Wallet" : "Virtual IBAN"
334
+ i === p ? "E-Wallet" : "Virtual IBAN"
335
335
  ] })
336
336
  }
337
337
  ),
338
338
  /* @__PURE__ */ o(
339
339
  H,
340
340
  {
341
- open: A,
341
+ open: w,
342
342
  fullWidth: !0,
343
- onClose: () => m(!1),
343
+ onClose: () => c(!1),
344
344
  TransitionComponent: M,
345
345
  children: [
346
346
  /* @__PURE__ */ o($, { className: "buy-modal-text-color", children: [
347
- /* @__PURE__ */ a(h, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ a("strong", { children: "Payment" }) }),
347
+ /* @__PURE__ */ a(f, { variant: "subtitle1", component: "p", children: /* @__PURE__ */ a("strong", { children: "Payment" }) }),
348
348
  /* @__PURE__ */ a(
349
349
  j,
350
350
  {
351
351
  "aria-label": "close",
352
- onClick: () => m(!1),
352
+ onClick: () => c(!1),
353
353
  className: "menu-buttons",
354
354
  children: /* @__PURE__ */ a(D, {})
355
355
  }
@@ -367,7 +367,7 @@ const q = [
367
367
  checkoutKey: E,
368
368
  orderData: x,
369
369
  initPaymentRequest: T,
370
- backBtnFunc: () => m(!1)
370
+ backBtnFunc: () => c(!1)
371
371
  }
372
372
  )
373
373
  }
@@ -378,5 +378,5 @@ const q = [
378
378
  ] });
379
379
  };
380
380
  export {
381
- Aa as default
381
+ wa as default
382
382
  };
@@ -1,96 +1,118 @@
1
- import { jsx as e, jsxs as o, Fragment as u } from "react/jsx-runtime";
2
- import { useRef as D, useState as T, useEffect as b } from "react";
3
- import { I as q } from "../../../Info-BVeUSPyk.js";
4
- import { DIALOG_SUCCESS_ICON as w, FEATURE_EWALLET as f } from "../../../util/constants.js";
1
+ import { jsx as e, jsxs as t, Fragment as u } from "react/jsx-runtime";
2
+ import { useRef as W, useState as b, useEffect as w } from "react";
3
+ import { I as A } from "../../../Info-BVeUSPyk.js";
4
+ import { DIALOG_SUCCESS_ICON as N, FEATURE_EWALLET as d } from "../../../util/constants.js";
5
5
  import "../../../constants-t7n9qCW3.js";
6
- import { b as A } from "../../../order-jqH948WM.js";
7
- import { M as P } from "../../../tooltip-3UvETWtS.js";
8
- import R from "../Shared/noData.js";
9
- import W from "./createIban.js";
10
- import { AuthInnerContainer as _ } from "../Shared/Container/index.js";
6
+ import { b as T } from "../../../order-jqH948WM.js";
7
+ import { M as _ } from "../../../tooltip-3UvETWtS.js";
8
+ import q from "../Shared/noData.js";
9
+ import v from "./createIban.js";
10
+ import { AuthInnerContainer as R } from "../Shared/Container/index.js";
11
11
  import B from "./ibanItem.js";
12
12
  import { B as n } from "../../../Box-B0YSYLco.js";
13
- import { G as s } from "../../../Grid-CFe3amXO.js";
14
- import { T as L } from "../../../Typography-pAaje37G.js";
15
- import { I as N } from "../../../IconButton-DHm-hucF.js";
16
- import { C as v } from "../../../CircularProgress-xZA3lvba.js";
17
- const ee = ({
18
- dispatch: m,
19
- openDialog: c,
20
- baseUrl: i,
21
- checkoutSdkKey: d,
13
+ import { G as c } from "../../../Grid-CFe3amXO.js";
14
+ import { T as h } from "../../../Typography-pAaje37G.js";
15
+ import { I as L } from "../../../IconButton-DHm-hucF.js";
16
+ import { C as z } from "../../../CircularProgress-xZA3lvba.js";
17
+ const re = ({
18
+ dispatch: s,
19
+ openDialog: i,
20
+ baseUrl: m,
21
+ checkoutSdkKey: f,
22
22
  appKey: l,
23
- appKeyEur: h,
24
- paymentWidgetSrcUrl: y,
25
- iban: r,
23
+ appKeyEur: y,
24
+ paymentWidgetSrcUrl: x,
25
+ iban: a,
26
26
  navigate: I,
27
- AccountItem: x
27
+ AccountItem: g
28
28
  }) => {
29
- const p = r.data, C = r.loader, S = D(""), [g, E] = T("");
30
- return b(() => {
31
- new URLSearchParams(window.location.search).get("paymentStatus") === "success" && c({
29
+ const p = a.data, C = a.loader, E = W(""), [S, D] = b("");
30
+ return w(() => {
31
+ new URLSearchParams(window.location.search).get("paymentStatus") === "success" && i({
32
32
  title: "Payment Success",
33
33
  message: "We have received your payment and will generate your Virtual IBAN after the payment has processed",
34
- icon: w,
34
+ icon: N,
35
35
  width: "575px",
36
36
  confirmButtonText: "Continue"
37
37
  });
38
- }, []), /* @__PURE__ */ e(_, { children: /* @__PURE__ */ o(n, { p: 3, children: [
39
- /* @__PURE__ */ o(s, { spacing: 2, container: !0, alignItems: "center", children: [
40
- /* @__PURE__ */ o(s, { size: 8, children: [
41
- /* @__PURE__ */ e(L, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ e("strong", { children: "E-Wallet" }) }),
38
+ }, []), /* @__PURE__ */ e(R, { children: /* @__PURE__ */ t(n, { p: 3, children: [
39
+ /* @__PURE__ */ t(c, { spacing: 2, container: !0, alignItems: "center", children: [
40
+ /* @__PURE__ */ t(c, { size: 8, children: [
41
+ /* @__PURE__ */ e(h, { color: "primary", variant: "h6", component: "span", children: /* @__PURE__ */ e("strong", { children: "E-Wallet" }) }),
42
42
  /* @__PURE__ */ e(
43
- P,
43
+ _,
44
44
  {
45
45
  title: /* @__PURE__ */ e(n, { sx: { whiteSpace: "pre-line" }, children: "Create an E-Wallet. This requires KYC and an annual payment" }),
46
46
  placement: "bottom",
47
- children: /* @__PURE__ */ e(N, { className: "info-fee-icon", children: /* @__PURE__ */ e(q, { sx: { fontSize: "26px", color: "#D9D9D9" } }) })
47
+ children: /* @__PURE__ */ e(L, { className: "info-fee-icon", children: /* @__PURE__ */ e(A, { sx: { fontSize: "26px", color: "#D9D9D9" } }) })
48
48
  }
49
49
  )
50
50
  ] }),
51
- /* @__PURE__ */ e(s, { size: 4, children: /* @__PURE__ */ e(n, { sx: { textAlign: "right" }, children: /* @__PURE__ */ e(
52
- W,
51
+ /* @__PURE__ */ e(c, { size: 4, children: /* @__PURE__ */ e(n, { sx: { textAlign: "right" }, children: /* @__PURE__ */ e(
52
+ v,
53
53
  {
54
- openDialog: c,
55
- checkoutSdkKey: d,
56
- paymentRequest: (t) => {
57
- const a = {
54
+ openDialog: i,
55
+ checkoutSdkKey: f,
56
+ paymentRequest: (r) => {
57
+ const o = {
58
58
  payment: {
59
- token: t,
59
+ token: r,
60
60
  amount: 2,
61
61
  currency: "USD",
62
62
  app_key: l,
63
- success_url: `${i}/accounts?payment=success`,
64
- fail_url: `${i}/dashboard?payment=failed`
63
+ success_url: `${m}/accounts?payment=success`,
64
+ fail_url: `${m}/dashboard?payment=failed`
65
65
  },
66
- currency: g
66
+ currency: S
67
67
  };
68
- m(A(a));
68
+ s(T(o));
69
69
  },
70
- iban: r,
70
+ iban: a,
71
71
  navigate: I,
72
- currency: S,
73
- setIbanCurrency: E,
74
- from: f
72
+ currency: E,
73
+ setIbanCurrency: D,
74
+ from: d
75
75
  }
76
76
  ) }) })
77
77
  ] }),
78
- C ? /* @__PURE__ */ e(n, { mt: 4, className: "flex-center", children: /* @__PURE__ */ e(v, { color: "primary", size: 50 }) }) : /* @__PURE__ */ e(u, { children: p.length > 0 ? /* @__PURE__ */ e(u, { children: p.map((t, a) => /* @__PURE__ */ e(
79
- B,
80
- {
81
- data: t,
82
- AccountItem: x,
83
- dispatch: m,
84
- appKey: l,
85
- appKeyEur: h,
86
- paymentWidgetSrcUrl: y,
87
- iban: r,
88
- from: f
89
- },
90
- a
91
- )) }) : /* @__PURE__ */ e(R, { text: "You currently have no E-Wallets" }) })
78
+ C ? /* @__PURE__ */ e(n, { mt: 4, className: "flex-center", children: /* @__PURE__ */ e(z, { color: "primary", size: 50 }) }) : /* @__PURE__ */ t(u, { children: [
79
+ p.length > 0 ? /* @__PURE__ */ e(u, { children: p.map((r, o) => {
80
+ const P = {
81
+ ...r,
82
+ accountName: `E-Wallet - ${r.currency ?? ""}`
83
+ };
84
+ return /* @__PURE__ */ e(
85
+ B,
86
+ {
87
+ data: P,
88
+ AccountItem: g,
89
+ dispatch: s,
90
+ appKey: l,
91
+ appKeyEur: y,
92
+ paymentWidgetSrcUrl: x,
93
+ iban: a,
94
+ from: d
95
+ },
96
+ o
97
+ );
98
+ }) }) : /* @__PURE__ */ e(q, { text: "You currently have no E-Wallets" }),
99
+ /* @__PURE__ */ e(n, { mt: 3, textAlign: "center", children: /* @__PURE__ */ t(h, { variant: "caption", color: "secondary", children: [
100
+ "Powered by",
101
+ " ",
102
+ /* @__PURE__ */ e(
103
+ "a",
104
+ {
105
+ href: "https://everest.org/terms-of-use",
106
+ target: "_blank",
107
+ rel: "noopener noreferrer",
108
+ style: { color: "inherit", textDecoration: "underline" },
109
+ children: "EMI PF"
110
+ }
111
+ )
112
+ ] }) })
113
+ ] })
92
114
  ] }) });
93
115
  };
94
116
  export {
95
- ee as default
117
+ re as default
96
118
  };
@@ -6,7 +6,7 @@ import { l as dA } from "../../../order-jqH948WM.js";
6
6
  import { c as xA } from "../../../stake-Dcq6QpaA.js";
7
7
  import { useState as r, useEffect as M, createRef as K } from "react";
8
8
  import { u as m } from "../../../react-redux-C7I9-1M6.js";
9
- import { s as I, T as F } from "../../../tokenRow-D32W5WH3.js";
9
+ import { s as I, T as F } from "../../../tokenRow-B-tustzZ.js";
10
10
  import { C as CA } from "../../../ContentCopy-coPwrEuz.js";
11
11
  import { displayWalletAddress as XA, getNetworkOptions as J, getCurrencySymbol as uA, tokenBalanceDisplay as qA } from "../../../util/functions.js";
12
12
  import EA from "../../../hoc/withThemeProvider.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../../generic-token-B_ptO5yb.js";
4
4
  import "../../../util/constants.js";
5
- import { T as l } from "../../../tokenRow-D32W5WH3.js";
5
+ import { T as l } from "../../../tokenRow-B-tustzZ.js";
6
6
  import "../../../util/conversions.js";
7
7
  import "../Shared/appButton.js";
8
8
  import "../../../Grid-CFe3amXO.js";
@@ -11,7 +11,7 @@ import './assets/tokenRow.css';const h = {
11
11
  "dropdown-list-item": "_dropdown-list-item_1ehfm_19",
12
12
  "balance-item": "_balance-item_1ehfm_31",
13
13
  "crdt-links": "_crdt-links_1ehfm_57"
14
- }, Q = ({
14
+ }, K = ({
15
15
  token: s,
16
16
  currencyData: c,
17
17
  fiatBalance: x,
@@ -27,10 +27,12 @@ import './assets/tokenRow.css';const h = {
27
27
  m && i.wallets && (F((r) => !r), _(o ? [] : i.wallets));
28
28
  }, T = (i, r) => {
29
29
  i.stopPropagation(), D("/withdraw", r);
30
- }, C = (i) => {
30
+ }, E = (i) => {
31
31
  switch (i) {
32
32
  case "ID":
33
33
  return "Everest ID";
34
+ case "EUR.c":
35
+ return "Euro";
34
36
  case "CRDT":
35
37
  return c.label;
36
38
  default:
@@ -50,7 +52,7 @@ import './assets/tokenRow.css';const h = {
50
52
  default:
51
53
  return { se: i + "_" + r };
52
54
  }
53
- }, E = s.symbol.replace(".c", "");
55
+ }, C = s.symbol.replace(".c", "");
54
56
  return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ t(
55
57
  l,
56
58
  {
@@ -76,7 +78,7 @@ import './assets/tokenRow.css';const h = {
76
78
  ) : /* @__PURE__ */ e("img", { src: b, width: 40, height: 40 }),
77
79
  " ",
78
80
  /* @__PURE__ */ t("span", { children: [
79
- /* @__PURE__ */ e("strong", { children: C(s.symbol) }),
81
+ /* @__PURE__ */ e("strong", { children: E(s.symbol) }),
80
82
  R && s.symbol === "EUR.c" ? /* @__PURE__ */ e("span", { className: h["crdt-links"], children: /* @__PURE__ */ e(
81
83
  "span",
82
84
  {
@@ -164,7 +166,7 @@ import './assets/tokenRow.css';const h = {
164
166
  }
165
167
  )
166
168
  ] }, r)),
167
- o && f && !f.includes(E) ? /* @__PURE__ */ t(u, { children: [
169
+ o && f && !f.includes(C) ? /* @__PURE__ */ t(u, { children: [
168
170
  /* @__PURE__ */ e(N, { sx: { width: "100%", mt: 1 } }),
169
171
  /* @__PURE__ */ e(l, { container: !0, sx: { width: "100%" }, children: /* @__PURE__ */ e(l, { className: "flex-center", size: 12, children: /* @__PURE__ */ e(
170
172
  G,
@@ -181,6 +183,6 @@ import './assets/tokenRow.css';const h = {
181
183
  ) });
182
184
  };
183
185
  export {
184
- Q as T,
186
+ K as T,
185
187
  h as s
186
188
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everest-npm-features",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "Everest frontend features library.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",