be-components 3.6.1 → 3.6.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/lib/commonjs/Checkout/components/AccountSummaryCard.js +52 -57
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js +8 -11
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js +21 -25
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/PayPalHtml.js +32 -0
- package/lib/commonjs/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js +125 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js +11 -15
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/index.js +92 -146
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/Components/Checkbox.js +7 -5
- package/lib/commonjs/Components/Checkbox.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +9 -9
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Wallet/components/ACHAddCard.js +233 -194
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressCard.js +19 -17
- package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressManager.js +64 -92
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js +106 -95
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +80 -106
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +155 -151
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualCardAdd.js +207 -204
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js +73 -66
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js +286 -246
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +1 -0
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/module/Checkout/components/AccountSummaryCard.js +25 -30
- package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/ItemSummaryCard.js +4 -7
- package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/OrderSummaryCard.js +9 -13
- package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/PayPalHtml.js +25 -0
- package/lib/module/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/module/Checkout/components/PayPalWebview.js +118 -0
- package/lib/module/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/module/Checkout/components/ShippingSummaryCard.js +5 -9
- package/lib/module/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/module/Checkout/index.js +58 -112
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Components/Checkbox.js +6 -4
- package/lib/module/Components/Checkbox.js.map +1 -1
- package/lib/module/Components/Icons.js +10 -10
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Wallet/components/ACHAddCard.js +233 -194
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressCard.js +14 -12
- package/lib/module/Wallet/components/AddressCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressManager.js +29 -57
- package/lib/module/Wallet/components/AddressManager.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js +71 -60
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/LinkAccountManager.js +55 -81
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js +146 -141
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/ManualCardAdd.js +204 -201
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js +45 -38
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js +287 -247
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/index.js +1 -0
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts +3 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts +5 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/index.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Checkbox.d.ts +1 -2
- package/lib/typescript/lib/module/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Checkout/components/AccountSummaryCard.tsx +25 -27
- package/src/Checkout/components/ItemSummaryCard.tsx +4 -6
- package/src/Checkout/components/OrderSummaryCard.tsx +9 -11
- package/src/Checkout/components/PayPalHtml.ts +26 -0
- package/src/Checkout/components/PayPalOrderCapture.tsx +1 -1
- package/src/Checkout/components/PayPalWebview.tsx +118 -0
- package/src/Checkout/components/ShippingSummaryCard.tsx +5 -8
- package/src/Checkout/index.tsx +68 -96
- package/src/Components/Checkbox.tsx +7 -6
- package/src/Components/Icons.tsx +10 -10
- package/src/Wallet/components/ACHAddCard.tsx +90 -60
- package/src/Wallet/components/AddressCard.tsx +11 -11
- package/src/Wallet/components/AddressManager.tsx +33 -44
- package/src/Wallet/components/FundAccountCard.tsx +52 -51
- package/src/Wallet/components/LinkAccountManager.tsx +49 -59
- package/src/Wallet/components/ManualACHAdd.tsx +99 -79
- package/src/Wallet/components/ManualCardAdd.tsx +119 -95
- package/src/Wallet/components/MyBalance.tsx +38 -40
- package/src/Wallet/components/WalletSetup.tsx +138 -113
- package/src/Wallet/index.tsx +7 -7
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import Colors from '../../constants/colors';
|
|
2
|
+
import { Linking, Modal } from "react-native"
|
|
3
|
+
import { Icons } from '../../Components';
|
|
5
4
|
import { WalletApi } from '../api';
|
|
6
5
|
import type { AccountProps, PlayerAddressProps } from '../../types';
|
|
7
|
-
import SpringView from '../../Components/Spring';
|
|
8
6
|
import AddressManager from './AddressManager';
|
|
9
7
|
import AddressCard from './AddressCard';
|
|
8
|
+
import { useColors } from '../../constants/useColors';
|
|
9
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
10
10
|
|
|
11
11
|
type LinkAccountManagerProps = {
|
|
12
12
|
ibt_placeholer_account:AccountProps,
|
|
@@ -16,6 +16,7 @@ type LinkAccountManagerProps = {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel, onComplete }: LinkAccountManagerProps) => {
|
|
19
|
+
const Colors = useColors();
|
|
19
20
|
const [ loading, setLoading ] = useState(false);
|
|
20
21
|
const [ try_counter, setTryCounter ] = useState(0);
|
|
21
22
|
const [ show_addresses, setShowAddresses ] = useState<{
|
|
@@ -75,17 +76,19 @@ const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel
|
|
|
75
76
|
|
|
76
77
|
return (
|
|
77
78
|
<View style={{ flex:1 }}>
|
|
78
|
-
<View style={{ padding:20 }}>
|
|
79
|
-
<Text
|
|
80
|
-
<Text style={{ marginTop:10 }} size={16}
|
|
79
|
+
<View type='header' style={{ padding:20 }}>
|
|
80
|
+
<Text theme='h1'>LINK NEW ACCOUNT</Text>
|
|
81
|
+
<Text style={{ marginTop:10 }} size={16} theme='description'>Link an account via instant bank transfer and get access to instant deposits and withdraws.</Text>
|
|
81
82
|
</View>
|
|
82
83
|
<View style={{ flex:1, justifyContent:'center', alignItems:'center' }}>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
<View float style={{ padding:10, backgroundColor:Colors.text.white }}>
|
|
85
|
+
<Icons.IBTFLowIcon size={350} />
|
|
86
|
+
</View>
|
|
87
|
+
<View style={{ padding:20, marginTop:20}}>
|
|
88
|
+
<Text size={16} theme='light' textAlign='center' style={{marginBottom:2}}>Using <Button style={{padding:0}} type='text' onPress={() => Linking.openURL('https://plaid.com/safety')}><Text weight='bold' color={Colors.text.action} size={18}>Plaid</Text></Button>, you will be asked to securly login to your bank and select the account you wish to link and transact from.</Text>
|
|
86
89
|
{show_addresses.selected_address ?
|
|
87
90
|
<View style={{ padding:20 }}>
|
|
88
|
-
<Text style={{ marginBottom:10 }} textAlign='center'
|
|
91
|
+
<Text style={{ marginBottom:10 }} textAlign='center' theme='h1'>Billing Address</Text>
|
|
89
92
|
<AddressCard
|
|
90
93
|
address={show_addresses.selected_address}
|
|
91
94
|
hide_delete
|
|
@@ -93,22 +96,19 @@ const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel
|
|
|
93
96
|
onSelect={() => setShowAddresses({ ...show_addresses, visible:true })}
|
|
94
97
|
/>
|
|
95
98
|
</View>
|
|
96
|
-
|
|
97
99
|
:<></>}
|
|
98
|
-
|
|
100
|
+
</View>
|
|
99
101
|
</View>
|
|
100
102
|
|
|
101
103
|
{error?
|
|
102
|
-
<Text size={14} color={Colors.
|
|
104
|
+
<Text size={14} color={Colors.text.warning}>{error}</Text>
|
|
103
105
|
:<></>}
|
|
104
106
|
{show_addresses.selected_address && (!account || account.status == 'redirect') ?
|
|
105
107
|
<View nativeID='link_actions' style={{ flexDirection:'row', padding:20 }}>
|
|
106
108
|
<Button
|
|
107
109
|
title='CANCEL'
|
|
108
110
|
style={{ flex:1, marginRight:5 }}
|
|
109
|
-
|
|
110
|
-
borderWidth={1}
|
|
111
|
-
borderColor={Colors.brand.electric}
|
|
111
|
+
type='error'
|
|
112
112
|
onPress={() => onCancel()}
|
|
113
113
|
/>
|
|
114
114
|
{!redirect_url ?
|
|
@@ -117,9 +117,7 @@ const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel
|
|
|
117
117
|
disabled={loading || !valid}
|
|
118
118
|
title='START ACCOUNT LINK'
|
|
119
119
|
loading={loading}
|
|
120
|
-
|
|
121
|
-
backgroundColor={Colors.brand.electric}
|
|
122
|
-
padding={15}
|
|
120
|
+
type='success'
|
|
123
121
|
onPress={() => handleStartLink()}
|
|
124
122
|
/>
|
|
125
123
|
:
|
|
@@ -128,63 +126,59 @@ const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel
|
|
|
128
126
|
disabled={linking}
|
|
129
127
|
title='FINISH WITH PLAID'
|
|
130
128
|
loading={linking}
|
|
131
|
-
|
|
132
|
-
backgroundColor={Colors.utility.success}
|
|
133
|
-
padding={15}
|
|
129
|
+
type='success'
|
|
134
130
|
onPress={() => handleNavOut()}
|
|
135
131
|
/>
|
|
136
132
|
}
|
|
137
133
|
</View>
|
|
138
134
|
:!show_addresses.selected_address ?
|
|
139
|
-
<View style={{ marginTop:10, borderRadius:8,
|
|
140
|
-
<Text size={14}
|
|
135
|
+
<View style={{ marginTop:10, borderRadius:8, padding:20 }}>
|
|
136
|
+
<Text size={14} theme='description'>Before we continue, we will need get the billing address associated with the account to be linked</Text>
|
|
141
137
|
<Button
|
|
142
138
|
style={{ marginTop:10 }}
|
|
143
139
|
title={show_addresses.selected_address ?'CHANGE':'ADD BILLING ADDRESS'}
|
|
144
|
-
|
|
145
|
-
padding={15}
|
|
146
|
-
backgroundColor={Colors.brand.electric}
|
|
140
|
+
type='success'
|
|
147
141
|
onPress={() => setShowAddresses({ ...show_addresses, visible:true })}
|
|
148
142
|
/>
|
|
149
143
|
</View>
|
|
150
144
|
:<></>}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
145
|
+
<Modal
|
|
146
|
+
visible={show_addresses.visible}
|
|
147
|
+
transparent
|
|
148
|
+
animationType='slide'
|
|
149
|
+
style={{flex:1}}
|
|
150
|
+
>
|
|
151
|
+
<View type='blur' style={{ flex:1 }}>
|
|
158
152
|
<AddressManager
|
|
159
153
|
player_addresses={player_addresses}
|
|
160
154
|
onSelect={(addy) => setShowAddresses({ visible:false, selected_address:addy })}
|
|
161
155
|
onAddAddress={(addy) => setShowAddresses({ visible:false, selected_address:addy })}
|
|
162
156
|
onCancel={() => setShowAddresses({ ...show_addresses, visible:false })}
|
|
163
157
|
/>
|
|
164
|
-
</
|
|
165
|
-
</
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
158
|
+
</View>
|
|
159
|
+
</Modal>
|
|
160
|
+
<Modal
|
|
161
|
+
visible={account && account.status != 'redirect' ? true : false}
|
|
162
|
+
transparent
|
|
163
|
+
animationType='slide'
|
|
164
|
+
style={{flex:1}}
|
|
165
|
+
>
|
|
166
|
+
{account && account.status != 'redirect' ?
|
|
167
|
+
<View type='blur' style={{ flex:1 }}>
|
|
174
168
|
{account.status == 'active' ?
|
|
175
169
|
<View style={{ flex:1, padding:10, paddingTop:30, paddingBottom:30, justifyContent:'center', alignItems:'center' }}>
|
|
176
170
|
<Icons.TransactionSuccessIcon size={150} />
|
|
177
|
-
<View style={{ padding:20, borderRadius:8, borderWidth:1, borderColor:Colors.
|
|
178
|
-
<Text size={20} color={Colors.
|
|
179
|
-
<Text style={{ marginTop:10 }} size={16}
|
|
171
|
+
<View style={{ padding:20, borderRadius:8, borderWidth:1, borderColor:Colors.text.success, marginTop:20 }}>
|
|
172
|
+
<Text size={20} color={Colors.text.success} weight='bold' textAlign='center'>Account Linked Successfully</Text>
|
|
173
|
+
<Text style={{ marginTop:10 }} size={16} theme='description' textAlign='center'>Your account has successfully been added. Please select close below to continue.</Text>
|
|
180
174
|
</View>
|
|
181
175
|
</View>
|
|
182
176
|
:
|
|
183
177
|
<View style={{ flex:1, padding:10, paddingTop:30, paddingBottom:30, justifyContent:'center', alignItems:'center' }}>
|
|
184
178
|
<Icons.TransactionErrorIcon size={150} />
|
|
185
|
-
<View style={{ padding:20, borderRadius:8, borderWidth:1, borderColor:Colors.
|
|
186
|
-
<Text size={20} color={Colors.
|
|
187
|
-
<Text style={{ marginTop:10 }} size={16}
|
|
179
|
+
<View style={{ padding:20, borderRadius:8, borderWidth:1, borderColor:Colors.text.error, marginTop:20 }}>
|
|
180
|
+
<Text size={20} color={Colors.text.error} weight='bold' textAlign='center'>Failed to Link Account</Text>
|
|
181
|
+
<Text style={{ marginTop:10 }} size={16} theme='description' textAlign='center'>Sorry, we were unable to link your account at this time. Please try again or reach out to support for help.</Text>
|
|
188
182
|
</View>
|
|
189
183
|
</View>
|
|
190
184
|
}
|
|
@@ -192,20 +186,16 @@ const LinkAccountManager = ({ player_addresses, ibt_placeholer_account, onCancel
|
|
|
192
186
|
<Button
|
|
193
187
|
style={{ flex:1, opacity:1 }}
|
|
194
188
|
title='CLOSE'
|
|
195
|
-
|
|
196
|
-
title_color={Colors.utility.error}
|
|
197
|
-
borderWidth={1}
|
|
198
|
-
borderColor={Colors.utility.error}
|
|
199
|
-
padding={15}
|
|
189
|
+
type='error'
|
|
200
190
|
onPress={() => {
|
|
201
191
|
if(account.status == 'active'){ return onComplete(account) }
|
|
202
192
|
return onCancel()
|
|
203
193
|
}}
|
|
204
194
|
/>
|
|
205
195
|
</View>
|
|
206
|
-
</
|
|
207
|
-
|
|
208
|
-
|
|
196
|
+
</View>
|
|
197
|
+
:<></>}
|
|
198
|
+
</Modal>
|
|
209
199
|
</View>
|
|
210
200
|
)
|
|
211
201
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Button, Checkbox, Text, TextInput } from '../../Components';
|
|
4
|
-
import Colors from '../../constants/colors';
|
|
2
|
+
import { Checkbox } from '../../Components';
|
|
5
3
|
import { WalletApi, WalletHelpers } from '../api';
|
|
6
4
|
import type { AccountProps, MyPlayerProps } from '../../types';
|
|
5
|
+
import { useColors } from '../../constants/useColors';
|
|
6
|
+
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
7
|
+
import { FlatList, KeyboardAvoidingView, Platform } from 'react-native';
|
|
7
8
|
const validator = require('us-bank-account-validator');
|
|
8
9
|
|
|
9
10
|
type ManualACHAddProps = {
|
|
@@ -11,7 +12,10 @@ type ManualACHAddProps = {
|
|
|
11
12
|
onAddAccount:(account:AccountProps) => void,
|
|
12
13
|
onCancel:() => void
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
const ach_sections = ['header','name','bank_name','routing_number','account_number','disclaimer']
|
|
14
17
|
const ManualACHAdd = ({ player, onAddAccount, onCancel }:ManualACHAddProps) => {
|
|
18
|
+
const Colors = useColors();
|
|
15
19
|
const [ loading, setLoading ] = useState(false);
|
|
16
20
|
const [ error, setError ] = useState<string>();
|
|
17
21
|
const [ ach_account, setACHAccount ] = useState({
|
|
@@ -40,75 +44,101 @@ const ManualACHAdd = ({ player, onAddAccount, onCancel }:ManualACHAddProps) => {
|
|
|
40
44
|
setLoading(false);
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
const renderSections = (data:{item:string,index:number}) => {
|
|
48
|
+
switch(data.item){
|
|
49
|
+
case 'header':
|
|
50
|
+
return (
|
|
51
|
+
<View type='header' style={{ padding:20 }}>
|
|
52
|
+
<Text theme='h1'>MANUAL ACH ACCOUNT</Text>
|
|
53
|
+
<Text style={{ marginTop:4 }} theme='description'>Complete the form below to add a new ACH account. Once submitted, we will send 2 small deposits to the account to confirm ownership. This process can take up to 3 business days.</Text>
|
|
54
|
+
</View>
|
|
55
|
+
)
|
|
56
|
+
case 'name':
|
|
57
|
+
return (
|
|
58
|
+
<View style={{ padding:10 }}>
|
|
59
|
+
<Text size={14} theme='h2'>Name on account</Text>
|
|
60
|
+
<TextInput
|
|
61
|
+
style={{ marginTop:10 }}
|
|
62
|
+
value={`${player.first_name} ${player.last_name}`}
|
|
63
|
+
editable={false}
|
|
64
|
+
onChangeText={() => console.log('ehy')}
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
)
|
|
68
|
+
case 'bank_name':
|
|
69
|
+
return (
|
|
70
|
+
<View style={{ padding:10 }}>
|
|
71
|
+
<Text size={14} theme='h2'>Bank Name</Text>
|
|
72
|
+
<TextInput
|
|
73
|
+
style={{ marginTop:10 }}
|
|
74
|
+
keyboardType='default'
|
|
75
|
+
placeholder={'Bank Name'}
|
|
76
|
+
value={ach_details.bank_name}
|
|
77
|
+
autoFocus={true}
|
|
78
|
+
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, bank_name: e } })}
|
|
79
|
+
/>
|
|
80
|
+
{!bank_valid ?
|
|
81
|
+
<Text style={{ marginTop:5 }} size={14} color={Colors.text.warning}>Bank Name Is Not Valid</Text>
|
|
82
|
+
:<></>}
|
|
83
|
+
</View>
|
|
84
|
+
)
|
|
85
|
+
case 'routing_number':
|
|
86
|
+
return (
|
|
87
|
+
<View style={{ padding:10 }}>
|
|
88
|
+
<Text size={14} theme='h2'>Routing Number</Text>
|
|
89
|
+
<TextInput
|
|
90
|
+
style={{ marginTop:10 }}
|
|
91
|
+
keyboardType='number-pad'
|
|
92
|
+
placeholder={'xxxxxx911'}
|
|
93
|
+
value={ach_details.routing_number}
|
|
94
|
+
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, routing_number: e } })}
|
|
95
|
+
/>
|
|
96
|
+
{!routing_valid.isValid ?
|
|
97
|
+
<Text style={{ marginTop:5 }} size={14} color={Colors.text.warning}>Routing Number Is Not Valid</Text>
|
|
98
|
+
:<></>}
|
|
99
|
+
</View>
|
|
100
|
+
)
|
|
101
|
+
case 'account_number':
|
|
102
|
+
return (
|
|
103
|
+
<View style={{ padding:10, paddingBottom:150 }}>
|
|
104
|
+
<Text size={14} theme='h2'>Account Number</Text>
|
|
105
|
+
<TextInput
|
|
106
|
+
style={{ marginTop:10 }}
|
|
107
|
+
keyboardType='number-pad'
|
|
108
|
+
value={ach_details.account_number}
|
|
109
|
+
placeholder={'xxxxxxxxx0000'}
|
|
110
|
+
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, account_number: e } })}
|
|
111
|
+
/>
|
|
112
|
+
{!account_valid.isValid ?
|
|
113
|
+
<Text style={{ marginTop:5 }} size={14} color={Colors.text.warning}>Account Number Is Not Valid</Text>
|
|
114
|
+
:<></>}
|
|
115
|
+
</View>
|
|
116
|
+
)
|
|
117
|
+
default: return <></>
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
43
121
|
return (
|
|
44
122
|
<View style={{ flex:1 }}>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
editable={false}
|
|
56
|
-
onChangeText={() => console.log('ehy')}
|
|
57
|
-
/>
|
|
58
|
-
</View>
|
|
59
|
-
<View style={{ marginTop: 16 }}>
|
|
60
|
-
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Bank Name</Text>
|
|
61
|
-
<TextInput
|
|
62
|
-
style={{ marginTop:10 }}
|
|
63
|
-
keyboardType='default'
|
|
64
|
-
placeholderTextColor={Colors.shades.shade600}
|
|
65
|
-
placeholder={'Bank Name'}
|
|
66
|
-
value={ach_details.bank_name}
|
|
67
|
-
autoFocus={true}
|
|
68
|
-
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, bank_name: e } })}
|
|
69
|
-
/>
|
|
70
|
-
{!bank_valid ?
|
|
71
|
-
<Text style={{ marginTop:5 }} size={14} color={Colors.utility.warning}>Bank Name Is Not Valid</Text>
|
|
72
|
-
:<></>}
|
|
73
|
-
</View>
|
|
74
|
-
<View style={{ marginTop: 16 }}>
|
|
75
|
-
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Routing Number</Text>
|
|
76
|
-
<TextInput
|
|
77
|
-
style={{ marginTop:10 }}
|
|
78
|
-
placeholderTextColor={Colors.shades.shade600}
|
|
79
|
-
keyboardType='number-pad'
|
|
80
|
-
placeholder={'xxxxxx911'}
|
|
81
|
-
value={ach_details.routing_number}
|
|
82
|
-
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, routing_number: e } })}
|
|
83
|
-
/>
|
|
84
|
-
{!routing_valid.isValid ?
|
|
85
|
-
<Text style={{ marginTop:5 }} size={14} color={Colors.utility.warning}>Routing Number Is Not Valid</Text>
|
|
86
|
-
:<></>}
|
|
87
|
-
</View>
|
|
88
|
-
<View style={{ marginTop:16 }}>
|
|
89
|
-
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Account Number</Text>
|
|
90
|
-
<TextInput
|
|
91
|
-
style={{ marginTop:10 }}
|
|
92
|
-
placeholderTextColor={Colors.shades.shade600}
|
|
93
|
-
keyboardType='number-pad'
|
|
94
|
-
value={ach_details.account_number}
|
|
95
|
-
placeholder={'xxxxxxxxx0000'}
|
|
96
|
-
onChangeText={(e) => setACHAccount({ ...ach_account, ach_details: { ...ach_details, account_number: e } })}
|
|
97
|
-
/>
|
|
98
|
-
{!account_valid.isValid ?
|
|
99
|
-
<Text style={{ marginTop:5 }} size={14} color={Colors.utility.warning}>Account Number Is Not Valid</Text>
|
|
100
|
-
:<></>}
|
|
101
|
-
</View>
|
|
102
|
-
</ScrollView>
|
|
123
|
+
<KeyboardAvoidingView style={{ flex:1 }} behavior={Platform.OS == 'ios' ? 'padding' : 'height'}>
|
|
124
|
+
|
|
125
|
+
<FlatList
|
|
126
|
+
key='manual_ach_sections'
|
|
127
|
+
keyExtractor={(item) => item}
|
|
128
|
+
data={ach_sections}
|
|
129
|
+
renderItem={renderSections}
|
|
130
|
+
/>
|
|
131
|
+
</KeyboardAvoidingView>
|
|
132
|
+
|
|
103
133
|
<View>
|
|
104
|
-
<
|
|
134
|
+
<Button style={{ flexDirection:'row', alignItems:'center', paddingLeft:20, paddingRight:20 }} onPress={() => setDisclaimer(!disclaimer)}>
|
|
105
135
|
<Checkbox size={30} checked={disclaimer} disabled onSelect={() => console.log('')}/>
|
|
106
|
-
<Text style={{ marginLeft:10 }} size={14}
|
|
107
|
-
</
|
|
136
|
+
<Text style={{ marginLeft:10 }} size={14} theme='description'>I understand that by continuing, we will send 2 small deposits to this bank account to confirm ownership. Once received, I will enter the amounts here.</Text>
|
|
137
|
+
</Button>
|
|
108
138
|
</View>
|
|
109
139
|
{error?
|
|
110
140
|
<View style={{ padding:10 }}>
|
|
111
|
-
<Text size={16} color={Colors.
|
|
141
|
+
<Text size={16} color={Colors.text.warning} textAlign='center' weight='semibold'>{error}</Text>
|
|
112
142
|
</View>
|
|
113
143
|
:<></>}
|
|
114
144
|
{account.status == 'pending' ?
|
|
@@ -117,10 +147,7 @@ const ManualACHAdd = ({ player, onAddAccount, onCancel }:ManualACHAddProps) => {
|
|
|
117
147
|
title='CANCEL'
|
|
118
148
|
style={{ flex:1, marginRight:5, opacity:loading?0.5:1 }}
|
|
119
149
|
disabled={loading}
|
|
120
|
-
|
|
121
|
-
padding={15}
|
|
122
|
-
borderWidth={1}
|
|
123
|
-
borderColor={Colors.brand.electric}
|
|
150
|
+
type='error'
|
|
124
151
|
onPress={() => onCancel()}
|
|
125
152
|
/>
|
|
126
153
|
<Button
|
|
@@ -128,9 +155,7 @@ const ManualACHAdd = ({ player, onAddAccount, onCancel }:ManualACHAddProps) => {
|
|
|
128
155
|
style={{ flex:3, opacity:valid&&!loading&&!error?1:0.5 }}
|
|
129
156
|
disabled={!valid || loading || error?true:false}
|
|
130
157
|
loading={loading}
|
|
131
|
-
|
|
132
|
-
padding={15}
|
|
133
|
-
backgroundColor={Colors.utility.success}
|
|
158
|
+
type='success'
|
|
134
159
|
onPress={() => handleAddAccount()}
|
|
135
160
|
/>
|
|
136
161
|
</View>
|
|
@@ -139,19 +164,14 @@ const ManualACHAdd = ({ player, onAddAccount, onCancel }:ManualACHAddProps) => {
|
|
|
139
164
|
<Button
|
|
140
165
|
title='CLOSE'
|
|
141
166
|
style={{ flex:1, marginRight:5 }}
|
|
142
|
-
|
|
143
|
-
padding={15}
|
|
144
|
-
borderWidth={1}
|
|
145
|
-
borderColor={Colors.brand.electric}
|
|
167
|
+
type='error'
|
|
146
168
|
onPress={() => onCancel()}
|
|
147
169
|
/>
|
|
148
170
|
<Button
|
|
149
171
|
title='VERIFY TRANSACTIONS SENT'
|
|
150
172
|
style={{ flex:3 }}
|
|
151
173
|
disabled
|
|
152
|
-
|
|
153
|
-
backgroundColor={Colors.brand.slate}
|
|
154
|
-
padding={15}
|
|
174
|
+
backgroundColor={Colors.absolutes.brand.slate}
|
|
155
175
|
onPress={() => console.log('')}
|
|
156
176
|
/>
|
|
157
177
|
</View>
|