everest-npm-features 0.0.1 → 0.0.2
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.
- package/dist/ArrowDropDown-DRUQbGft.js +8 -0
- package/dist/ArrowRight-t-YgAHUn.js +8 -0
- package/dist/{Box-wAem3MQD.js → Box-BOgpENcC.js} +11 -11
- package/dist/{Button-fWdSk-yh.js → Button-DXdgxFxa.js} +8 -7
- package/dist/{ButtonBase-SYP7klDp.js → ButtonBase-AOLUTpPg.js} +204 -211
- package/dist/Cancel-BMPJ8ZAg.js +11 -0
- package/dist/CardContent-DEA5pnhr.js +141 -0
- package/dist/{CircularProgress-DcXA6nAu.js → CircularProgress-BAEiXRSn.js} +31 -30
- package/dist/Close-mXCsZSxZ.js +8 -0
- package/dist/{Container-CIMHcpEe.js → Container-BOehNoF1.js} +4 -4
- package/dist/{ContentCopy-CexUUXuC.js → ContentCopy-HD_Xx6nx.js} +1 -1
- package/dist/{createSimplePaletteValueFilter-CsgjlRAs.js → DefaultPropsProvider-DmUB0SYC.js} +54 -69
- package/dist/DefaultPropsProvider-tqUom3mB.js +329 -0
- package/dist/{DialogContent-JgT9A6nk.js → DialogContent-zttWtNJM.js} +91 -90
- package/dist/{Close-CdRA3xUs.js → DialogTitle-BqL8DXBp.js} +16 -21
- package/dist/{ArrowRight-C6tjImpU.js → Divider-EGEkrkBH.js} +50 -55
- package/dist/{FormControl-D4QuPCnV.js → FormControl-Nd-4LC8N.js} +60 -69
- package/dist/FormControlLabel-BMeMEwyK.js +738 -0
- package/dist/{GlobalStyles-BOnEiMUE.js → GlobalStyles-CModZHM-.js} +2 -2
- package/dist/{Grid-dtT_MVn3.js → Grid-EISqvBSJ.js} +5 -5
- package/dist/Grid2-B0mJbwjl.js +374 -0
- package/dist/{Grow-B3Swdn2Z.js → Grow-dkRwE_ok.js} +5 -5
- package/dist/{IconButton-CRGy76pJ.js → IconButton-DAR3jsEV.js} +12 -11
- package/dist/Info-CkE3Gsf2.js +8 -0
- package/dist/InputAdornment-DZJP9Njd.js +169 -0
- package/dist/ListItemIcon-JAntieDc.js +82 -0
- package/dist/{wallet-DN7ej6mj.js → MenuItem-D12FP5Iq.js} +64 -75
- package/dist/{Modal-0q_y4zbS.js → Modal-DceAu_d2.js} +324 -397
- package/dist/Paper-L8ipwfkc.js +183 -0
- package/dist/PlayArrow-D98xCL5M.js +21 -0
- package/dist/Portal-DxdKGEvu.js +86 -0
- package/dist/{Select-BNAaKK32.js → Select-DTQDmdn_.js} +39 -33
- package/dist/{Slide-BlS6unRJ.js → Slide-CWqC2RDG.js} +4 -3
- package/dist/Stack-CkCveRRR.js +174 -0
- package/dist/{TextField-CPZo0_di.js → TextField-BqIvz6Zw.js} +23 -21
- package/dist/{Typography-kyxogyUq.js → Typography-Dx54MRM5.js} +14 -13
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -0
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index3.css +1 -0
- package/dist/assets/index4.css +1 -0
- package/dist/assets/index5.css +1 -0
- package/dist/assets/index6.css +1 -0
- package/dist/assets/index7.css +1 -0
- package/dist/assets/index8.css +1 -0
- package/dist/assets/index9.css +1 -0
- package/dist/assets/{withThemeProvider.css → main.css} +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles3.css +1 -0
- package/dist/auth-AwdxCQXF.js +46 -0
- package/dist/axios-BEX6n2A7.js +796 -0
- package/dist/bank-D2rGgUDP.js +23 -0
- package/dist/components/Account/index.d.ts +4 -0
- package/dist/components/Account/index.js +310 -0
- package/dist/components/History/index.d.ts +2 -0
- package/dist/components/History/index.js +804 -0
- package/dist/components/MoveToEthereumOrEverChain/index.d.ts +18 -0
- package/dist/components/MoveToEthereumOrEverChain/index.js +345 -0
- package/dist/components/Profile/documents.js +19 -14
- package/dist/components/Profile/index.js +128 -135
- package/dist/components/Receive/index.js +25 -23
- package/dist/components/RocketRamp/Buy/cardPayment.d.ts +3 -0
- package/dist/components/RocketRamp/Buy/cardPayment.js +17 -0
- package/dist/components/RocketRamp/Buy/confirmTransaction.d.ts +3 -0
- package/dist/components/RocketRamp/Buy/confirmTransaction.js +16 -0
- package/dist/components/RocketRamp/Buy/form.d.ts +3 -0
- package/dist/components/RocketRamp/Buy/form.js +26 -0
- package/dist/components/RocketRamp/Buy/index.d.ts +6 -0
- package/dist/components/RocketRamp/Buy/index.js +29 -0
- package/dist/components/RocketRamp/Buy/types.d.ts +32 -0
- package/dist/components/RocketRamp/Buy/types.js +1 -0
- package/dist/components/RocketRamp/Dashboard/balance.d.ts +9 -0
- package/dist/components/RocketRamp/Dashboard/balance.js +75 -0
- package/dist/components/RocketRamp/Dashboard/index.d.ts +5 -0
- package/dist/components/RocketRamp/Dashboard/index.js +36 -0
- package/dist/components/RocketRamp/Dashboard/transaction.d.ts +8 -0
- package/dist/components/RocketRamp/Dashboard/transaction.js +28 -0
- package/dist/components/RocketRamp/MinimalKyc/index.d.ts +6 -0
- package/dist/components/RocketRamp/MinimalKyc/index.js +254 -0
- package/dist/components/RocketRamp/Shared/Button/index.d.ts +10 -0
- package/dist/components/RocketRamp/Shared/Button/index.js +82 -0
- package/dist/components/RocketRamp/Shared/Input/index.d.ts +11 -0
- package/dist/components/RocketRamp/Shared/Input/index.js +46 -0
- package/dist/components/RocketRamp/Shared/backBtn.d.ts +5 -0
- package/dist/components/RocketRamp/Shared/backBtn.js +21 -0
- package/dist/components/RocketRamp/Shared/transactionItem.d.ts +7 -0
- package/dist/components/RocketRamp/Shared/transactionItem.js +125 -0
- package/dist/components/RocketRamp/SignIn/index.d.ts +3 -0
- package/dist/components/RocketRamp/SignIn/index.js +82 -0
- package/dist/components/RocketRamp/SignIn/loginForm.d.ts +3 -0
- package/dist/components/RocketRamp/SignIn/loginForm.js +81 -0
- package/dist/components/RocketRamp/SignIn/otpForm.d.ts +3 -0
- package/dist/components/RocketRamp/SignIn/otpForm.js +112 -0
- package/dist/components/RocketRamp/SignIn/types.d.ts +22 -0
- package/dist/components/RocketRamp/SignIn/types.js +1 -0
- package/dist/components/RocketRamp/SignUp/email.d.ts +3 -0
- package/dist/components/RocketRamp/SignUp/email.js +70 -0
- package/dist/components/RocketRamp/SignUp/index.d.ts +3 -0
- package/dist/components/RocketRamp/SignUp/index.js +163 -0
- package/dist/components/RocketRamp/SignUp/personalInfo.d.ts +3 -0
- package/dist/components/RocketRamp/SignUp/personalInfo.js +415 -0
- package/dist/components/RocketRamp/SignUp/summary.d.ts +3 -0
- package/dist/components/RocketRamp/SignUp/summary.js +57 -0
- package/dist/components/RocketRamp/SignUp/types.d.ts +50 -0
- package/dist/components/RocketRamp/SignUp/types.js +1 -0
- package/dist/components/RocketRamp/SignUp/validateEmail.d.ts +3 -0
- package/dist/components/RocketRamp/SignUp/validateEmail.js +99 -0
- package/dist/components/RocketRamp/Transactions/index.d.ts +5 -0
- package/dist/components/RocketRamp/Transactions/index.js +38 -0
- package/dist/components/Send/index.js +62 -51
- package/dist/components/Shared/ConnectWallet/index.d.ts +20 -0
- package/dist/components/Shared/ConnectWallet/index.js +25364 -0
- package/dist/components/Shared/HistoryItem/index.d.ts +5 -0
- package/dist/components/Shared/HistoryItem/index.js +120 -0
- package/dist/components/Shared/Keyboard/keyboard.js +3 -3
- package/dist/components/Shared/TokenModal/index.d.ts +10 -0
- package/dist/components/Shared/TokenModal/index.js +104 -0
- package/dist/components/Shared/TokenModal/tokenGrid.d.ts +7 -0
- package/dist/components/Shared/TokenModal/tokenGrid.js +51 -0
- package/dist/components/Shared/addBank.d.ts +2 -0
- package/dist/components/Shared/addBank.js +172 -0
- package/dist/components/Shared/button.js +1 -1
- package/dist/components/Shared/connectPlaidBank.d.ts +2 -0
- package/dist/components/Shared/connectPlaidBank.js +57 -0
- package/dist/components/Shared/incode.js +34 -32
- package/dist/components/Shared/inputField.js +1 -1
- package/dist/components/Shared/noData.d.ts +4 -0
- package/dist/components/Shared/noData.js +14 -0
- package/dist/components/Shared/pin.js +3 -3
- package/dist/components/Shared/step.js +2 -2
- package/dist/components/Shared/tooltip.d.ts +4 -0
- package/dist/components/Shared/tooltip.js +2107 -0
- package/dist/components/Shared/transition.js +1 -1
- package/dist/components/SignIn/index.js +26 -24
- package/dist/components/SignUp/index.js +108 -348
- package/dist/components/SignUp/pin.js +116 -844
- package/dist/components/SignUp/privacy.js +3 -3
- package/dist/components/SignUp/terms.js +3 -3
- package/dist/components/SignUp/types.d.ts +0 -1
- package/dist/components/SignUp/userInfo.js +4 -4
- package/dist/components/Stake/gems/index.d.ts +2 -0
- package/dist/components/Stake/gems/index.js +214 -0
- package/dist/components/Stake/id/index.d.ts +2 -0
- package/dist/components/Stake/id/index.js +233 -0
- package/dist/components/Stake/index.d.ts +5 -0
- package/dist/components/Stake/index.js +346 -0
- package/dist/components/Swap/index.d.ts +2 -0
- package/dist/components/Swap/index.js +489 -0
- package/dist/components/SwapAndUniSwap/index.d.ts +3 -0
- package/dist/components/SwapAndUniSwap/index.js +43 -0
- package/dist/components/WalletPortfolio/index.js +191 -263
- package/dist/components/WalletPortfolio/tokenRow.js +8 -5
- package/dist/constants-d3SWzaRo.js +3981 -0
- package/dist/countries-BVn1FubK.js +1925 -0
- package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
- package/dist/{createSvgIcon-CAZr4ukt.js → createSvgIcon-jkXneOQN.js} +6 -6
- package/dist/{createTheme-NrBCWesw.js → createTheme-F9Dk4FhK.js} +182 -174
- package/dist/data/countries.json.d.ts +1925 -0
- package/dist/defaultTheme-Bc00Q3Kt.js +5 -0
- package/dist/dividerClasses-SUAUDDqL.js +10 -0
- package/dist/{documents-CL4Ajr_B.js → documents-2UqIXbDq.js} +130 -129
- package/dist/elementTypeAcceptingRef-BufevUW8.js +23 -0
- package/dist/emotion-react.browser.esm-CI0uV1W5.js +233 -0
- package/dist/{extendSxProp-CuERe1TA.js → extendSxProp-Cm2UBzGf.js} +1 -1
- package/dist/generic-token-B_ptO5yb.js +4 -0
- package/dist/hoc/withThemeProvider.js +33 -32
- package/dist/hooks/useDialog/index.js +4 -4
- package/dist/hooks/useSnackBar.js +63 -60
- package/dist/icons/buyIcon.d.ts +2 -0
- package/dist/icons/buyIcon.js +19 -0
- package/dist/icons/canceledBuyIcon.d.ts +2 -0
- package/dist/icons/canceledBuyIcon.js +34 -0
- package/dist/icons/canceledRedeemIcon.d.ts +2 -0
- package/dist/icons/canceledRedeemIcon.js +35 -0
- package/dist/icons/failedBuyIcon.d.ts +2 -0
- package/dist/icons/failedBuyIcon.js +48 -0
- package/dist/icons/failedRedeemIcon.d.ts +2 -0
- package/dist/icons/failedRedeemIcon.js +48 -0
- package/dist/icons/pendingBuyIcon.d.ts +2 -0
- package/dist/icons/pendingBuyIcon.js +38 -0
- package/dist/icons/pendingRedeemIcon.d.ts +2 -0
- package/dist/icons/pendingRedeemIcon.js +34 -0
- package/dist/icons/redeemIcon.d.ts +2 -0
- package/dist/icons/redeemIcon.js +19 -0
- package/dist/index-B8QKlEgj.js +37095 -0
- package/dist/{index-Cq3eHOnB.js → index-BJlsh9ro.js} +1 -1
- package/dist/index-C3FYdQkQ.js +4050 -0
- package/dist/index-CrajlEO_.js +576 -0
- package/dist/index-DxLB0ZV1.js +760 -0
- package/dist/index-TElEjliR.js +9 -0
- package/dist/{index-iAyNk1r6.js → index-_kqRfgnc.js} +5 -5
- package/dist/index-ceeCtFuh.js +136 -0
- package/dist/index.esm-BsMAMhYW.js +237 -0
- package/dist/isFocusVisible-CPZqtjv2.js +12 -0
- package/dist/isMuiElement-DnSE4qG4.js +13 -0
- package/dist/main.d.ts +99 -0
- package/dist/main.js +34 -12
- package/dist/moment-h96o7c8I.js +2578 -0
- package/dist/order-Cry6kuj8.js +23 -0
- package/dist/ownerWindow-C-760D__.js +7 -0
- package/dist/providers/metaMask.d.ts +6 -0
- package/dist/providers/metaMask.js +24 -0
- package/dist/react-redux-B4BZippc.js +255 -0
- package/dist/react-webcam-B3cXh1XT.js +267 -0
- package/dist/resolveComponentProps-BdTgLKBb.js +80 -0
- package/dist/rr-primary-logo-CqI24c8v.js +4 -0
- package/dist/stake-Q_O90kTv.js +17 -0
- package/dist/store.d.ts +65 -0
- package/dist/store.js +1 -0
- package/dist/styled-BTIMwpiX.js +5 -0
- package/dist/{styles.module-KeND8lCR.js → styles.module-6SB62f3J.js} +1 -1
- package/dist/styles.module-O5VVND5e.js +22 -0
- package/dist/tokenRow-CgnPD-4U.js +206 -0
- package/dist/useControlled-BYdyS7Pn.js +31 -0
- package/dist/useFormControl-CfmEP6sW.js +18 -0
- package/dist/useSlot-DaP6eodX.js +50 -0
- package/dist/useTheme-BghcbbEW.js +9 -0
- package/dist/{useTheme-nlj1B_-c.js → useTheme-c0OHvtiA.js} +3 -3
- package/dist/{useThemeProps-BqWuFW3z.js → useThemeProps-CV9AmzHf.js} +4 -4
- package/dist/{useThemeWithoutDefault-BdYkMk0o.js → useThemeWithoutDefault-D8MaPbCK.js} +1 -1
- package/dist/useTimeout-D29bZ7Gz.js +56 -0
- package/dist/user-Dzur3Cro.js +24 -0
- package/dist/util/constants.d.ts +48 -0
- package/dist/util/constants.js +69 -21
- package/dist/util/conversions.js +54 -22271
- package/dist/util/functions.d.ts +5 -0
- package/dist/util/functions.js +81 -24
- package/dist/util/regex.d.ts +3 -0
- package/dist/util/regex.js +6 -0
- package/dist/{utils-_FXWkn40.js → utils-EFg3So7T.js} +163 -168
- package/dist/wallet-Dw896DF7.js +35 -0
- package/dist/web3-u4qDZYpo.js +22328 -0
- package/package.json +8 -3
- package/dist/DefaultPropsProvider-Y8MI-J-I.js +0 -555
- package/dist/__vite-browser-external-DYxpcVy9-DYxpcVy9.js +0 -4
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/auth-Cj5FKr_m.js +0 -19
- package/dist/axios-xPiQW9EP.js +0 -118114
- package/dist/defaultTheme-OIfL8Ia7.js +0 -5
- package/dist/dividerClasses-Z7VLlu5C.js +0 -10
- package/dist/index-DKTkUdik.js +0 -6
- package/dist/react-redux-VW99uJjf.js +0 -5908
- package/dist/react-webcam-Cov1TP0q.js +0 -639
- package/dist/styled-Da6GnxEE.js +0 -5
- package/dist/tokenRow-Cdd_jFjp.js +0 -206
- package/dist/useFormControl-Bo6Tf_xo.js +0 -46
- package/dist/useSlot-CURNJ3JC.js +0 -306
- package/dist/useTheme-DWRMvRU8.js +0 -9
- package/dist/useTimeout-lr7ryrda.js +0 -75
|
@@ -0,0 +1,760 @@
|
|
|
1
|
+
import { jsxs as t, Fragment as F, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useEffect as N } from "react";
|
|
3
|
+
import ge from "./hoc/withThemeProvider.js";
|
|
4
|
+
import { P as _e, F as be } from "./PlayArrow-D98xCL5M.js";
|
|
5
|
+
import { I as Ce } from "./Info-CkE3Gsf2.js";
|
|
6
|
+
import { G as Ne } from "./generic-token-B_ptO5yb.js";
|
|
7
|
+
import X from "./components/RocketRamp/Shared/Input/index.js";
|
|
8
|
+
import { ID_TOKEN_SYMBOL as ve, FIAT_TO_EVER_ID as Ee, FIAT_TO_TOKEN as ke, ESTIMATE_TOOLTIP_TEXT as Te, VISA_PAYMENT as Ie, VISA_PAYMENT_ACTIVE as Fe, SEPA_PAYMENT as Pe, SEPA_PAYMENT_ACTIVE as Ae, PAYMENT_BANK as re, SEPA_ICON as ze, VISA_ICON as se, PAYMENT_PROVIDER_CHECKOUT as ne } from "./util/constants.js";
|
|
9
|
+
import { a6 as Se } from "./constants-d3SWzaRo.js";
|
|
10
|
+
import { a as Re, b as ce, c as Oe, d as we } from "./order-Cry6kuj8.js";
|
|
11
|
+
import Me from "./components/Shared/tooltip.js";
|
|
12
|
+
import { getCurrencySymbol as le, removeExtraSpace as Be } from "./util/functions.js";
|
|
13
|
+
import Q from "./components/RocketRamp/Shared/Button/index.js";
|
|
14
|
+
import de from "./components/RocketRamp/Shared/backBtn.js";
|
|
15
|
+
import { T as i } from "./Typography-Dx54MRM5.js";
|
|
16
|
+
import { B as m } from "./Box-BOgpENcC.js";
|
|
17
|
+
import { G as o } from "./Grid2-B0mJbwjl.js";
|
|
18
|
+
import { C as I } from "./CircularProgress-BAEiXRSn.js";
|
|
19
|
+
import "@incodetech/welcome";
|
|
20
|
+
import "./axios-BEX6n2A7.js";
|
|
21
|
+
import { useSnackBar as Ve } from "./hooks/useSnackBar.js";
|
|
22
|
+
import "./components/SignUp/pin.js";
|
|
23
|
+
import { u as Le, a as $ } from "./react-redux-B4BZippc.js";
|
|
24
|
+
import './assets/main.css';import './assets/index8.css';/* empty css */
|
|
25
|
+
import "./util/conversions.js";
|
|
26
|
+
import "./index-CAoLi5Qq.js";
|
|
27
|
+
import "./react-webcam-B3cXh1XT.js";
|
|
28
|
+
import "./components/Shared/transition.js";
|
|
29
|
+
import "./components/Shared/pin.js";
|
|
30
|
+
import "./moment-h96o7c8I.js";
|
|
31
|
+
import "./index.esm-BsMAMhYW.js";
|
|
32
|
+
import "./web3-u4qDZYpo.js";
|
|
33
|
+
import "./index-B8QKlEgj.js";
|
|
34
|
+
import { c as De } from "./createSvgIcon-jkXneOQN.js";
|
|
35
|
+
import { s as ae, p as We, h as Ye, v as qe } from "./index-ceeCtFuh.js";
|
|
36
|
+
import { I as Ke } from "./TextField-BqIvz6Zw.js";
|
|
37
|
+
import { F as Ue } from "./FormControl-Nd-4LC8N.js";
|
|
38
|
+
import { S as Ge } from "./Select-DTQDmdn_.js";
|
|
39
|
+
import { M as ie } from "./MenuItem-D12FP5Iq.js";
|
|
40
|
+
import { L as je } from "./ListItemIcon-JAntieDc.js";
|
|
41
|
+
import { I as oe } from "./IconButton-DAR3jsEV.js";
|
|
42
|
+
const $e = (b) => ({
|
|
43
|
+
type: Se,
|
|
44
|
+
payload: b
|
|
45
|
+
}), w = {
|
|
46
|
+
"confirm-payment": "_confirm-payment_alxbn_1",
|
|
47
|
+
"confirm-transaction-network": "_confirm-transaction-network_alxbn_33",
|
|
48
|
+
"buy-info": "_buy-info_alxbn_57"
|
|
49
|
+
}, He = ({
|
|
50
|
+
setScreen: b,
|
|
51
|
+
orderData: k,
|
|
52
|
+
dispatch: p,
|
|
53
|
+
fiatAssets: g,
|
|
54
|
+
cryptoAssets: h,
|
|
55
|
+
getCryptoAssets: a,
|
|
56
|
+
showAlertMessage: u
|
|
57
|
+
}) => {
|
|
58
|
+
const C = "USD", f = le(C), y = g.fiats, v = g.loader, x = h.featureTokens.list, P = h.featureTokens.default, l = h.loader, z = k.loader, E = k.estimate, S = E.crypto_out_amount, W = E.conversion_price, Y = E.total_fee;
|
|
59
|
+
let R = 0, M = 0;
|
|
60
|
+
const B = E.fee_breakdown;
|
|
61
|
+
for (let r = 0; r < B.length; r++) {
|
|
62
|
+
const s = B[r];
|
|
63
|
+
s.name === "ev_fee" ? R = Number(s.value) : s.name === "network_fee" && (M = Number(s.value));
|
|
64
|
+
}
|
|
65
|
+
const [_, O] = c({
|
|
66
|
+
symbol: ""
|
|
67
|
+
}), [A, V] = c(E.fiat_amount || "50"), [L, Z] = c(!1), [T, q] = c(0), [n, D] = c(0), [K, H] = c([]), [U, pe] = c(!1);
|
|
68
|
+
c(50), c(3e3), c(50), c(3e3);
|
|
69
|
+
const [ee, tt] = c("");
|
|
70
|
+
N(() => {
|
|
71
|
+
if (E.crypto_currency) {
|
|
72
|
+
const r = x.find(
|
|
73
|
+
(s) => s.symbol === E.crypto_currency
|
|
74
|
+
);
|
|
75
|
+
O(r);
|
|
76
|
+
} else
|
|
77
|
+
P.id && O(P);
|
|
78
|
+
}, [P, E.crypto_currency]), N(() => {
|
|
79
|
+
n && a(n);
|
|
80
|
+
}, [n]), N(() => {
|
|
81
|
+
if (y.length === 0)
|
|
82
|
+
return;
|
|
83
|
+
const r = [];
|
|
84
|
+
for (let s = 0; s < y.length; s++) {
|
|
85
|
+
if (y[s].symbol === C) {
|
|
86
|
+
const d = y[s].payment_options;
|
|
87
|
+
D(y[s].id);
|
|
88
|
+
let G = !1;
|
|
89
|
+
for (let j = 0; j < d.length; j++) {
|
|
90
|
+
const te = d[j];
|
|
91
|
+
te.active && (r.push(te), d[j].id === T && (G = !0));
|
|
92
|
+
}
|
|
93
|
+
G || q(r[0].id);
|
|
94
|
+
}
|
|
95
|
+
H(r);
|
|
96
|
+
}
|
|
97
|
+
}, [C, y]), N(() => {
|
|
98
|
+
if (_ && _.id && A && T && n) {
|
|
99
|
+
p(Re());
|
|
100
|
+
const r = setTimeout(() => {
|
|
101
|
+
he();
|
|
102
|
+
}, 1e3);
|
|
103
|
+
return () => clearTimeout(r);
|
|
104
|
+
}
|
|
105
|
+
}, [_, A, T, x, n]);
|
|
106
|
+
const he = () => {
|
|
107
|
+
var d;
|
|
108
|
+
const r = K.find((G) => G.id === T), s = r.payment_type;
|
|
109
|
+
p(
|
|
110
|
+
ce({
|
|
111
|
+
transaction_type: _.symbol === ve ? Ee : ke,
|
|
112
|
+
coin_amount: A,
|
|
113
|
+
exchange: _.exchange,
|
|
114
|
+
payment_type: s,
|
|
115
|
+
fiat_ccy: C,
|
|
116
|
+
crypto_ccy: _.symbol,
|
|
117
|
+
network: (d = _.network) == null ? void 0 : d.name,
|
|
118
|
+
payment_provider: r.payment_provider
|
|
119
|
+
})
|
|
120
|
+
);
|
|
121
|
+
}, ue = ({ value: r, label: s }) => {
|
|
122
|
+
let d;
|
|
123
|
+
if (s === "credit_debit_card" ? (d = Ie, T === r && (d = Fe)) : (d = Pe, T === r && (d = Ae)), s)
|
|
124
|
+
return /* @__PURE__ */ e(
|
|
125
|
+
m,
|
|
126
|
+
{
|
|
127
|
+
mt: 0.5,
|
|
128
|
+
sx: { cursor: "pointer" },
|
|
129
|
+
onClick: () => q(r * 1),
|
|
130
|
+
children: /* @__PURE__ */ e("img", { src: d, alt: "payment", width: "90%" })
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}, fe = (r) => {
|
|
134
|
+
const s = r.target.value;
|
|
135
|
+
s ? /^([0-9.,]+)$/.test(s) && V(s) : V("");
|
|
136
|
+
}, ye = (r) => {
|
|
137
|
+
const s = x.find((d) => d.symbol === r);
|
|
138
|
+
O(s);
|
|
139
|
+
}, xe = () => {
|
|
140
|
+
if (!_.id)
|
|
141
|
+
return u({ message: "Please select token" }), !1;
|
|
142
|
+
if (!T)
|
|
143
|
+
return u({ message: "Please select payment method" }), !1;
|
|
144
|
+
if (!A)
|
|
145
|
+
return u({ message: "Please enter amount" }), !1;
|
|
146
|
+
if (!S)
|
|
147
|
+
return u({
|
|
148
|
+
message: "Please wait for the estimate to be calculated and then press next"
|
|
149
|
+
}), !1;
|
|
150
|
+
b(me);
|
|
151
|
+
};
|
|
152
|
+
return /* @__PURE__ */ t(F, { children: [
|
|
153
|
+
/* @__PURE__ */ t(o, { mt: 0.5, spacing: 1, container: !0, children: [
|
|
154
|
+
/* @__PURE__ */ e(o, { size: { xs: 3.5 }, children: /* @__PURE__ */ t(m, { className: w["buy-info"], children: [
|
|
155
|
+
/* @__PURE__ */ e(i, { variant: "2xl", children: /* @__PURE__ */ e("strong", { children: "Buy Credits" }) }),
|
|
156
|
+
/* @__PURE__ */ t(i, { variant: "md", children: [
|
|
157
|
+
"1 credit = ",
|
|
158
|
+
W,
|
|
159
|
+
f
|
|
160
|
+
] })
|
|
161
|
+
] }) }),
|
|
162
|
+
/* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ t(
|
|
163
|
+
m,
|
|
164
|
+
{
|
|
165
|
+
className: w["buy-info"],
|
|
166
|
+
sx: {
|
|
167
|
+
padding: "0px 50px !important",
|
|
168
|
+
alignItems: "center"
|
|
169
|
+
},
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ e(i, { variant: "md", children: "MAX amount you can request:" }),
|
|
172
|
+
/* @__PURE__ */ e(i, { variant: "md", children: "267 credits" })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
) }),
|
|
176
|
+
/* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ t(
|
|
177
|
+
m,
|
|
178
|
+
{
|
|
179
|
+
className: w["buy-info"],
|
|
180
|
+
sx: {
|
|
181
|
+
background: "black !important",
|
|
182
|
+
color: "white !important"
|
|
183
|
+
},
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ e(i, { variant: "md", className: "text-right", children: "Game Balance" }),
|
|
186
|
+
/* @__PURE__ */ e(i, { variant: "lg", className: "text-right", children: "34" })
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
) })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ t(o, { mt: 2, spacing: 2, container: !0, children: [
|
|
192
|
+
/* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
193
|
+
X,
|
|
194
|
+
{
|
|
195
|
+
label: "You Pay",
|
|
196
|
+
value: A,
|
|
197
|
+
onChange: fe,
|
|
198
|
+
type: "text",
|
|
199
|
+
labelFontWeight: 600,
|
|
200
|
+
error: L,
|
|
201
|
+
required: !0,
|
|
202
|
+
fullWidth: !0
|
|
203
|
+
}
|
|
204
|
+
) }),
|
|
205
|
+
ee && /* @__PURE__ */ e(i, { variant: "caption", sx: { color: "red" }, children: /* @__PURE__ */ e("strong", { children: ee }) })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ t(m, { className: "text-left", mt: 3, children: [
|
|
208
|
+
/* @__PURE__ */ e(i, { variant: "sm", fontWeight: 600, children: "Select Payment Method" }),
|
|
209
|
+
v ? /* @__PURE__ */ e(I, { sx: { ml: 1, mt: 3 }, size: 50 }) : /* @__PURE__ */ e(o, { mt: 0.5, container: !0, children: K.map((r) => /* @__PURE__ */ e(o, { size: { xs: 2.5 }, children: /* @__PURE__ */ e(
|
|
210
|
+
ue,
|
|
211
|
+
{
|
|
212
|
+
label: r.payment_type,
|
|
213
|
+
value: r.id
|
|
214
|
+
}
|
|
215
|
+
) }, r.id)) })
|
|
216
|
+
] }),
|
|
217
|
+
/* @__PURE__ */ t(o, { mt: 3, spacing: 2, container: !0, children: [
|
|
218
|
+
/* @__PURE__ */ e(o, { size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
219
|
+
X,
|
|
220
|
+
{
|
|
221
|
+
label: "You Receive",
|
|
222
|
+
labelFontWeight: 600,
|
|
223
|
+
value: S && (+S * 1).toFixed(5),
|
|
224
|
+
type: "text",
|
|
225
|
+
error: L,
|
|
226
|
+
readOnly: !0,
|
|
227
|
+
required: !0,
|
|
228
|
+
fullWidth: !0
|
|
229
|
+
}
|
|
230
|
+
) }),
|
|
231
|
+
/* @__PURE__ */ e(o, { size: { xs: 5 }, className: "content-center", children: l ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 30 }) : /* @__PURE__ */ t(F, { children: [
|
|
232
|
+
/* @__PURE__ */ e(Ke, { children: " " }),
|
|
233
|
+
/* @__PURE__ */ e(Ue, { variant: "outlined", fullWidth: !0, children: /* @__PURE__ */ t(
|
|
234
|
+
Ge,
|
|
235
|
+
{
|
|
236
|
+
sx: { marginTop: "-2px" },
|
|
237
|
+
inputProps: {
|
|
238
|
+
sx: {
|
|
239
|
+
display: "flex",
|
|
240
|
+
alignItems: "center",
|
|
241
|
+
padding: "10px"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
value: _.symbol,
|
|
245
|
+
onChange: (r) => ye(r.target.value),
|
|
246
|
+
children: [
|
|
247
|
+
/* @__PURE__ */ e(ie, { value: "", children: "Please select" }),
|
|
248
|
+
x.map((r) => /* @__PURE__ */ t(ie, { value: r.symbol, children: [
|
|
249
|
+
/* @__PURE__ */ e(je, { className: "dropdown-list-item", children: /* @__PURE__ */ e(
|
|
250
|
+
"img",
|
|
251
|
+
{
|
|
252
|
+
src: r.icon_uri,
|
|
253
|
+
onError: ({ currentTarget: s }) => {
|
|
254
|
+
s.onerror = null, s.src = Ne;
|
|
255
|
+
},
|
|
256
|
+
alt: "tokenImg",
|
|
257
|
+
width: "36",
|
|
258
|
+
height: "36"
|
|
259
|
+
}
|
|
260
|
+
) }),
|
|
261
|
+
/* @__PURE__ */ e("span", { children: r.symbol.toUpperCase() })
|
|
262
|
+
] }, r.id))
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
) })
|
|
266
|
+
] }) })
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ e(m, { mt: 3, sx: { color: "#1A202C" }, children: /* @__PURE__ */ t(o, { container: !0, children: [
|
|
269
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 12 }, children: /* @__PURE__ */ t(
|
|
270
|
+
oe,
|
|
271
|
+
{
|
|
272
|
+
sx: { padding: "0" },
|
|
273
|
+
onClick: () => pe((r) => !r),
|
|
274
|
+
disableFocusRipple: !0,
|
|
275
|
+
disableRipple: !0,
|
|
276
|
+
children: [
|
|
277
|
+
/* @__PURE__ */ e(i, { variant: "md", fontWeight: 500, children: "Fee Calculation" }),
|
|
278
|
+
/* @__PURE__ */ e(
|
|
279
|
+
_e,
|
|
280
|
+
{
|
|
281
|
+
sx: {
|
|
282
|
+
transform: `rotate(${U ? "90" : "0"}deg)`,
|
|
283
|
+
fontSize: "15px"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
) }),
|
|
290
|
+
U && /* @__PURE__ */ t(F, { children: [
|
|
291
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Everest Fee" }) }),
|
|
292
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
293
|
+
f,
|
|
294
|
+
z ? /* @__PURE__ */ e(
|
|
295
|
+
I,
|
|
296
|
+
{
|
|
297
|
+
sx: { ml: 1 },
|
|
298
|
+
size: 15,
|
|
299
|
+
color: "primary"
|
|
300
|
+
}
|
|
301
|
+
) : R.toFixed(2)
|
|
302
|
+
] }) }),
|
|
303
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Network Fee" }) }),
|
|
304
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
305
|
+
f,
|
|
306
|
+
z ? /* @__PURE__ */ e(
|
|
307
|
+
I,
|
|
308
|
+
{
|
|
309
|
+
sx: { ml: 1 },
|
|
310
|
+
size: 15,
|
|
311
|
+
color: "primary"
|
|
312
|
+
}
|
|
313
|
+
) : M.toFixed(2)
|
|
314
|
+
] }) })
|
|
315
|
+
] }),
|
|
316
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Total Fees" }) }),
|
|
317
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
318
|
+
f,
|
|
319
|
+
z ? /* @__PURE__ */ e(I, { sx: { ml: 1 }, size: 15, color: "primary" }) : Number(Y).toFixed(2)
|
|
320
|
+
] }) }),
|
|
321
|
+
_ && /* @__PURE__ */ t(F, { children: [
|
|
322
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
323
|
+
"1 ",
|
|
324
|
+
_.symbol,
|
|
325
|
+
" ",
|
|
326
|
+
/* @__PURE__ */ e(
|
|
327
|
+
Me,
|
|
328
|
+
{
|
|
329
|
+
title: Te,
|
|
330
|
+
placement: "right",
|
|
331
|
+
children: /* @__PURE__ */ e(oe, { className: "info-fee-icon", children: /* @__PURE__ */ e(
|
|
332
|
+
Ce,
|
|
333
|
+
{
|
|
334
|
+
sx: {
|
|
335
|
+
fontSize: "14px"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
) })
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
] }) }),
|
|
342
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
343
|
+
f,
|
|
344
|
+
z ? /* @__PURE__ */ e(
|
|
345
|
+
I,
|
|
346
|
+
{
|
|
347
|
+
sx: { ml: 1 },
|
|
348
|
+
size: 15,
|
|
349
|
+
color: "primary"
|
|
350
|
+
}
|
|
351
|
+
) : Number(W).toFixed(2)
|
|
352
|
+
] }) })
|
|
353
|
+
] })
|
|
354
|
+
] }) }),
|
|
355
|
+
/* @__PURE__ */ e(m, { mt: 4, children: /* @__PURE__ */ e(
|
|
356
|
+
Q,
|
|
357
|
+
{
|
|
358
|
+
onClick: xe,
|
|
359
|
+
disabled: L || !S,
|
|
360
|
+
fullWidth: !0,
|
|
361
|
+
children: /* @__PURE__ */ e("strong", { children: "Next" })
|
|
362
|
+
}
|
|
363
|
+
) })
|
|
364
|
+
] });
|
|
365
|
+
}, Xe = ({
|
|
366
|
+
setScreen: b,
|
|
367
|
+
partnerKey: k,
|
|
368
|
+
orderData: p,
|
|
369
|
+
dispatch: g,
|
|
370
|
+
walletAddress: h
|
|
371
|
+
}) => {
|
|
372
|
+
const a = p.estimate, u = p.create.order_id, C = p.loader, f = a.fiat_amount, y = le(a.fiat_currency), [v, x] = c(!1);
|
|
373
|
+
N(() => {
|
|
374
|
+
u && v && b(Ze);
|
|
375
|
+
}, [u]), N(() => {
|
|
376
|
+
P();
|
|
377
|
+
}, []);
|
|
378
|
+
const P = () => {
|
|
379
|
+
g(
|
|
380
|
+
ce({
|
|
381
|
+
...a,
|
|
382
|
+
transaction_type: a.transaction_type,
|
|
383
|
+
coin_amount: a.fiat_amount,
|
|
384
|
+
exchange: a.exchange,
|
|
385
|
+
payment_type: a.payment_type,
|
|
386
|
+
fiat_ccy: a.fiat_currency,
|
|
387
|
+
crypto_ccy: a.crypto_currency,
|
|
388
|
+
network: a.network,
|
|
389
|
+
payment_provider: a.payment_provider
|
|
390
|
+
})
|
|
391
|
+
);
|
|
392
|
+
}, l = () => {
|
|
393
|
+
g(
|
|
394
|
+
Oe({
|
|
395
|
+
apiKey: k,
|
|
396
|
+
quoteId: a.quote_id,
|
|
397
|
+
walletAddress: h
|
|
398
|
+
})
|
|
399
|
+
), x(!0);
|
|
400
|
+
};
|
|
401
|
+
return /* @__PURE__ */ t(F, { children: [
|
|
402
|
+
/* @__PURE__ */ e(de, { onClickHandler: () => b(J) }),
|
|
403
|
+
/* @__PURE__ */ e(i, { mt: 2, variant: "sm", fontWeight: 600, children: "Using payment method" }),
|
|
404
|
+
/* @__PURE__ */ t(m, { mt: 2, className: w["confirm-payment"], children: [
|
|
405
|
+
/* @__PURE__ */ e(
|
|
406
|
+
"img",
|
|
407
|
+
{
|
|
408
|
+
src: a.payment_type === re ? ze : se,
|
|
409
|
+
width: 100,
|
|
410
|
+
alt: "payment"
|
|
411
|
+
}
|
|
412
|
+
),
|
|
413
|
+
/* @__PURE__ */ e(i, { variant: "caption", component: "span", children: /* @__PURE__ */ e("strong", { children: a.payment_type === re ? "Bank Account" : "Debit Card" }) })
|
|
414
|
+
] }),
|
|
415
|
+
/* @__PURE__ */ e(i, { mt: 4, variant: "sm", fontWeight: 600, children: "To Wallet Address" }),
|
|
416
|
+
/* @__PURE__ */ e(
|
|
417
|
+
m,
|
|
418
|
+
{
|
|
419
|
+
mt: 2,
|
|
420
|
+
className: w["confirm-payment"],
|
|
421
|
+
sx: { width: "100% !important" },
|
|
422
|
+
children: /* @__PURE__ */ e(i, { variant: "caption", component: "p", children: /* @__PURE__ */ e("strong", { children: h }) })
|
|
423
|
+
}
|
|
424
|
+
),
|
|
425
|
+
/* @__PURE__ */ e(i, { mt: 3, variant: "sm", fontWeight: 600, component: "p", children: "Order Estimate Details" }),
|
|
426
|
+
/* @__PURE__ */ e(m, { sx: { color: "#A6A6A6" }, children: /* @__PURE__ */ t(o, { container: !0, children: [
|
|
427
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
428
|
+
a.crypto_currency.toUpperCase(),
|
|
429
|
+
" @",
|
|
430
|
+
" ",
|
|
431
|
+
Number(a.conversion_price).toFixed(2),
|
|
432
|
+
" ",
|
|
433
|
+
a.fiat_currency
|
|
434
|
+
] }) }),
|
|
435
|
+
/* @__PURE__ */ e(o, { className: "flex-right", size: { xs: 6 }, children: /* @__PURE__ */ e(
|
|
436
|
+
"span",
|
|
437
|
+
{
|
|
438
|
+
className: w["confirm-transaction-network"],
|
|
439
|
+
style: {
|
|
440
|
+
backgroundColor: a.network === "Ethereum" ? "#A1A9DC" : "#5D8CCC"
|
|
441
|
+
},
|
|
442
|
+
children: a.network
|
|
443
|
+
}
|
|
444
|
+
) }),
|
|
445
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
446
|
+
Number(a.crypto_out_amount).toFixed(5),
|
|
447
|
+
" ",
|
|
448
|
+
a.crypto_currency.toUpperCase()
|
|
449
|
+
] }) }),
|
|
450
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
451
|
+
(Number(f) - Number(a.total_fee)).toFixed(2),
|
|
452
|
+
" ",
|
|
453
|
+
a.fiat_currency
|
|
454
|
+
] }) }),
|
|
455
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: "Total Fees" }) }),
|
|
456
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
457
|
+
Number(a.total_fee).toFixed(2),
|
|
458
|
+
" ",
|
|
459
|
+
a.fiat_currency
|
|
460
|
+
] }) }),
|
|
461
|
+
/* @__PURE__ */ e(o, { className: "text-left", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: /* @__PURE__ */ e("strong", { children: "Order Total" }) }) }),
|
|
462
|
+
/* @__PURE__ */ e(o, { className: "text-right", size: { xs: 6 }, children: /* @__PURE__ */ e(i, { variant: "caption", children: /* @__PURE__ */ t("strong", { children: [
|
|
463
|
+
y,
|
|
464
|
+
Number(f).toFixed(2),
|
|
465
|
+
" ",
|
|
466
|
+
a.fiat_currency
|
|
467
|
+
] }) }) })
|
|
468
|
+
] }) }),
|
|
469
|
+
/* @__PURE__ */ e(m, { mt: 4, children: /* @__PURE__ */ e(
|
|
470
|
+
Q,
|
|
471
|
+
{
|
|
472
|
+
onClick: l,
|
|
473
|
+
disabled: C,
|
|
474
|
+
fullWidth: !0,
|
|
475
|
+
children: /* @__PURE__ */ e("strong", { children: C ? /* @__PURE__ */ t(F, { children: [
|
|
476
|
+
/* @__PURE__ */ e(I, { size: 15, color: "inherit" }),
|
|
477
|
+
" Processing..."
|
|
478
|
+
] }) : "Payment Details" })
|
|
479
|
+
}
|
|
480
|
+
) })
|
|
481
|
+
] });
|
|
482
|
+
}, Qe = De(/* @__PURE__ */ e("path", {
|
|
483
|
+
d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
|
|
484
|
+
}), "ErrorOutline"), Je = ({
|
|
485
|
+
checkoutKey: b,
|
|
486
|
+
setScreen: k,
|
|
487
|
+
showAlertMessage: p,
|
|
488
|
+
rrBaseUrl: g,
|
|
489
|
+
orderData: h,
|
|
490
|
+
dispatch: a
|
|
491
|
+
}) => {
|
|
492
|
+
const u = h.estimate, C = h.create.order_id, f = h.payment, [y, v] = c(!0), [x, P] = c(""), [l, z] = c(!1), [E, S] = c({
|
|
493
|
+
name: "",
|
|
494
|
+
billingAddress: {
|
|
495
|
+
addressLine1: ""
|
|
496
|
+
}
|
|
497
|
+
}), [W, Y] = c(!1), [R, M] = c(!0), [B, _] = c(!0), [O, A] = c(!0), [V, L] = c(!0);
|
|
498
|
+
N(() => {
|
|
499
|
+
f._links.redirect.href && window.location.replace(f._links.redirect.href);
|
|
500
|
+
}, [f]), N(() => {
|
|
501
|
+
S({
|
|
502
|
+
name: x,
|
|
503
|
+
billingAddress: {
|
|
504
|
+
addressLine1: ""
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
}, [x]), N(() => {
|
|
508
|
+
!B && !O && !V && x !== "" ? R && M(!1) : R || M(!0);
|
|
509
|
+
}, [x, B, O, V]);
|
|
510
|
+
const Z = (n, D, K, H = /./) => {
|
|
511
|
+
if (n !== "" && !H.test(n))
|
|
512
|
+
return !1;
|
|
513
|
+
D(n);
|
|
514
|
+
const U = typeof n == "string" ? Be(n) : n;
|
|
515
|
+
K(!U);
|
|
516
|
+
}, T = (n) => {
|
|
517
|
+
if (n && n.element)
|
|
518
|
+
switch (n.element) {
|
|
519
|
+
case "card-number":
|
|
520
|
+
_(n.isEmpty || !n.isValid);
|
|
521
|
+
break;
|
|
522
|
+
case "expiry-date":
|
|
523
|
+
A(n.isEmpty || !n.isValid);
|
|
524
|
+
break;
|
|
525
|
+
case "cvv":
|
|
526
|
+
L(n.isEmpty || !n.isValid);
|
|
527
|
+
break;
|
|
528
|
+
default:
|
|
529
|
+
console.log("NOOP");
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
}, q = (n) => {
|
|
533
|
+
if (n === "") {
|
|
534
|
+
p({ message: "Error processing card" }), Y(!1), k(J);
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
const D = {
|
|
538
|
+
token: n,
|
|
539
|
+
amount: Number(u.fiat_amount),
|
|
540
|
+
currency: u.fiat_currency,
|
|
541
|
+
reference: C,
|
|
542
|
+
success_url: `${g}/dashboard`,
|
|
543
|
+
fail_url: `${g}/dashboard?status=failed`
|
|
544
|
+
};
|
|
545
|
+
a(we(D));
|
|
546
|
+
};
|
|
547
|
+
return /* @__PURE__ */ t(F, { children: [
|
|
548
|
+
/* @__PURE__ */ e(de, { onClickHandler: () => k(me) }),
|
|
549
|
+
/* @__PURE__ */ t(i, { className: "text-center", variant: "subtitle1", mt: 2, children: [
|
|
550
|
+
/* @__PURE__ */ e("img", { src: se, width: 140, alt: "Debit Card" }),
|
|
551
|
+
/* @__PURE__ */ e("br", {}),
|
|
552
|
+
/* @__PURE__ */ e("b", { children: "Debit Card" })
|
|
553
|
+
] }),
|
|
554
|
+
/* @__PURE__ */ t(
|
|
555
|
+
i,
|
|
556
|
+
{
|
|
557
|
+
className: "text-center d-flex items-center",
|
|
558
|
+
variant: "caption",
|
|
559
|
+
mt: 2,
|
|
560
|
+
children: [
|
|
561
|
+
/* @__PURE__ */ e(Qe, {}),
|
|
562
|
+
" ",
|
|
563
|
+
/* @__PURE__ */ e("b", { style: { marginTop: "3px" }, children: "Fiat purchasing is not available for users with Chase and Citi bank accounts" })
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
u.payment_provider === ne && y && /* @__PURE__ */ e(m, { className: "text-center", mt: 8, children: /* @__PURE__ */ e(I, {}) }),
|
|
568
|
+
/* @__PURE__ */ e(m, { mt: 2, children: u.payment_provider === ne && /* @__PURE__ */ t(
|
|
569
|
+
ae,
|
|
570
|
+
{
|
|
571
|
+
config: {
|
|
572
|
+
debug: !1,
|
|
573
|
+
publicKey: b,
|
|
574
|
+
acceptedPaymentMethods: ["Visa", "Mastercard"],
|
|
575
|
+
cardholder: E,
|
|
576
|
+
localization: {
|
|
577
|
+
cardNumberPlaceholder: "Card number",
|
|
578
|
+
expiryMonthPlaceholder: "MM",
|
|
579
|
+
expiryYearPlaceholder: "YY",
|
|
580
|
+
cvvPlaceholder: "CVV"
|
|
581
|
+
},
|
|
582
|
+
style: {
|
|
583
|
+
base: {
|
|
584
|
+
color: "black",
|
|
585
|
+
fontSize: "18px"
|
|
586
|
+
},
|
|
587
|
+
// autofill: {
|
|
588
|
+
// backgroundColor: "yellow",
|
|
589
|
+
// },
|
|
590
|
+
// hover: {
|
|
591
|
+
// color: "blue",
|
|
592
|
+
// },
|
|
593
|
+
focus: {
|
|
594
|
+
color: "blue"
|
|
595
|
+
},
|
|
596
|
+
valid: {
|
|
597
|
+
color: "green"
|
|
598
|
+
},
|
|
599
|
+
invalid: {
|
|
600
|
+
color: "red"
|
|
601
|
+
},
|
|
602
|
+
placeholder: {
|
|
603
|
+
base: {
|
|
604
|
+
color: "gray",
|
|
605
|
+
marginLeft: "20px"
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
ready: () => {
|
|
611
|
+
v(!1);
|
|
612
|
+
},
|
|
613
|
+
frameValidationChanged: (n) => {
|
|
614
|
+
T(n);
|
|
615
|
+
},
|
|
616
|
+
cardSubmitted: () => {
|
|
617
|
+
Y(!0);
|
|
618
|
+
},
|
|
619
|
+
cardTokenized: (n) => {
|
|
620
|
+
q(n.token);
|
|
621
|
+
},
|
|
622
|
+
cardTokenizationFailed: (n) => {
|
|
623
|
+
alert("card tokenization failed"), console.log(n);
|
|
624
|
+
},
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ e(
|
|
627
|
+
X,
|
|
628
|
+
{
|
|
629
|
+
label: "Name on Card",
|
|
630
|
+
value: x,
|
|
631
|
+
onChange: (n) => Z(n.target.value, P, z),
|
|
632
|
+
error: l
|
|
633
|
+
}
|
|
634
|
+
),
|
|
635
|
+
/* @__PURE__ */ e(
|
|
636
|
+
We,
|
|
637
|
+
{
|
|
638
|
+
style: {
|
|
639
|
+
height: "4em",
|
|
640
|
+
margin: "20px 0",
|
|
641
|
+
padding: "20px",
|
|
642
|
+
border: "1px solid #999"
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
),
|
|
646
|
+
/* @__PURE__ */ e(
|
|
647
|
+
Ye,
|
|
648
|
+
{
|
|
649
|
+
style: {
|
|
650
|
+
height: "4em",
|
|
651
|
+
margin: "20px 0",
|
|
652
|
+
padding: "20px",
|
|
653
|
+
border: "1px solid #999"
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
),
|
|
657
|
+
/* @__PURE__ */ e(
|
|
658
|
+
qe,
|
|
659
|
+
{
|
|
660
|
+
style: {
|
|
661
|
+
height: "4em",
|
|
662
|
+
margin: "20px 0",
|
|
663
|
+
padding: "20px",
|
|
664
|
+
border: "1px solid #999"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
),
|
|
668
|
+
/* @__PURE__ */ e(
|
|
669
|
+
Q,
|
|
670
|
+
{
|
|
671
|
+
onClick: () => {
|
|
672
|
+
ae.submitCard();
|
|
673
|
+
},
|
|
674
|
+
fullWidth: !0,
|
|
675
|
+
disabled: R,
|
|
676
|
+
children: /* @__PURE__ */ e("strong", { children: W ? /* @__PURE__ */ t(F, { children: [
|
|
677
|
+
/* @__PURE__ */ e(I, { size: 15, color: "inherit" }),
|
|
678
|
+
" Processing..."
|
|
679
|
+
] }) : "Pay" })
|
|
680
|
+
}
|
|
681
|
+
)
|
|
682
|
+
]
|
|
683
|
+
}
|
|
684
|
+
) }),
|
|
685
|
+
/* @__PURE__ */ e(m, { mt: 8, children: /* @__PURE__ */ e("div", { id: "st-animated-card" }) })
|
|
686
|
+
] });
|
|
687
|
+
}, J = "FORM_SCREEN", me = "CONFIRM_SCREEN", Ze = "PAYMENT_SCREEN", et = ({ partnerKey: b, rrBaseUrl: k }) => {
|
|
688
|
+
const p = Le(), g = $((l) => l.order), h = g.error, a = $(
|
|
689
|
+
(l) => l.user.profile.everWalletAddress
|
|
690
|
+
), u = $(
|
|
691
|
+
(l) => l.fiatAssets
|
|
692
|
+
), C = $(
|
|
693
|
+
(l) => l.cryptoAssets
|
|
694
|
+
), [f, y] = c(J), { showAlertMessage: v, snackBar: x } = Ve();
|
|
695
|
+
return N(() => {
|
|
696
|
+
h && v({ message: h });
|
|
697
|
+
}, [h]), N(() => {
|
|
698
|
+
p($e());
|
|
699
|
+
}, []), /* @__PURE__ */ t(F, { children: [
|
|
700
|
+
x,
|
|
701
|
+
/* @__PURE__ */ e(
|
|
702
|
+
m,
|
|
703
|
+
{
|
|
704
|
+
sx: {
|
|
705
|
+
padding: { xs: "1rem", md: "2rem" },
|
|
706
|
+
backgroundColor: "#FFFFFF",
|
|
707
|
+
borderRadius: "1rem",
|
|
708
|
+
boxShadow: "0px 0px 64px 0px rgba(247, 247, 248, 1)"
|
|
709
|
+
},
|
|
710
|
+
children: {
|
|
711
|
+
FORM_SCREEN: /* @__PURE__ */ e(
|
|
712
|
+
He,
|
|
713
|
+
{
|
|
714
|
+
showAlertMessage: v,
|
|
715
|
+
setScreen: y,
|
|
716
|
+
fiatAssets: u,
|
|
717
|
+
cryptoAssets: C,
|
|
718
|
+
orderData: g,
|
|
719
|
+
dispatch: p,
|
|
720
|
+
getCryptoAssets: (l) => {
|
|
721
|
+
p(be({ type: "buy", id: l, partnerKey: b }));
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
),
|
|
725
|
+
CONFIRM_SCREEN: /* @__PURE__ */ e(
|
|
726
|
+
Xe,
|
|
727
|
+
{
|
|
728
|
+
partnerKey: b,
|
|
729
|
+
setScreen: y,
|
|
730
|
+
showAlertMessage: v,
|
|
731
|
+
orderData: g,
|
|
732
|
+
dispatch: p,
|
|
733
|
+
walletAddress: a
|
|
734
|
+
}
|
|
735
|
+
),
|
|
736
|
+
PAYMENT_SCREEN: /* @__PURE__ */ e(
|
|
737
|
+
Je,
|
|
738
|
+
{
|
|
739
|
+
checkoutKey: "pk_sbox_xnmwsvzydkhjeyi34z4b6ea5qi4",
|
|
740
|
+
setScreen: y,
|
|
741
|
+
showAlertMessage: v,
|
|
742
|
+
orderData: g,
|
|
743
|
+
rrBaseUrl: k,
|
|
744
|
+
dispatch: p
|
|
745
|
+
}
|
|
746
|
+
)
|
|
747
|
+
}[f]
|
|
748
|
+
}
|
|
749
|
+
)
|
|
750
|
+
] });
|
|
751
|
+
}, qt = ge(et);
|
|
752
|
+
export {
|
|
753
|
+
He as B,
|
|
754
|
+
Je as C,
|
|
755
|
+
J as F,
|
|
756
|
+
Ze as P,
|
|
757
|
+
Xe as a,
|
|
758
|
+
me as b,
|
|
759
|
+
qt as i
|
|
760
|
+
};
|