everest-npm-features 0.0.22 → 0.0.23

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,105 +1,107 @@
1
- import { jsxs as n, Fragment as b, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as n, Fragment as C, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as t, useEffect as c } from "react";
3
- import { E as W } from "../../../../ErrorOutline-CnwdlXPx.js";
4
- import { s as C, p as H, h as K, v as q } from "../../../../index-ceeCtFuh.js";
5
- import D from "../backBtn.js";
6
- import { removeExtraSpace as G } from "../../../../util/functions.js";
7
- import { VISA_ICON as J } from "../../../../util/constants.js";
8
- import Q from "../Input/index.js";
9
- import R from "../appButton.js";
3
+ import { E as D } from "../../../../ErrorOutline-CnwdlXPx.js";
4
+ import { s as x, p as W, h as $, v as H } from "../../../../index-ceeCtFuh.js";
5
+ import K from "../backBtn.js";
6
+ import { removeExtraSpace as R } from "../../../../util/functions.js";
7
+ import { CARD_PAYMENT_DECLINE as q, VISA_ICON as G } from "../../../../util/constants.js";
8
+ import J from "../Input/index.js";
9
+ import Q from "../appButton.js";
10
10
  import { useSnackBarContext as U } from "../../../../context/snackBarContext.js";
11
- import { T as x } from "../../../../Typography-Ds4fpvK8.js";
11
+ import { T as y } from "../../../../Typography-Ds4fpvK8.js";
12
12
  import { B as m } from "../../../../Box-Be0E_-eR.js";
13
- import { C as y } from "../../../../CircularProgress-fePUtoaj.js";
14
- const ce = ({
15
- checkoutKey: k,
16
- orderData: v,
17
- backBtnFunc: V,
18
- initPaymentRequest: E
13
+ import { C as k } from "../../../../CircularProgress-fePUtoaj.js";
14
+ const me = ({
15
+ checkoutKey: v,
16
+ orderData: E,
17
+ backBtnFunc: N,
18
+ initPaymentRequest: P
19
19
  }) => {
20
- const { showAlertMessage: P } = U(), a = v.payment, [I, N] = t(!0), [i, B] = t(""), [O, S] = t(!1), [L, w] = t({
20
+ const { showAlertMessage: p } = U(), a = E.payment, [V, I] = t(!0), [i, B] = t(""), [L, O] = t(!1), [S, A] = t({
21
21
  name: "",
22
22
  billingAddress: {
23
23
  addressLine1: ""
24
24
  }
25
- }), [z, p] = t(!1), [l, h] = t(!0), [f, M] = t(!0), [u, T] = t(!0), [g, A] = t(!0);
25
+ }), [M, h] = t(!1), [l, f] = t(!0), [u, T] = t(!0), [g, _] = t(!0), [b, w] = t(!0);
26
26
  c(() => {
27
27
  var e, o, s, d;
28
- (o = (e = a == null ? void 0 : a._links) == null ? void 0 : e.redirect) != null && o.href && window.location.replace((d = (s = a == null ? void 0 : a._links) == null ? void 0 : s.redirect) == null ? void 0 : d.href);
28
+ (o = (e = a == null ? void 0 : a._links) == null ? void 0 : e.redirect) != null && o.href && window.location.replace((d = (s = a == null ? void 0 : a._links) == null ? void 0 : s.redirect) == null ? void 0 : d.href), a.status === q && p({
29
+ message: `Error processing card: (${a.response_code})${a.response_summary}`
30
+ });
29
31
  }, [a]), c(() => {
30
- w({
32
+ A({
31
33
  name: i,
32
34
  billingAddress: {
33
35
  addressLine1: ""
34
36
  }
35
37
  });
36
38
  }, [i]), c(() => {
37
- !f && !u && !g && i !== "" ? l && h(!1) : l || h(!0);
38
- }, [i, f, u, g]);
39
- const F = (e, o, s, d = /./) => {
39
+ !u && !g && !b && i !== "" ? l && f(!1) : l || f(!0);
40
+ }, [i, u, g, b]);
41
+ const z = (e, o, s, d = /./) => {
40
42
  if (e !== "" && !d.test(e))
41
43
  return !1;
42
44
  o(e);
43
- const j = typeof e == "string" ? G(e) : e;
45
+ const j = typeof e == "string" ? R(e) : e;
44
46
  s(!j);
45
47
  }, Y = (e) => {
46
48
  if (e && e.element)
47
49
  switch (e.element) {
48
50
  case "card-number":
49
- M(e.isEmpty || !e.isValid);
51
+ T(e.isEmpty || !e.isValid);
50
52
  break;
51
53
  case "expiry-date":
52
- T(e.isEmpty || !e.isValid);
54
+ _(e.isEmpty || !e.isValid);
53
55
  break;
54
56
  case "cvv":
55
- A(e.isEmpty || !e.isValid);
57
+ w(e.isEmpty || !e.isValid);
56
58
  break;
57
59
  default:
58
60
  console.log("NOOP");
59
61
  break;
60
62
  }
61
- }, _ = (e) => {
63
+ }, F = (e) => {
62
64
  if (e === "") {
63
- P({ message: "Error processing card" }), p(!1);
65
+ p({ message: "Error processing card" }), h(!1);
64
66
  return;
65
67
  }
66
- E(e);
68
+ P(e);
67
69
  };
68
- return /* @__PURE__ */ n(b, { children: [
70
+ return /* @__PURE__ */ n(C, { children: [
69
71
  /* @__PURE__ */ r(
70
- D,
72
+ K,
71
73
  {
72
- onClickHandler: V,
74
+ onClickHandler: N,
73
75
  backBtnText: "Payment Information"
74
76
  }
75
77
  ),
76
- /* @__PURE__ */ n(x, { className: "text-center", variant: "subtitle1", mt: 2, children: [
77
- /* @__PURE__ */ r("img", { src: J, width: 140, alt: "Debit Card" }),
78
+ /* @__PURE__ */ n(y, { className: "text-center", variant: "subtitle1", mt: 2, children: [
79
+ /* @__PURE__ */ r("img", { src: G, width: 140, alt: "Debit Card" }),
78
80
  /* @__PURE__ */ r("br", {}),
79
81
  /* @__PURE__ */ r("b", { children: "Debit Card" })
80
82
  ] }),
81
83
  /* @__PURE__ */ n(
82
- x,
84
+ y,
83
85
  {
84
86
  className: "text-center d-flex items-center",
85
87
  variant: "caption",
86
88
  mt: 2,
87
89
  children: [
88
- /* @__PURE__ */ r(W, {}),
90
+ /* @__PURE__ */ r(D, {}),
89
91
  "   ",
90
92
  /* @__PURE__ */ r("b", { style: { marginTop: "3px" }, children: "Fiat purchasing is not available for users with Chase and Citi bank accounts" })
91
93
  ]
92
94
  }
93
95
  ),
94
- I && /* @__PURE__ */ r(m, { className: "text-center", mt: 8, children: /* @__PURE__ */ r(y, {}) }),
96
+ V && /* @__PURE__ */ r(m, { className: "text-center", mt: 8, children: /* @__PURE__ */ r(k, {}) }),
95
97
  /* @__PURE__ */ r(m, { mt: 2, children: /* @__PURE__ */ n(
96
- C,
98
+ x,
97
99
  {
98
100
  config: {
99
101
  debug: !1,
100
- publicKey: k,
102
+ publicKey: v,
101
103
  acceptedPaymentMethods: ["Visa", "Mastercard"],
102
- cardholder: L,
104
+ cardholder: S,
103
105
  localization: {
104
106
  cardNumberPlaceholder: "Card number",
105
107
  expiryMonthPlaceholder: "MM",
@@ -135,32 +137,32 @@ const ce = ({
135
137
  }
136
138
  },
137
139
  ready: () => {
138
- N(!1);
140
+ I(!1);
139
141
  },
140
142
  frameValidationChanged: (e) => {
141
143
  Y(e);
142
144
  },
143
145
  cardSubmitted: () => {
144
- p(!0);
146
+ h(!0);
145
147
  },
146
148
  cardTokenized: (e) => {
147
- _(e.token);
149
+ F(e.token);
148
150
  },
149
151
  cardTokenizationFailed: (e) => {
150
152
  alert("card tokenization failed"), console.log(e);
151
153
  },
152
154
  children: [
153
155
  /* @__PURE__ */ r(
154
- Q,
156
+ J,
155
157
  {
156
158
  label: "Name on Card",
157
159
  value: i,
158
- onChange: (e) => F(e.target.value, B, S),
159
- error: O
160
+ onChange: (e) => z(e.target.value, B, O),
161
+ error: L
160
162
  }
161
163
  ),
162
164
  /* @__PURE__ */ r(
163
- H,
165
+ W,
164
166
  {
165
167
  style: {
166
168
  height: "4em",
@@ -171,7 +173,7 @@ const ce = ({
171
173
  }
172
174
  ),
173
175
  /* @__PURE__ */ r(
174
- K,
176
+ $,
175
177
  {
176
178
  style: {
177
179
  height: "4em",
@@ -182,7 +184,7 @@ const ce = ({
182
184
  }
183
185
  ),
184
186
  /* @__PURE__ */ r(
185
- q,
187
+ H,
186
188
  {
187
189
  style: {
188
190
  height: "4em",
@@ -193,15 +195,15 @@ const ce = ({
193
195
  }
194
196
  ),
195
197
  /* @__PURE__ */ r(
196
- R,
198
+ Q,
197
199
  {
198
200
  onClick: () => {
199
- C.submitCard();
201
+ x.submitCard();
200
202
  },
201
203
  fullWidth: !0,
202
204
  disabled: l,
203
- children: /* @__PURE__ */ r("strong", { children: z ? /* @__PURE__ */ n(b, { children: [
204
- /* @__PURE__ */ r(y, { size: 15, color: "inherit" }),
205
+ children: /* @__PURE__ */ r("strong", { children: M ? /* @__PURE__ */ n(C, { children: [
206
+ /* @__PURE__ */ r(k, { size: 15, color: "inherit" }),
205
207
  " Processing..."
206
208
  ] }) : "Pay" })
207
209
  }
@@ -213,5 +215,5 @@ const ce = ({
213
215
  ] });
214
216
  };
215
217
  export {
216
- ce as default
218
+ me as default
217
219
  };
@@ -83,6 +83,4 @@ export declare const KYC_OVER_TRANSATION = "Over $10,000";
83
83
  export declare const KYC_BETWEEN_TRANSATION = "Over $1,000 & Under $10,000";
84
84
  export declare const KYC_UNDER_TRANSATION = "Under $1,000";
85
85
  export declare const KYC_STATUS_IN_PROGRESS = "IN_PROGRESS";
86
- export declare const INCODE_API_KEY = "947ac3fa55ba78c57f274c042492b76f35733560";
87
- export declare const INCODE_API_URL = "https://demo-api.incodesmile.com/";
88
- export declare const INCODE_ONBOARDING_URL = "https://demo-onboarding.incodesmile.com/";
86
+ export declare const CARD_PAYMENT_DECLINE = "Declined";
@@ -1,12 +1,13 @@
1
- const n = "https://static-assets.everest.org", s = n + "/web/widget", _ = n + "/web/wallet/images", t = _ + "/new", e = t + "/sell-withdraw.png", o = t + "/back-btn.png", E = t + "/delete.png", c = t + "/history-buy.png", T = t + "/history-sell.png", A = t + "/history-swap.png", a = t + "/wallet-icon.png", I = t + "/stake-id.png", S = _ + "/stake-gem.png", N = t + "/icon-arrow.png", O = t + "/sepa-payment.png", R = t + "/sepa-payment-selected.png", r = t + "/visa-payment.png", i = t + "/visa-payment-selected.png", L = t + "/sepa.png", C = t + "/visa.png", D = t + "/dialog-error.png", P = t + "/dialog-success.png", d = "railsbank", p = "open_payd", Y = "checkout", K = "trustpayments", M = "paysafe", l = "$", g = "€", m = "USD", h = "EUR", y = "Binance", U = "Polygon", B = "EverChain", u = "IDChain", W = "Ethereum", G = "Avalanche", b = "USD.c", v = "EUR.c", w = "BTC.c", k = "GEMS.c", V = "ID", H = "GEMS", f = "USDR.c", F = "fiat_to_token", X = "fiat_to_everid", $ = "token_to_fiat", x = "token_to_token", j = "withdraw", z = "iban_creation", Z = "bank_transfer", q = "bank_deposit", J = "Created", Q = "In Process", tt = "Completed", nt = "Failed", _t = "Awaiting Approved", st = "Rejected", et = "ID", ot = "GEMS", Et = 90, ct = 3, Tt = 180, At = 8, at = 365, It = 18, St = 365, Nt = 20, Ot = "Linked Wallets make transactions easier, automating the signing process during Sell, Swap, Stake, Send and Remit transactions because you have backed up your Private Key with Everest.", Rt = "Connected Wallets are those that you have demonstrated you control, but you must manually move tokens as the system can not do so without the Private Key.", rt = "The rate shown here is an estimate and the rate you receive will be determined at the time when your payment is settled. The time taken for your payment to settle can vary depending on currency and payment method.", it = 300, Lt = "username can only contain letters, numbers, underscores & cannot exceed more than 13 characters", Ct = "_rr", Dt = "credit_debit_card", Pt = "sepa_bank_transfer", dt = "player", pt = "store", Yt = "login_screen", Kt = "register_screen", Mt = "Individual", lt = "Organization", gt = "Over $10,000", mt = "Over $1,000 & Under $10,000", ht = "Under $1,000", yt = "IN_PROGRESS", Ut = "947ac3fa55ba78c57f274c042492b76f35733560", Bt = "https://demo-api.incodesmile.com/", ut = "https://demo-onboarding.incodesmile.com/";
1
+ const n = "https://static-assets.everest.org", e = n + "/web/widget", _ = n + "/web/wallet/images", t = _ + "/new", s = t + "/sell-withdraw.png", o = t + "/back-btn.png", E = t + "/delete.png", c = t + "/history-buy.png", T = t + "/history-sell.png", A = t + "/history-swap.png", a = t + "/wallet-icon.png", I = t + "/stake-id.png", S = _ + "/stake-gem.png", N = t + "/icon-arrow.png", O = t + "/sepa-payment.png", R = t + "/sepa-payment-selected.png", r = t + "/visa-payment.png", i = t + "/visa-payment-selected.png", L = t + "/sepa.png", C = t + "/visa.png", D = t + "/dialog-error.png", P = t + "/dialog-success.png", p = "railsbank", Y = "open_payd", d = "checkout", M = "trustpayments", K = "paysafe", l = "$", g = "€", y = "USD", h = "EUR", m = "Binance", U = "Polygon", B = "EverChain", u = "IDChain", W = "Ethereum", G = "Avalanche", v = "USD.c", w = "EUR.c", k = "BTC.c", V = "GEMS.c", b = "ID", H = "GEMS", F = "USDR.c", f = "fiat_to_token", X = "fiat_to_everid", $ = "token_to_fiat", x = "token_to_token", j = "withdraw", z = "iban_creation", Z = "bank_transfer", q = "bank_deposit", J = "Created", Q = "In Process", tt = "Completed", nt = "Failed", _t = "Awaiting Approved", et = "Rejected", st = "ID", ot = "GEMS", Et = 90, ct = 3, Tt = 180, At = 8, at = 365, It = 18, St = 365, Nt = 20, Ot = "Linked Wallets make transactions easier, automating the signing process during Sell, Swap, Stake, Send and Remit transactions because you have backed up your Private Key with Everest.", Rt = "Connected Wallets are those that you have demonstrated you control, but you must manually move tokens as the system can not do so without the Private Key.", rt = "The rate shown here is an estimate and the rate you receive will be determined at the time when your payment is settled. The time taken for your payment to settle can vary depending on currency and payment method.", it = 300, Lt = "username can only contain letters, numbers, underscores & cannot exceed more than 13 characters", Ct = "_rr", Dt = "credit_debit_card", Pt = "sepa_bank_transfer", pt = "player", Yt = "store", dt = "login_screen", Mt = "register_screen", Kt = "Individual", lt = "Organization", gt = "Over $10,000", yt = "Over $1,000 & Under $10,000", ht = "Under $1,000", mt = "IN_PROGRESS", Ut = "Declined";
2
2
  export {
3
3
  N as ARROW_ICON,
4
4
  G as AVALANCHE_NETWORK,
5
5
  o as BACK_BTN_ICON,
6
6
  q as BANK_DEPOSIT,
7
7
  Z as BANK_TRANSFER,
8
- y as BINANCE_NETWORK,
9
- w as BTC_TOKEN_SYMBOL,
8
+ m as BINANCE_NETWORK,
9
+ k as BTC_TOKEN_SYMBOL,
10
+ Ut as CARD_PAYMENT_DECLINE,
10
11
  Rt as CONNECTED_WALLET_TOOLTIP,
11
12
  E as DELETE_ICON,
12
13
  D as DIALOG_ERROR_ICON,
@@ -17,41 +18,38 @@ export {
17
18
  g as EURO_SIGN,
18
19
  B as EVER_CHAIN_NETWORK,
19
20
  X as FIAT_TO_EVER_ID,
20
- F as FIAT_TO_TOKEN,
21
+ f as FIAT_TO_TOKEN,
21
22
  j as FIAT_WITHDRAW,
22
23
  ot as GEMS_STAKE,
23
24
  H as GEMS_TOKEN_SYMBOL,
24
- k as GEM_SYNTHETIC_TOKEN_SYMBOL,
25
+ V as GEM_SYNTHETIC_TOKEN_SYMBOL,
25
26
  c as HISTORY_BUY_ICON,
26
27
  T as HISTORY_SELL_ICON,
27
28
  A as HISTORY_SWAP_ICON,
28
29
  z as IBAN_CREATION,
29
30
  u as ID_CHAIN_NETWORK,
30
- et as ID_STAKE,
31
- V as ID_TOKEN_SYMBOL,
32
- Ut as INCODE_API_KEY,
33
- Bt as INCODE_API_URL,
34
- ut as INCODE_ONBOARDING_URL,
35
- Mt as INDIVIDUAL_KYC_TYPE,
36
- mt as KYC_BETWEEN_TRANSATION,
31
+ st as ID_STAKE,
32
+ b as ID_TOKEN_SYMBOL,
33
+ Kt as INDIVIDUAL_KYC_TYPE,
34
+ yt as KYC_BETWEEN_TRANSATION,
37
35
  gt as KYC_OVER_TRANSATION,
38
- yt as KYC_STATUS_IN_PROGRESS,
36
+ mt as KYC_STATUS_IN_PROGRESS,
39
37
  ht as KYC_UNDER_TRANSATION,
40
38
  Ot as LINKED_WALLET_TOOLTIP,
41
- Yt as LOGIN_SCREEN,
39
+ dt as LOGIN_SCREEN,
42
40
  lt as ORGANIZATION_KYC_TYPE,
43
41
  Pt as PAYMENT_BANK,
44
42
  Dt as PAYMENT_CARD,
45
- Y as PAYMENT_PROVIDER_CHECKOUT,
46
- p as PAYMENT_PROVIDER_OPENPAYD,
47
- M as PAYMENT_PROVIDER_PAYSAFE,
48
- d as PAYMENT_PROVIDER_RAILSBANK,
49
- K as PAYMENT_PROVIDER_TRUST_PAYMENTS,
50
- dt as PLAYER_WEBSITE,
43
+ d as PAYMENT_PROVIDER_CHECKOUT,
44
+ Y as PAYMENT_PROVIDER_OPENPAYD,
45
+ K as PAYMENT_PROVIDER_PAYSAFE,
46
+ p as PAYMENT_PROVIDER_RAILSBANK,
47
+ M as PAYMENT_PROVIDER_TRUST_PAYMENTS,
48
+ pt as PLAYER_WEBSITE,
51
49
  U as POLYGON_NETWORK,
52
- Kt as REGISTER_SCREEN,
50
+ Mt as REGISTER_SCREEN,
53
51
  it as RESEND_EMAIL_TIMER,
54
- e as SELL_WITHDRAW_ICON,
52
+ s as SELL_WITHDRAW_ICON,
55
53
  L as SEPA_ICON,
56
54
  O as SEPA_PAYMENT,
57
55
  R as SEPA_PAYMENT_ACTIVE,
@@ -66,26 +64,26 @@ export {
66
64
  ct as STAKE_ID_MIN_APY,
67
65
  Et as STAKE_ID_MIN_DAYS,
68
66
  n as STATIC_ASSETS_BASE_URL,
69
- pt as STORE_WEBSITE,
70
- v as SYNTHETIC_EUR,
71
- b as SYNTHETIC_USD,
67
+ Yt as STORE_WEBSITE,
68
+ w as SYNTHETIC_EUR,
69
+ v as SYNTHETIC_USD,
72
70
  $ as TOKEN_TO_FIAT,
73
71
  x as TOKEN_TO_TOKEN,
74
72
  tt as TS_COMPLETE_LABEL,
75
73
  J as TS_CREATED_LABEL,
76
74
  nt as TS_FAIL_LABEL,
77
- st as TS_NOT_APPROVAL_LABEL,
75
+ et as TS_NOT_APPROVAL_LABEL,
78
76
  Q as TS_PENDING_LABEL,
79
77
  _t as TS_WAIT_APPROVAL_LABEL,
80
- f as USDR_TOKEN_SYMBOL,
78
+ F as USDR_TOKEN_SYMBOL,
81
79
  Ct as USERNAME_SUFFIX,
82
80
  Lt as USERNAME_TOOLTIP,
83
- m as US_DOLLAR_ISO3,
81
+ y as US_DOLLAR_ISO3,
84
82
  l as US_DOLLAR_SIGN,
85
83
  C as VISA_ICON,
86
84
  r as VISA_PAYMENT,
87
85
  i as VISA_PAYMENT_ACTIVE,
88
86
  a as WALLET_ICON,
89
87
  _ as WALLET_IMAGES_URL,
90
- s as WIDGET_URL
88
+ e as WIDGET_URL
91
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everest-npm-features",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Everest frontend features library.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -32,7 +32,7 @@
32
32
  "@mui/icons-material": "^6.0.2",
33
33
  "@mui/material": "^6.0.2",
34
34
  "@walletconnect/ethereum-provider": "^2.17.1",
35
- "everest-npm-api": "^0.0.17",
35
+ "everest-npm-api": "^0.0.18",
36
36
  "frames-react": "^1.2.2",
37
37
  "moment": "^2.30.1",
38
38
  "mui-one-time-password-input": "^5.0.0",