be-components 0.4.9 → 0.5.1
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/lib/commonjs/ApiOverrides/index.js +12 -3
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/Checkout/api/index.js +254 -0
- package/lib/commonjs/Checkout/api/index.js.map +1 -0
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js +274 -0
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -0
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js +56 -0
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -0
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js +84 -0
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -0
- package/lib/commonjs/Checkout/index.js +590 -0
- package/lib/commonjs/Checkout/index.js.map +1 -0
- package/lib/commonjs/Components/Button.js +11 -3
- package/lib/commonjs/Components/Button.js.map +1 -1
- package/lib/commonjs/Components/Checkbox.js +6 -2
- package/lib/commonjs/Components/Checkbox.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +441 -4
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/Spring.js +6 -5
- package/lib/commonjs/Components/Spring.js.map +1 -1
- package/lib/commonjs/LocationTracker/LocationStatus.js +95 -0
- package/lib/commonjs/LocationTracker/LocationStatus.js.map +1 -0
- package/lib/commonjs/LocationTracker/api/index.js +124 -0
- package/lib/commonjs/LocationTracker/api/index.js.map +1 -0
- package/lib/commonjs/LocationTracker/index.js +207 -0
- package/lib/commonjs/LocationTracker/index.js.map +1 -0
- package/lib/commonjs/Observer/Observer.js +2 -0
- package/lib/commonjs/Observer/Observer.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +621 -0
- package/lib/commonjs/Wallet/api/index.js.map +1 -0
- package/lib/commonjs/Wallet/components/ACHAdd.js +63 -0
- package/lib/commonjs/Wallet/components/ACHAdd.js.map +1 -0
- package/lib/commonjs/Wallet/components/AccountCard.js +137 -0
- package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/AccountLimitManager.js +321 -0
- package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/AccountManager.js +202 -0
- package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +263 -0
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/AddressCard.js +56 -0
- package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/AddressManager.js +365 -0
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/DepositCard.js +195 -0
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +167 -0
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/ManageAccountCard.js +216 -0
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +270 -0
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -0
- package/lib/commonjs/Wallet/components/ManualCardAdd.js +337 -0
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -0
- package/lib/commonjs/Wallet/components/MyBalance.js +73 -0
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -0
- package/lib/commonjs/Wallet/components/PayPalOrderCapture.js +68 -0
- package/lib/commonjs/Wallet/components/PayPalOrderCapture.js.map +1 -0
- package/lib/commonjs/Wallet/components/RemoveAccount.js +108 -0
- package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -0
- package/lib/commonjs/Wallet/components/VerifyACHAccount.js +196 -0
- package/lib/commonjs/Wallet/components/VerifyACHAccount.js.map +1 -0
- package/lib/commonjs/Wallet/components/WalletSetup.js +316 -0
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -0
- package/lib/commonjs/Wallet/components/WithdrawCard.js +336 -0
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -0
- package/lib/commonjs/Wallet/index.js +221 -0
- package/lib/commonjs/Wallet/index.js.map +1 -0
- package/lib/commonjs/constants/colors.js +3 -0
- package/lib/commonjs/constants/colors.js.map +1 -1
- package/lib/commonjs/index.js +21 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +12 -3
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/Checkout/api/index.js +248 -0
- package/lib/module/Checkout/api/index.js.map +1 -0
- package/lib/module/Checkout/components/AccountSummaryCard.js +267 -0
- package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -0
- package/lib/module/Checkout/components/ItemSummaryCard.js +49 -0
- package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -0
- package/lib/module/Checkout/components/OrderSummaryCard.js +77 -0
- package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -0
- package/lib/module/Checkout/index.js +581 -0
- package/lib/module/Checkout/index.js.map +1 -0
- package/lib/module/Components/Button.js +11 -3
- package/lib/module/Components/Button.js.map +1 -1
- package/lib/module/Components/Checkbox.js +6 -2
- package/lib/module/Components/Checkbox.js.map +1 -1
- package/lib/module/Components/Icons.js +441 -4
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/Spring.js +6 -5
- package/lib/module/Components/Spring.js.map +1 -1
- package/lib/module/LocationTracker/LocationStatus.js +88 -0
- package/lib/module/LocationTracker/LocationStatus.js.map +1 -0
- package/lib/module/LocationTracker/api/index.js +118 -0
- package/lib/module/LocationTracker/api/index.js.map +1 -0
- package/lib/module/LocationTracker/index.js +200 -0
- package/lib/module/LocationTracker/index.js.map +1 -0
- package/lib/module/Observer/Observer.js +2 -0
- package/lib/module/Observer/Observer.js.map +1 -1
- package/lib/module/Wallet/api/index.js +615 -0
- package/lib/module/Wallet/api/index.js.map +1 -0
- package/lib/module/Wallet/components/ACHAdd.js +56 -0
- package/lib/module/Wallet/components/ACHAdd.js.map +1 -0
- package/lib/module/Wallet/components/AccountCard.js +130 -0
- package/lib/module/Wallet/components/AccountCard.js.map +1 -0
- package/lib/module/Wallet/components/AccountLimitManager.js +312 -0
- package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -0
- package/lib/module/Wallet/components/AccountManager.js +195 -0
- package/lib/module/Wallet/components/AccountManager.js.map +1 -0
- package/lib/module/Wallet/components/AccountSnoozeManager.js +254 -0
- package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -0
- package/lib/module/Wallet/components/AddressCard.js +49 -0
- package/lib/module/Wallet/components/AddressCard.js.map +1 -0
- package/lib/module/Wallet/components/AddressManager.js +356 -0
- package/lib/module/Wallet/components/AddressManager.js.map +1 -0
- package/lib/module/Wallet/components/DepositCard.js +186 -0
- package/lib/module/Wallet/components/DepositCard.js.map +1 -0
- package/lib/module/Wallet/components/LinkAccountManager.js +158 -0
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -0
- package/lib/module/Wallet/components/ManageAccountCard.js +207 -0
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -0
- package/lib/module/Wallet/components/ManualACHAdd.js +261 -0
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -0
- package/lib/module/Wallet/components/ManualCardAdd.js +328 -0
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -0
- package/lib/module/Wallet/components/MyBalance.js +66 -0
- package/lib/module/Wallet/components/MyBalance.js.map +1 -0
- package/lib/module/Wallet/components/PayPalOrderCapture.js +61 -0
- package/lib/module/Wallet/components/PayPalOrderCapture.js.map +1 -0
- package/lib/module/Wallet/components/RemoveAccount.js +100 -0
- package/lib/module/Wallet/components/RemoveAccount.js.map +1 -0
- package/lib/module/Wallet/components/VerifyACHAccount.js +187 -0
- package/lib/module/Wallet/components/VerifyACHAccount.js.map +1 -0
- package/lib/module/Wallet/components/WalletSetup.js +307 -0
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -0
- package/lib/module/Wallet/components/WithdrawCard.js +327 -0
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -0
- package/lib/module/Wallet/index.js +212 -0
- package/lib/module/Wallet/index.js.map +1 -0
- package/lib/module/constants/colors.js +3 -0
- package/lib/module/constants/colors.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/api/index.d.ts +49 -0
- package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts +18 -0
- package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts +8 -0
- package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts +8 -0
- package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/index.d.ts +12 -0
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -0
- package/lib/typescript/src/Components/Button.d.ts.map +1 -1
- package/lib/typescript/src/Components/Checkbox.d.ts +3 -1
- package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +8 -1
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/Spring.d.ts.map +1 -1
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts +21 -0
- package/lib/typescript/src/LocationTracker/LocationStatus.d.ts.map +1 -0
- package/lib/typescript/src/LocationTracker/api/index.d.ts +19 -0
- package/lib/typescript/src/LocationTracker/api/index.d.ts.map +1 -0
- package/lib/typescript/src/LocationTracker/index.d.ts +22 -0
- package/lib/typescript/src/LocationTracker/index.d.ts.map +1 -0
- package/lib/typescript/src/Observer/Observer.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +94 -0
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ACHAdd.d.ts +13 -0
- package/lib/typescript/src/Wallet/components/ACHAdd.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AccountCard.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AccountManager.d.ts +13 -0
- package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AddressCard.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts +23 -0
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts +14 -0
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts +17 -0
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +11 -0
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts +11 -0
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts +14 -0
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/PayPalOrderCapture.d.ts +16 -0
- package/lib/typescript/src/Wallet/components/PayPalOrderCapture.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/VerifyACHAccount.d.ts +10 -0
- package/lib/typescript/src/Wallet/components/VerifyACHAccount.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +11 -0
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +16 -0
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/index.d.ts +10 -0
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -0
- package/lib/typescript/src/constants/colors.d.ts +3 -0
- package/lib/typescript/src/constants/colors.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/ApiOverrides/index.ts +13 -3
- package/src/Checkout/api/index.tsx +199 -0
- package/src/Checkout/components/AccountSummaryCard.tsx +169 -0
- package/src/Checkout/components/ItemSummaryCard.tsx +34 -0
- package/src/Checkout/components/OrderSummaryCard.tsx +40 -0
- package/src/Checkout/index.tsx +398 -0
- package/src/Components/Button.tsx +5 -4
- package/src/Components/Checkbox.tsx +5 -2
- package/src/Components/Icons.tsx +196 -3
- package/src/Components/Spring.tsx +4 -3
- package/src/LocationTracker/LocationStatus.tsx +96 -0
- package/src/LocationTracker/api/index.tsx +114 -0
- package/src/LocationTracker/index.tsx +130 -0
- package/src/Observer/Observer.tsx +2 -1
- package/src/Wallet/api/index.ts +461 -0
- package/src/Wallet/components/ACHAdd.tsx +49 -0
- package/src/Wallet/components/AccountCard.tsx +92 -0
- package/src/Wallet/components/AccountLimitManager.tsx +212 -0
- package/src/Wallet/components/AccountManager.tsx +103 -0
- package/src/Wallet/components/AccountSnoozeManager.tsx +153 -0
- package/src/Wallet/components/AddressCard.tsx +31 -0
- package/src/Wallet/components/AddressManager.tsx +203 -0
- package/src/Wallet/components/DepositCard.tsx +107 -0
- package/src/Wallet/components/LinkAccountManager.tsx +119 -0
- package/src/Wallet/components/ManageAccountCard.tsx +146 -0
- package/src/Wallet/components/ManualACHAdd.tsx +164 -0
- package/src/Wallet/components/ManualCardAdd.tsx +185 -0
- package/src/Wallet/components/MyBalance.tsx +64 -0
- package/src/Wallet/components/PayPalOrderCapture.tsx +59 -0
- package/src/Wallet/components/RemoveAccount.tsx +68 -0
- package/src/Wallet/components/VerifyACHAccount.tsx +140 -0
- package/src/Wallet/components/WalletSetup.tsx +197 -0
- package/src/Wallet/components/WithdrawCard.tsx +145 -0
- package/src/Wallet/index.tsx +229 -0
- package/src/constants/colors.ts +3 -0
- package/src/index.tsx +7 -2
- package/src/types.d.ts +296 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { Button, Text, TextInput } from '../../Components';
|
|
4
|
+
import Colors from '../../constants/colors';
|
|
5
|
+
import { WalletApi, WalletHelpers } from '../api';
|
|
6
|
+
import moment from 'moment-mini';
|
|
7
|
+
import type { AccountProps } from '../../types';
|
|
8
|
+
|
|
9
|
+
type VerifyACHWidgetProps = {
|
|
10
|
+
account:AccountProps,
|
|
11
|
+
onUpdateAccount:(account:AccountProps) => void,
|
|
12
|
+
onClose: () => void,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const VerifyACHAccount = ({ account, onClose, onUpdateAccount }:VerifyACHWidgetProps) => {
|
|
16
|
+
const [ loading, setLoading ] = useState(false);
|
|
17
|
+
const [ verify_amount_1, setVerify1Amount ] = useState('')
|
|
18
|
+
const [ verify_amount_2, setVerify2Amount ] = useState('')
|
|
19
|
+
const [ error, setError ] = useState<string>();
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
let next_allowed = moment().subtract(1, 'minute')
|
|
23
|
+
if(account?.last_verify_attempt){
|
|
24
|
+
next_allowed = moment(account.last_verify_attempt).add(10, 'minutes');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const timedout = moment().isBefore(next_allowed)
|
|
28
|
+
let verify_allowed = verify_amount_1 && verify_amount_2 && !timedout ? true : false
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Try to verify the account
|
|
33
|
+
* @returns void
|
|
34
|
+
*/
|
|
35
|
+
const handleVerify = async() => {
|
|
36
|
+
if(verify_amount_1 == '0' || verify_amount_2 == '0'){ return alert('Please enter verification amounts') }
|
|
37
|
+
if(account.status != 'verify'){ return } //Dont do anything
|
|
38
|
+
if(!verify_allowed){ return }
|
|
39
|
+
if(!WalletHelpers.isNumber(verify_amount_1)){ return alert('Amount 1 is not a valid number') }
|
|
40
|
+
if(!WalletHelpers.isNumber(verify_amount_2)){ return alert('Amount 2 is not a valid number') }
|
|
41
|
+
let amount_1 = parseFloat(verify_amount_1)
|
|
42
|
+
let amount_2 = parseFloat(verify_amount_2)
|
|
43
|
+
setLoading(true);
|
|
44
|
+
const resp = await WalletApi.verifyACHAccount(account.account_id, amount_1, amount_2);
|
|
45
|
+
if(resp.status == 'fail'){
|
|
46
|
+
setError('Entered amounts are invalid')
|
|
47
|
+
}
|
|
48
|
+
onUpdateAccount(resp.account)
|
|
49
|
+
setLoading(false);
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
if(!account){ return <></> }
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<View style={{ flex:1 }}>
|
|
58
|
+
<View style={{ padding:20 }}>
|
|
59
|
+
<Text size={30} color={Colors.brand.midnight} weight='bold'>VERIFY ACCOUNT</Text>
|
|
60
|
+
<Text style={{ marginTop:15 }} size={16} color={Colors.brand.midnight} weight='regular'>Verify this account by entering the two deposit amounts received from Bettoredge when setting up the account.</Text>
|
|
61
|
+
</View>
|
|
62
|
+
<View nativeID='verify_inputs' style={{ flex:1, margin:20 }}>
|
|
63
|
+
<View style={{marginTop:30}}>
|
|
64
|
+
<Text textAlign='center' size={16} color={Colors.brand.midnight} weight='semibold'>Deposit 1</Text>
|
|
65
|
+
<TextInput
|
|
66
|
+
style={{ marginTop:5 }}
|
|
67
|
+
value={verify_amount_1}
|
|
68
|
+
editable={account.status == 'verify' ? true : false}
|
|
69
|
+
placeholderTextColor={Colors.brand.slate}
|
|
70
|
+
keyboardType='decimal-pad'
|
|
71
|
+
placeholder='0.00'
|
|
72
|
+
onChangeText={(e) => setVerify1Amount(e)}
|
|
73
|
+
/>
|
|
74
|
+
</View>
|
|
75
|
+
<View style={{marginTop:20}}>
|
|
76
|
+
<Text textAlign='center' size={16} color={Colors.brand.midnight} weight='semibold'>Deposit 2</Text>
|
|
77
|
+
<TextInput
|
|
78
|
+
style={{ marginTop:5 }}
|
|
79
|
+
editable={account.status == 'verify' ? true : false}
|
|
80
|
+
value={verify_amount_2}
|
|
81
|
+
placeholderTextColor={Colors.brand.slate}
|
|
82
|
+
keyboardType='decimal-pad'
|
|
83
|
+
placeholder='0.00'
|
|
84
|
+
onChangeText={(e) => setVerify2Amount(e)}
|
|
85
|
+
/>
|
|
86
|
+
</View>
|
|
87
|
+
{error ?
|
|
88
|
+
<Text style={{ marginTop:10 }} textAlign='center' size={14} color={Colors.utility.warning} weight='bold'>{error}</Text>
|
|
89
|
+
:<></>}
|
|
90
|
+
|
|
91
|
+
</View>
|
|
92
|
+
{account.status == 'verify' ?
|
|
93
|
+
<View nativeID='verify_actions' style={{ flexDirection:'row', padding:20 }}>
|
|
94
|
+
<Button
|
|
95
|
+
style={{ flex:1, marginRight:5 }}
|
|
96
|
+
title='CANCEL'
|
|
97
|
+
title_color={Colors.brand.electric}
|
|
98
|
+
padding={15}
|
|
99
|
+
borderWidth={1}
|
|
100
|
+
borderColor={Colors.brand.electric}
|
|
101
|
+
onPress={() => onClose()}
|
|
102
|
+
/>
|
|
103
|
+
<Button
|
|
104
|
+
style={{ flex:3, opacity:verify_allowed?1:0.5 }}
|
|
105
|
+
disabled={!verify_allowed}
|
|
106
|
+
loading={loading}
|
|
107
|
+
title={timedout?`Try Again ${moment(next_allowed).fromNow()}`:'VERIFY ACCOUNT'}
|
|
108
|
+
title_color={Colors.shades.white}
|
|
109
|
+
backgroundColor={Colors.utility.success}
|
|
110
|
+
padding={15}
|
|
111
|
+
onPress={() => handleVerify()}
|
|
112
|
+
/>
|
|
113
|
+
</View>
|
|
114
|
+
:
|
|
115
|
+
<View nativeID='verify_actions' style={{ flexDirection:'row', padding:20 }}>
|
|
116
|
+
<Button
|
|
117
|
+
style={{ flex:1, marginRight:5 }}
|
|
118
|
+
title='CLOSE'
|
|
119
|
+
title_color={Colors.brand.electric}
|
|
120
|
+
padding={15}
|
|
121
|
+
borderWidth={1}
|
|
122
|
+
borderColor={Colors.brand.electric}
|
|
123
|
+
onPress={() => onClose()}
|
|
124
|
+
/>
|
|
125
|
+
<Button
|
|
126
|
+
style={{ flex:3, opacity:0.5 }}
|
|
127
|
+
title='ACCOUNT VERIFIED!'
|
|
128
|
+
title_color={Colors.shades.white}
|
|
129
|
+
title_weight='bold'
|
|
130
|
+
padding={15}
|
|
131
|
+
backgroundColor={Colors.utility.success}
|
|
132
|
+
onPress={() => onClose()}
|
|
133
|
+
/>
|
|
134
|
+
</View>
|
|
135
|
+
}
|
|
136
|
+
</View>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export default VerifyACHAccount
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Image, TouchableOpacity, Linking } from "react-native";
|
|
3
|
+
import type { WalletSettingsProps } from '../../types';
|
|
4
|
+
import { Button, Checkbox, Text, TextInput } from '../../Components';
|
|
5
|
+
import Colors from '../../constants/colors';
|
|
6
|
+
import type { MyPlayerProps } from '../../ProfileManager/api/types';
|
|
7
|
+
import { WalletApi } from '../api';
|
|
8
|
+
import moment from 'moment-mini';
|
|
9
|
+
|
|
10
|
+
type WalletSetupProps = {
|
|
11
|
+
player: MyPlayerProps,
|
|
12
|
+
wallet_settings: WalletSettingsProps,
|
|
13
|
+
onSettingsUpdate:(ws:WalletSettingsProps) => void,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) => {
|
|
17
|
+
const [ terms_agreed, setTermsAgreed ] = useState(false);
|
|
18
|
+
const [ auth_error, setAuthError ] = useState<string>();
|
|
19
|
+
const [ pin_view, setPinView ] = useState<'set'|'confirm'>('set');
|
|
20
|
+
const [ pin_settings, setPinSettings ] = useState({
|
|
21
|
+
pin: '',
|
|
22
|
+
confirm_pin:''
|
|
23
|
+
})
|
|
24
|
+
const { pin, confirm_pin } = pin_settings;
|
|
25
|
+
|
|
26
|
+
const pin_valid = pin.length >= 4 ? true:false;
|
|
27
|
+
const go_valid = pin_valid && confirm_pin == pin ? true : false;
|
|
28
|
+
console.log(pin_valid)
|
|
29
|
+
const handleAgreeTerms = async() => {
|
|
30
|
+
const ws = await WalletApi.agreeToTerms()
|
|
31
|
+
onSettingsUpdate(ws)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const handleSetPin = async() => {
|
|
35
|
+
if(!pin_valid || !go_valid){ return }
|
|
36
|
+
const ws = await WalletApi.setPin(pin)
|
|
37
|
+
onSettingsUpdate(ws);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const handleAuthPin = async() => {
|
|
41
|
+
if(!pin_valid){ return }
|
|
42
|
+
try {
|
|
43
|
+
const ws = await WalletApi.authenticatePin(pin);
|
|
44
|
+
onSettingsUpdate(ws);
|
|
45
|
+
} catch (e) {
|
|
46
|
+
setAuthError('Invalid Pin - Please try again')
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const auth_required = wallet_settings.auth_end_datetime && moment().isAfter(wallet_settings.auth_end_datetime) ? true : false
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<View style={{ flex:1 }}>
|
|
54
|
+
<View style={{ padding:20 }}>
|
|
55
|
+
<Text size={30} color={Colors.brand.midnight} weight='bold'>My Wallet!</Text>
|
|
56
|
+
<Text style={{ marginTop:15 }} size={16} color={Colors.brand.midnight} weight='regular'>Welcome to your wallet. Go through the wizard to get set up to deposit and withdraw!</Text>
|
|
57
|
+
</View>
|
|
58
|
+
{!wallet_settings.agreed_to_terms ?
|
|
59
|
+
<View style={{ flex:1, padding:20 }}>
|
|
60
|
+
<View>
|
|
61
|
+
<Text size={20} color={Colors.brand.slate} weight='semibold' textAlign='center'>BettorEdge Wallet</Text>
|
|
62
|
+
<Text style={{ marginTop:5 }} size={26} color={Colors.brand.midnight} weight='bold' textAlign='center'>Terms and Conditions</Text>
|
|
63
|
+
</View>
|
|
64
|
+
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
65
|
+
<Image
|
|
66
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1717098691/Signing_the_contract_stfvtj.png' }}
|
|
67
|
+
style={{ width: 250, height:250 }}
|
|
68
|
+
resizeMode='cover'
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
</View>
|
|
72
|
+
<TouchableOpacity onPress={() => Linking.openURL('https://www.bettoredge.com/wallet-terms-of-use')}>
|
|
73
|
+
<Text size={14} color={Colors.brand.midnight} textAlign='center'>Press here to review our <Text size={14} color={Colors.brand.electric} weight='bold'>Wallet Terms of Use</Text>. To continue setting up your wallet please review and agree to the terms.</Text>
|
|
74
|
+
</TouchableOpacity>
|
|
75
|
+
<TouchableOpacity
|
|
76
|
+
style={{ marginTop:15, flexDirection:'row', alignItems:'center', backgroundColor:Colors.highlights.highlight400Faded, padding:20, borderRadius:8 }}
|
|
77
|
+
onPress={() => setTermsAgreed(!terms_agreed)}>
|
|
78
|
+
<Text style={{ flex:1 }} size={16} color={Colors.brand.midnight}>I have read and agree to the terms</Text>
|
|
79
|
+
<Checkbox size={30} checked={terms_agreed} disabled onSelect={() => console.log('')}/>
|
|
80
|
+
</TouchableOpacity>
|
|
81
|
+
</View>
|
|
82
|
+
: !wallet_settings.pin ?
|
|
83
|
+
<View style={{ flex:1, padding:20 }}>
|
|
84
|
+
<View>
|
|
85
|
+
<Text size={20} color={Colors.brand.slate} weight='semibold' textAlign='center'>BettorEdge Wallet</Text>
|
|
86
|
+
<Text style={{ marginTop:5 }} size={26} color={Colors.brand.midnight} weight='bold' textAlign='center'>{pin_view == 'set' ? 'Set' : 'Confirm'} Security PIN</Text>
|
|
87
|
+
</View>
|
|
88
|
+
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
89
|
+
<Image
|
|
90
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1717099686/Secure_lock_and_key_successfully_unlocked_it6hy0.png' }}
|
|
91
|
+
style={{ width: 250, height:250 }}
|
|
92
|
+
resizeMode='cover'
|
|
93
|
+
/>
|
|
94
|
+
</View>
|
|
95
|
+
<View style={{ marginBottom:15 }}>
|
|
96
|
+
<Text size={14} color={Colors.brand.midnight} textAlign='center'>Let's secure your sensitive information. Before doing any activity in your wallet, you will be required to enter a pin. Lets set it now.</Text>
|
|
97
|
+
</View>
|
|
98
|
+
{pin_view == 'set' ?
|
|
99
|
+
<TextInput
|
|
100
|
+
style={{ width:200, alignSelf:'center' }}
|
|
101
|
+
placeholder='HARDPIN'
|
|
102
|
+
placeholderTextColor={Colors.brand.slate}
|
|
103
|
+
value={pin}
|
|
104
|
+
onChangeText={(text) => setPinSettings({ ...pin_settings, pin: text })}
|
|
105
|
+
/>
|
|
106
|
+
:
|
|
107
|
+
<View>
|
|
108
|
+
<TextInput
|
|
109
|
+
style={{ width:200, alignSelf:'center' }}
|
|
110
|
+
placeholder='RE-Enter PIN'
|
|
111
|
+
placeholderTextColor={Colors.brand.slate}
|
|
112
|
+
value={confirm_pin}
|
|
113
|
+
onChangeText={(text) => setPinSettings({ ...pin_settings, confirm_pin: text })}
|
|
114
|
+
/>
|
|
115
|
+
</View>
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
</View>
|
|
119
|
+
:auth_required ?
|
|
120
|
+
<View style={{ flex:1, padding:20 }}>
|
|
121
|
+
<View>
|
|
122
|
+
<Text size={20} color={Colors.brand.slate} weight='semibold' textAlign='center'>BettorEdge Wallet</Text>
|
|
123
|
+
<Text style={{ marginTop:5 }} size={26} color={Colors.brand.midnight} weight='bold' textAlign='center'>Enter Security PIN</Text>
|
|
124
|
+
</View>
|
|
125
|
+
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
126
|
+
<Image
|
|
127
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1717099686/Secure_lock_and_key_successfully_unlocked_it6hy0.png' }}
|
|
128
|
+
style={{ width: 250, height:250 }}
|
|
129
|
+
resizeMode='cover'
|
|
130
|
+
/>
|
|
131
|
+
</View>
|
|
132
|
+
<View style={{ marginBottom:15 }}>
|
|
133
|
+
<Text size={14} color={Colors.brand.midnight} textAlign='center'>Before you can continue to your wallet. Please enter your security pin.</Text>
|
|
134
|
+
</View>
|
|
135
|
+
|
|
136
|
+
<TextInput
|
|
137
|
+
style={{ width:200, alignSelf:'center' }}
|
|
138
|
+
placeholder='ENTER PIN'
|
|
139
|
+
placeholderTextColor={Colors.brand.slate}
|
|
140
|
+
value={pin}
|
|
141
|
+
onChangeText={(text) => setPinSettings({ ...pin_settings, pin: text })}
|
|
142
|
+
/>
|
|
143
|
+
{auth_error ?
|
|
144
|
+
<View style={{ padding:10 }}>
|
|
145
|
+
<Text size={14} color={Colors.utility.warning} weight='bold' textAlign='center'>{auth_error}</Text>
|
|
146
|
+
</View>
|
|
147
|
+
:<></>}
|
|
148
|
+
</View>
|
|
149
|
+
:<></>}
|
|
150
|
+
<View style={{ flexDirection:'row', padding:10 }}>
|
|
151
|
+
{!wallet_settings.agreed_to_terms ?
|
|
152
|
+
<Button
|
|
153
|
+
title='I AGREE'
|
|
154
|
+
style={{ flex:3, opacity:terms_agreed?1:0.5 }}
|
|
155
|
+
disabled={!terms_agreed}
|
|
156
|
+
backgroundColor={Colors.brand.electric}
|
|
157
|
+
title_color={Colors.shades.white}
|
|
158
|
+
padding={15}
|
|
159
|
+
onPress={() => handleAgreeTerms()}
|
|
160
|
+
/>
|
|
161
|
+
: !wallet_settings.pin && pin_view == 'set' ?
|
|
162
|
+
<Button
|
|
163
|
+
title='CONFIRM PIN'
|
|
164
|
+
style={{ flex:3, opacity:pin_valid?1:0.5 }}
|
|
165
|
+
disabled={!pin_valid}
|
|
166
|
+
backgroundColor={Colors.utility.success}
|
|
167
|
+
title_color={Colors.shades.white}
|
|
168
|
+
padding={15}
|
|
169
|
+
onPress={() => setPinView('confirm')}
|
|
170
|
+
/>
|
|
171
|
+
: !wallet_settings.pin && pin_view == 'confirm' ?
|
|
172
|
+
<Button
|
|
173
|
+
title='LETS GO!'
|
|
174
|
+
style={{ flex:3, opacity:go_valid ? 1: 0.5}}
|
|
175
|
+
disabled={!go_valid}
|
|
176
|
+
backgroundColor={Colors.utility.success}
|
|
177
|
+
title_color={Colors.shades.white}
|
|
178
|
+
padding={15}
|
|
179
|
+
onPress={() => handleSetPin()}
|
|
180
|
+
/>
|
|
181
|
+
: auth_required ?
|
|
182
|
+
<Button
|
|
183
|
+
title='SUBMIT'
|
|
184
|
+
style={{ flex:3, opacity:pin_valid ? 1: 0.5}}
|
|
185
|
+
disabled={!pin_valid}
|
|
186
|
+
backgroundColor={Colors.utility.success}
|
|
187
|
+
title_color={Colors.shades.white}
|
|
188
|
+
padding={15}
|
|
189
|
+
onPress={() => handleAuthPin()}
|
|
190
|
+
/>
|
|
191
|
+
:<></>}
|
|
192
|
+
</View>
|
|
193
|
+
</View>
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export default WalletSetup
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { ActivityIndicator, View } from "react-native";
|
|
3
|
+
import type { AccountProps, ItemOrderProps, PlayerDepositLimitProps, PlayerWithdrawLimitProps, WalletSettingsProps } from '../../types';
|
|
4
|
+
import { ItemOrderApi, ItemOrderHelpers } from '../api';
|
|
5
|
+
import type { MyPlayerProps, PlayerBalanceProps } from '../../ProfileManager/api/types';
|
|
6
|
+
import Colors from '../../constants/colors';
|
|
7
|
+
import { Button, Text, TextInput } from '../../Components';
|
|
8
|
+
import { view_styles } from '../../constants/styles';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type WithdrawCardProps = {
|
|
12
|
+
player:MyPlayerProps,
|
|
13
|
+
wallet_settings:WalletSettingsProps,
|
|
14
|
+
player_balance:PlayerBalanceProps,
|
|
15
|
+
account:AccountProps,
|
|
16
|
+
deposit_limit:PlayerDepositLimitProps,
|
|
17
|
+
withdraw_limit:PlayerWithdrawLimitProps,
|
|
18
|
+
onTransact:(draft_order:ItemOrderProps) => void,
|
|
19
|
+
onCancel:() => void
|
|
20
|
+
}
|
|
21
|
+
const WithdrawCard = ({ wallet_settings, onTransact, player_balance, account, withdraw_limit, deposit_limit , onCancel}:WithdrawCardProps) => {
|
|
22
|
+
const [ draft_order, setDraftOrder ] = useState<ItemOrderProps>();
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
getItemFromServer()
|
|
26
|
+
},[])
|
|
27
|
+
|
|
28
|
+
const getItemFromServer = async() => {
|
|
29
|
+
const item = await ItemOrderApi.getItemByIdentifier('withdraw')
|
|
30
|
+
setDraftOrder(ItemOrderHelpers.genWithdrawOrder(item, account))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const { errors, available_for_withdraw } = ItemOrderHelpers.isWithdrawOrderValid(account, withdraw_limit, deposit_limit, player_balance, wallet_settings, draft_order)
|
|
35
|
+
|
|
36
|
+
const handleTransact = () => {
|
|
37
|
+
if(!draft_order){ return }
|
|
38
|
+
if(errors.length > 0){ return }
|
|
39
|
+
onTransact({ ...draft_order, total_amount: draft_order.amount as number })
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if(!draft_order){
|
|
44
|
+
return (
|
|
45
|
+
<View style={{ padding:20 }}>
|
|
46
|
+
<ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.brand.midnight} />
|
|
47
|
+
</View>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
let balance = Math.floor(player_balance.balance * 100) / 100
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<View style={{ flex:1 }}>
|
|
56
|
+
<View nativeID='deposit_rules' style={{ padding:10 }}>
|
|
57
|
+
<Text size={28} textAlign='center' weight='bold' color={Colors.brand.midnight}>Withdraw to your bank</Text>
|
|
58
|
+
<Text style={{ marginTop:10 }} size={14} textAlign='center' weight='regular' color={Colors.brand.midnight}>Withdraws can take up to 3 business days</Text>
|
|
59
|
+
</View>
|
|
60
|
+
<View style={{ flex:1 }}>
|
|
61
|
+
<View nativeID='deposit_amount' style={{ justifyContent:'center', alignItems:'center', padding:20 }}>
|
|
62
|
+
<TextInput
|
|
63
|
+
placeholder='0'
|
|
64
|
+
value={draft_order.amount as string}
|
|
65
|
+
onChangeText={(text) => setDraftOrder({ ...draft_order, amount:text })}
|
|
66
|
+
/>
|
|
67
|
+
</View>
|
|
68
|
+
</View>
|
|
69
|
+
<View nativeID='withdraw_limits' style={{ backgroundColor:Colors.shades.shade100, padding:20 }}>
|
|
70
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
71
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='semibold'>Weekly Withdraws Available</Text>
|
|
72
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>{withdraw_limit.withdraws_per_week - withdraw_limit.week_withdraw_count}</Text>
|
|
73
|
+
</View>
|
|
74
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:10, paddingTop:0 }}>
|
|
75
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='semibold'>Available For Withdraw</Text>
|
|
76
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>{available_for_withdraw.toFixed(2)}</Text>
|
|
77
|
+
</View>
|
|
78
|
+
<View style={{ marginTop:5, borderRadius:8, padding:10, backgroundColor:Colors.shades.shade600 }}>
|
|
79
|
+
<Text size={14} color={Colors.brand.midnight} textAlign='left' weight='semibold'>Determined by the LESSER OF</Text>
|
|
80
|
+
<View nativeID='available_to_withdraw_calculation' style={{ margin:5, marginTop:10, padding:10, backgroundColor:Colors.shades.white, borderRadius:4 }}>
|
|
81
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
82
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>My Balance</Text>
|
|
83
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>${balance}</Text>
|
|
84
|
+
</View>
|
|
85
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center', paddingLeft:15 }}>
|
|
86
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Instant Deposits (unsettled)</Text>
|
|
87
|
+
<Text size={14} color={Colors.utility.error} weight='semibold'>${deposit_limit.instant_deposits.toFixed(2)}</Text>
|
|
88
|
+
</View>
|
|
89
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center', borderTopWidth:1, borderTopColor:Colors.shades.shade600 }}>
|
|
90
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>Withdrawable Balance</Text>
|
|
91
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>${available_for_withdraw.toFixed(2)}</Text>
|
|
92
|
+
</View>
|
|
93
|
+
</View>
|
|
94
|
+
|
|
95
|
+
<View nativeID='daily_limit' style={{ margin:5, padding:10, backgroundColor:Colors.shades.white, borderRadius:4 }}>
|
|
96
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
97
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Daily Limit</Text>
|
|
98
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>${withdraw_limit.ach_daily_limit.toFixed(2)}</Text>
|
|
99
|
+
</View>
|
|
100
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center', paddingLeft:15}}>
|
|
101
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='regular'>Last Days Withdraws</Text>
|
|
102
|
+
<Text size={14} color={Colors.utility.error} weight='semibold'>${withdraw_limit.last_days_ach_withdraws.toFixed(2)}</Text>
|
|
103
|
+
</View>
|
|
104
|
+
<View style={{ padding:5, flexDirection:'row', alignItems:'center' , borderTopWidth:1, borderTopColor:Colors.shades.shade600 }}>
|
|
105
|
+
<Text style={{ flex:1 }} size={14} color={Colors.brand.midnight} weight='bold'>Limit Available</Text>
|
|
106
|
+
<Text size={14} color={Colors.brand.midnight} weight='bold'>${(withdraw_limit.ach_daily_limit - withdraw_limit.last_days_ach_withdraws).toFixed(2)}</Text>
|
|
107
|
+
</View>
|
|
108
|
+
</View>
|
|
109
|
+
</View>
|
|
110
|
+
{errors.length > 0 ?
|
|
111
|
+
<View style={{ position:'absolute', bottom:0, left:0, right:0, margin:20, borderRadius:8, padding:20, backgroundColor:Colors.shades.white, ...view_styles.float }}>
|
|
112
|
+
<Text style={{ marginBottom:10 }} size={14} color={Colors.brand.midnight}>Please fix the following before continuing</Text>
|
|
113
|
+
{errors.map(e => {
|
|
114
|
+
return (
|
|
115
|
+
<Text size={14} color={Colors.utility.warning}>{e}</Text>
|
|
116
|
+
)
|
|
117
|
+
})}
|
|
118
|
+
</View>
|
|
119
|
+
:<></>}
|
|
120
|
+
</View>
|
|
121
|
+
<View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
|
|
122
|
+
<Button
|
|
123
|
+
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
124
|
+
title={'CANCEL'}
|
|
125
|
+
title_color={Colors.brand.electric}
|
|
126
|
+
borderWidth={1}
|
|
127
|
+
borderColor={Colors.brand.electric}
|
|
128
|
+
padding={15}
|
|
129
|
+
onPress={() => onCancel()}
|
|
130
|
+
/>
|
|
131
|
+
<Button
|
|
132
|
+
style={{ flex:3, opacity: errors.length > 0 ? 0.5: 1 }}
|
|
133
|
+
disabled={errors.length > 0 ? true : false}
|
|
134
|
+
title={'REVIEW WITHDRAW'}
|
|
135
|
+
title_color={Colors.shades.white}
|
|
136
|
+
backgroundColor={Colors.brand.electric}
|
|
137
|
+
padding={15}
|
|
138
|
+
onPress={() => handleTransact()}
|
|
139
|
+
/>
|
|
140
|
+
</View>
|
|
141
|
+
</View>
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export default WithdrawCard
|