be-components 0.5.1 → 0.5.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/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/commonjs/Authenticator/api/index.js.map +1 -1
- package/lib/commonjs/Checkout/api/index.js +1 -1
- package/lib/commonjs/Checkout/api/index.js.map +1 -1
- package/lib/commonjs/{Wallet → Checkout}/components/PayPalOrderCapture.js +1 -1
- package/lib/commonjs/Checkout/components/PayPalOrderCapture.js.map +1 -0
- package/lib/commonjs/Checkout/index.js +1 -1
- package/lib/commonjs/Components/Icons.js +121 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/ProfileManager/api/index.js +0 -1
- package/lib/commonjs/ProfileManager/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +123 -0
- package/lib/commonjs/Wallet/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/components/ACHAddCard.js +231 -0
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/AccountCard.js +6 -0
- package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountManager.js +4 -4
- package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/DepositCard.js +66 -14
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js +325 -0
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/ItemOrderCard.js +96 -0
- package/lib/commonjs/Wallet/components/ItemOrderCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js +161 -0
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js.map +1 -0
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +3 -3
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +2 -2
- package/lib/commonjs/Wallet/components/ManualCardAdd.js +5 -5
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js +141 -13
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/OrderManager.js +118 -0
- package/lib/commonjs/Wallet/components/OrderManager.js.map +1 -0
- package/lib/commonjs/Wallet/components/VerifyACHAccount.js +2 -2
- package/lib/commonjs/Wallet/components/WalletActionSelector.js +358 -0
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -0
- package/lib/commonjs/Wallet/components/WalletSettings.js +595 -0
- package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -0
- package/lib/commonjs/Wallet/components/WalletSetup.js +96 -10
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +347 -16
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/constants/colors.js +2 -1
- package/lib/commonjs/constants/colors.js.map +1 -1
- package/lib/module/Authenticator/Components/StrategyForm.js.map +1 -1
- package/lib/module/Authenticator/api/index.js.map +1 -1
- package/lib/module/Checkout/api/index.js +1 -1
- package/lib/module/Checkout/api/index.js.map +1 -1
- package/lib/module/{Wallet → Checkout}/components/PayPalOrderCapture.js +1 -1
- package/lib/module/{Wallet → Checkout}/components/PayPalOrderCapture.js.map +1 -1
- package/lib/module/Checkout/index.js +1 -1
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Components/Icons.js +121 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/ProfileManager/api/index.js +0 -1
- package/lib/module/ProfileManager/api/index.js.map +1 -1
- package/lib/module/Wallet/api/index.js +123 -0
- package/lib/module/Wallet/api/index.js.map +1 -1
- package/lib/module/Wallet/components/ACHAddCard.js +224 -0
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -0
- package/lib/module/Wallet/components/AccountCard.js +6 -0
- package/lib/module/Wallet/components/AccountCard.js.map +1 -1
- package/lib/module/Wallet/components/AccountManager.js +4 -4
- package/lib/module/Wallet/components/AccountManager.js.map +1 -1
- package/lib/module/Wallet/components/DepositCard.js +68 -16
- package/lib/module/Wallet/components/DepositCard.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js +318 -0
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -0
- package/lib/module/Wallet/components/ItemOrderCard.js +87 -0
- package/lib/module/Wallet/components/ItemOrderCard.js.map +1 -0
- package/lib/module/Wallet/components/ItemOrderDetailCard.js +153 -0
- package/lib/module/Wallet/components/ItemOrderDetailCard.js.map +1 -0
- package/lib/module/Wallet/components/LinkAccountManager.js +3 -3
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js +2 -2
- package/lib/module/Wallet/components/ManualCardAdd.js +5 -5
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js +141 -13
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/OrderManager.js +109 -0
- package/lib/module/Wallet/components/OrderManager.js.map +1 -0
- package/lib/module/Wallet/components/VerifyACHAccount.js +2 -2
- package/lib/module/Wallet/components/WalletActionSelector.js +349 -0
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -0
- package/lib/module/Wallet/components/WalletSettings.js +587 -0
- package/lib/module/Wallet/components/WalletSettings.js.map +1 -0
- package/lib/module/Wallet/components/WalletSetup.js +97 -11
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/index.js +349 -18
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/constants/colors.js +2 -1
- package/lib/module/constants/colors.js.map +1 -1
- package/lib/typescript/src/Authenticator/Components/StrategyForm.d.ts.map +1 -1
- package/lib/typescript/src/Authenticator/api/index.d.ts +1 -2
- package/lib/typescript/src/Authenticator/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/PayPalOrderCapture.d.ts.map +1 -0
- package/lib/typescript/src/Components/Icons.d.ts +4 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/api/index.d.ts +2 -2
- package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +35 -1
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts +15 -0
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts +9 -2
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts +23 -0
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts +8 -0
- package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts +8 -0
- package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts +1 -1
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/OrderManager.d.ts +7 -0
- package/lib/typescript/src/Wallet/components/OrderManager.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts +15 -0
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +17 -0
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -0
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts +3 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/colors.d.ts +1 -0
- package/lib/typescript/src/constants/colors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Authenticator/Components/StrategyForm.tsx +1 -2
- package/src/Authenticator/api/index.ts +1 -2
- package/src/Checkout/api/index.tsx +1 -1
- package/src/{Wallet → Checkout}/components/PayPalOrderCapture.tsx +1 -1
- package/src/Checkout/index.tsx +1 -1
- package/src/Components/Icons.tsx +66 -0
- package/src/ProfileManager/Components/BasicStatus.tsx +2 -2
- package/src/ProfileManager/Components/CodeRedeem.tsx +2 -2
- package/src/ProfileManager/Components/ProfileWelcome.tsx +2 -2
- package/src/ProfileManager/Components/ProfileWizard.tsx +2 -2
- package/src/ProfileManager/Components/VouchCard.tsx +2 -2
- package/src/ProfileManager/api/index.ts +2 -3
- package/src/ProfileManager/api/types.d.ts +0 -54
- package/src/Wallet/api/index.ts +85 -1
- package/src/Wallet/components/ACHAddCard.tsx +109 -0
- package/src/Wallet/components/AccountCard.tsx +4 -0
- package/src/Wallet/components/AccountManager.tsx +4 -4
- package/src/Wallet/components/DepositCard.tsx +34 -7
- package/src/Wallet/components/FundAccountCard.tsx +158 -0
- package/src/Wallet/components/ItemOrderCard.tsx +46 -0
- package/src/Wallet/components/ItemOrderDetailCard.tsx +101 -0
- package/src/Wallet/components/LinkAccountManager.tsx +4 -4
- package/src/Wallet/components/ManualACHAdd.tsx +2 -2
- package/src/Wallet/components/ManualCardAdd.tsx +4 -4
- package/src/Wallet/components/MyBalance.tsx +38 -17
- package/src/Wallet/components/OrderManager.tsx +99 -0
- package/src/Wallet/components/VerifyACHAccount.tsx +2 -2
- package/src/Wallet/components/WalletActionSelector.tsx +196 -0
- package/src/Wallet/components/WalletSettings.tsx +224 -0
- package/src/Wallet/components/WalletSetup.tsx +66 -17
- package/src/Wallet/index.tsx +282 -21
- package/src/constants/colors.ts +2 -1
- package/src/types.d.ts +61 -1
- package/lib/commonjs/Wallet/components/ACHAdd.js +0 -63
- package/lib/commonjs/Wallet/components/ACHAdd.js.map +0 -1
- package/lib/commonjs/Wallet/components/PayPalOrderCapture.js.map +0 -1
- package/lib/module/Wallet/components/ACHAdd.js +0 -56
- package/lib/module/Wallet/components/ACHAdd.js.map +0 -1
- package/lib/typescript/src/Wallet/components/ACHAdd.d.ts +0 -13
- package/lib/typescript/src/Wallet/components/ACHAdd.d.ts.map +0 -1
- package/lib/typescript/src/Wallet/components/PayPalOrderCapture.d.ts.map +0 -1
- package/src/Wallet/components/ACHAdd.tsx +0 -49
- /package/lib/typescript/src/{Wallet → Checkout}/components/PayPalOrderCapture.d.ts +0 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { View, FlatList, ScrollView, TouchableOpacity, Image } from "react-native"
|
|
4
|
+
import { Button, Icons, Text } from '../../Components';
|
|
5
|
+
import Colors from '../../constants/colors';
|
|
6
|
+
import type { MyPlayerProps, PlayerBalanceProps } from '../../ProfileManager/api/types';
|
|
7
|
+
import type { AccountProps } from '../../types';
|
|
8
|
+
import { WalletHelpers } from '../api';
|
|
9
|
+
|
|
10
|
+
type WalletActionSelectorProps ={
|
|
11
|
+
player:MyPlayerProps,
|
|
12
|
+
player_balance:PlayerBalanceProps,
|
|
13
|
+
accounts:AccountProps[],
|
|
14
|
+
onClose: () => void,
|
|
15
|
+
walkthrough_steps:any[],
|
|
16
|
+
onActionSelect:(action:any, account?:AccountProps) => void,
|
|
17
|
+
onStartWalkthrough:(walkthrough:any) => void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const sections = [
|
|
21
|
+
{
|
|
22
|
+
section: 'accounts', label:'Account Actions', actions : [
|
|
23
|
+
{
|
|
24
|
+
action :'my_accounts', label: "View My Accounts", icon:<Icons.ListIcon color={Colors.brand.midnight} size={12}/>, description: 'Manage your connected accounts. Transact, snooze, set limits or remove an existing account.'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
action :'wallet_settings', label: "View My Settings", icon:<Icons.SettingsIcon color={Colors.brand.midnight} size={20}/>, description: 'View your current settings including your deposit and withdraw limits.'
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
section: 'transact', label:'Transact', actions : [
|
|
34
|
+
{
|
|
35
|
+
action :'order_history', label: "View Order History", icon:<Icons.TransactionIcon size={20} color={Colors.brand.midnight} />, description: 'View and manage past orders made on BettorEdge'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
action :'deposit', label: "Make A Deposit", icon:<Icons.DepositIcon size={20} color={Colors.brand.midnight} />, description: 'Fund your BettorEdge real-money balance by making a deposit from an existing account or new one.'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
action :'withdraw', label: "Make A Withdrawal", icon:<Icons.WithdrawIcon size={20} color={Colors.brand.midnight} />, description: 'Move funds from your BettorEdge real-money balance to a connected ACH account.'
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
const WalletActionSelector = ({ player, walkthrough_steps, player_balance, accounts, onClose, onActionSelect, onStartWalkthrough }: WalletActionSelectorProps) => {
|
|
49
|
+
const [ show_steps, setShowSteps ] = useState(false);
|
|
50
|
+
const [ width, setWidth ] = useState(0);
|
|
51
|
+
|
|
52
|
+
const handleActionSelect = (action:any) => {
|
|
53
|
+
switch(action.action){
|
|
54
|
+
case 'deposit':
|
|
55
|
+
let default_account = accounts.find(a => a.default_account)
|
|
56
|
+
if(!default_account){ default_account = accounts.find(a => a.account_type == 'paypal')}
|
|
57
|
+
return onActionSelect(action, default_account)
|
|
58
|
+
case 'withdraw':
|
|
59
|
+
let withdraw_account = accounts.find(a => !a.ibt_placeholder && a.account_type == 'ach')
|
|
60
|
+
if(!withdraw_account){ return onActionSelect({ action: 'add_ach_account' }) }
|
|
61
|
+
return onActionSelect(action, withdraw_account)
|
|
62
|
+
default: onActionSelect(action)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const renderActions = (data:{ item:any, index:number }) => {
|
|
67
|
+
return (
|
|
68
|
+
<TouchableOpacity style={{ padding:10, flexDirection:'row', alignItems:'center', borderBottomWidth:1, borderBottomColor:Colors.shades.shade600 }}
|
|
69
|
+
onPress={() => handleActionSelect(data.item)}>
|
|
70
|
+
|
|
71
|
+
<View style={{ flex:1, marginRight:10 }}>
|
|
72
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
73
|
+
{data.item.icon?
|
|
74
|
+
data.item.icon
|
|
75
|
+
:<></>}
|
|
76
|
+
<Text style={{ marginLeft:5 }} size={16} color={Colors.brand.midnight} weight='bold'>{data.item.label}</Text>
|
|
77
|
+
</View>
|
|
78
|
+
<Text style={{ padding:5 }} size={14} color={Colors.brand.midnight} weight='regular'>{data.item.description}</Text>
|
|
79
|
+
</View>
|
|
80
|
+
<Icons.ChevronIcon direction='right' color={Colors.brand.midnight} size={12} />
|
|
81
|
+
</TouchableOpacity>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const renderSections = (data: { item:any, index:number }) => {
|
|
86
|
+
return (
|
|
87
|
+
<View style={{ padding:5 }}>
|
|
88
|
+
<Text size={16} color={Colors.brand.midnight} weight='regular'>{data.item.label.toUpperCase()}</Text>
|
|
89
|
+
<View style={{ padding:5 }}>
|
|
90
|
+
<FlatList
|
|
91
|
+
key='actions'
|
|
92
|
+
data={data.item.actions}
|
|
93
|
+
renderItem={renderActions}
|
|
94
|
+
keyExtractor={(item) => item.action}
|
|
95
|
+
/>
|
|
96
|
+
</View>
|
|
97
|
+
|
|
98
|
+
</View>
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const renderSteps = (data: { item:any, index:number }) => {
|
|
103
|
+
return (
|
|
104
|
+
<TouchableOpacity
|
|
105
|
+
style={{ margin:5, padding:10, flexDirection:'row', alignItems:'center', borderWidth:1, borderColor:Colors.shades.shade600, borderRadius:8 }}
|
|
106
|
+
onPress={() => onStartWalkthrough({ enabled:true, steps: walkthrough_steps, active_step: data.item.step })}>
|
|
107
|
+
<Icons.CheckCirlceIcon size={14} color={data.item.complete?Colors.utility.success:Colors.brand.slate}/>
|
|
108
|
+
<Text style={{ flex:1, marginLeft:10 }} size={14} color={Colors.brand.midnight}>{data.item.label}</Text>
|
|
109
|
+
<Icons.ChevronIcon direction='right' size={8} color={Colors.brand.midnight} />
|
|
110
|
+
</TouchableOpacity>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const pct_complete = walkthrough_steps.filter(s => s.complete).length / walkthrough_steps.length
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<View style={{ flex:1 }} onLayout={(ev) => {
|
|
118
|
+
const { width } = ev.nativeEvent.layout
|
|
119
|
+
setWidth(width)
|
|
120
|
+
}}>
|
|
121
|
+
<View style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
122
|
+
<Image
|
|
123
|
+
source={{ uri: player.profile_pic }}
|
|
124
|
+
style={{ height:60, width:60, borderRadius:4 }}
|
|
125
|
+
resizeMode='cover'
|
|
126
|
+
/>
|
|
127
|
+
<View style={{ flex:1, marginLeft:5 }}>
|
|
128
|
+
<Text size={20} color={Colors.brand.midnight} weight='bold'>Wallet Balances</Text>
|
|
129
|
+
<View style={{ flexDirection:'row' }}>
|
|
130
|
+
<View style={{ margin:3, backgroundColor:Colors.brand.cobalt, padding:5, borderRadius:8 }}>
|
|
131
|
+
<Text size={14} color={Colors.shades.white} weight='bold'>${WalletHelpers.formatBalance(player_balance.balance)}</Text>
|
|
132
|
+
</View>
|
|
133
|
+
<View style={{ margin:3, backgroundColor:Colors.brand.cobalt, padding:5, borderRadius:8 }}>
|
|
134
|
+
<Text size={14} color={Colors.shades.white} weight='bold'>P{WalletHelpers.formatBalance(player_balance.promo_balance)}</Text>
|
|
135
|
+
</View>
|
|
136
|
+
<View style={{ margin:3, backgroundColor:Colors.brand.cyan, padding:5, borderRadius:8 }}>
|
|
137
|
+
<Text size={14} color={Colors.shades.white} weight='bold'>E{WalletHelpers.formatBalance(player_balance.free_market_balance)}</Text>
|
|
138
|
+
</View>
|
|
139
|
+
</View>
|
|
140
|
+
</View>
|
|
141
|
+
</View>
|
|
142
|
+
<ScrollView style={{ flex:1 }}>
|
|
143
|
+
|
|
144
|
+
{pct_complete < 1 ?
|
|
145
|
+
<View style={{ backgroundColor:Colors.shades.white, padding:10 }}>
|
|
146
|
+
<View>
|
|
147
|
+
<TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:10 }} onPress={() => setShowSteps(!show_steps)}>
|
|
148
|
+
<View style={{ flex:1, marginRight:10 }}>
|
|
149
|
+
<Text color={Colors.brand.midnight} size={14} weight='bold'>Setup your wallet</Text>
|
|
150
|
+
<Text style={{ marginTop:3 }} color={Colors.brand.slate} size={14} weight='regular'>Complete all the steps below to have full access to move funds in and out of BettorEdge</Text>
|
|
151
|
+
</View>
|
|
152
|
+
<Icons.ChevronIcon direction={show_steps ? 'up' : 'down'} color={Colors.brand.midnight} size={10} />
|
|
153
|
+
</TouchableOpacity>
|
|
154
|
+
<View style={{ flexDirection:'row', justifyContent:'center', alignItems:'center', }}>
|
|
155
|
+
<Text size={14} weight='bold'>{(pct_complete * 100).toFixed()}%</Text>
|
|
156
|
+
<View style={{ marginLeft:20, height:10, width:width - 100, backgroundColor:Colors.brand.slate, borderRadius:15 }}>
|
|
157
|
+
<View style={{ position:'absolute', top:0, left:0, bottom:0, width: (width-100)*pct_complete, backgroundColor:Colors.utility.success, borderRadius:15 }} />
|
|
158
|
+
</View>
|
|
159
|
+
</View>
|
|
160
|
+
</View>
|
|
161
|
+
{show_steps ?
|
|
162
|
+
<View style={{marginTop:5, borderTopWidth:1, borderColor:Colors.shades.shade600 }}>
|
|
163
|
+
<FlatList
|
|
164
|
+
data={walkthrough_steps}
|
|
165
|
+
renderItem={renderSteps}
|
|
166
|
+
keyExtractor={(item) => item.step}
|
|
167
|
+
/>
|
|
168
|
+
</View>
|
|
169
|
+
:<></>}
|
|
170
|
+
</View>
|
|
171
|
+
:<></>}
|
|
172
|
+
<View style={{ padding:10 }}>
|
|
173
|
+
<FlatList
|
|
174
|
+
key={'wallet_sections'}
|
|
175
|
+
data={sections}
|
|
176
|
+
renderItem={renderSections}
|
|
177
|
+
keyExtractor={(item) => item.section}
|
|
178
|
+
/>
|
|
179
|
+
</View>
|
|
180
|
+
</ScrollView>
|
|
181
|
+
<View nativeID='action_row' style={{ padding:20 }}>
|
|
182
|
+
<Button
|
|
183
|
+
title='CLOSE'
|
|
184
|
+
title_color={Colors.brand.electric}
|
|
185
|
+
borderWidth={1}
|
|
186
|
+
borderColor={Colors.brand.electric}
|
|
187
|
+
padding={15}
|
|
188
|
+
onPress={() => onClose()}
|
|
189
|
+
/>
|
|
190
|
+
</View>
|
|
191
|
+
|
|
192
|
+
</View>
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export default WalletActionSelector
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useState } from "react"
|
|
3
|
+
import type { MyPlayerProps } from '../../ProfileManager/api/types';
|
|
4
|
+
import type { PlayerDepositLimitProps, PlayerReferralProps, PlayerWithdrawLimitProps, PromoProps } from '../../types';
|
|
5
|
+
import { View, TouchableOpacity } from 'react-native';
|
|
6
|
+
import { Button, Icons, Text } from '../../Components';
|
|
7
|
+
import Colors from '../../constants/colors';
|
|
8
|
+
import { WalletHelpers } from '../api';
|
|
9
|
+
|
|
10
|
+
type BEWalletProps = {
|
|
11
|
+
player:MyPlayerProps,
|
|
12
|
+
deposit_limit:PlayerDepositLimitProps,
|
|
13
|
+
withdraw_limit:PlayerWithdrawLimitProps,
|
|
14
|
+
my_referral: {
|
|
15
|
+
player_referral?:PlayerReferralProps,
|
|
16
|
+
promo?:PromoProps
|
|
17
|
+
}
|
|
18
|
+
onPremium?:() => void,
|
|
19
|
+
onClose:() => void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const WalletSettings = ({ player, my_referral, deposit_limit, withdraw_limit, onPremium, onClose }:BEWalletProps) => {
|
|
23
|
+
const [ active_tab, setActiveTab ] = useState('deposit');
|
|
24
|
+
|
|
25
|
+
//const promo = useSelector((state:RootState) => state.wallet.promo, (left, right) => left?.promo_id == right?.promo_id);
|
|
26
|
+
//const player_referral = useSelector((state:RootState) => state.wallet.player_referral, (left, right) => left?.last_update_datetime == right?.last_update_datetime);
|
|
27
|
+
|
|
28
|
+
const { player_referral, promo } = my_referral
|
|
29
|
+
//const tabs = ['referral','deposit','withdraw']
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if(!player){ return <></> }
|
|
34
|
+
return (
|
|
35
|
+
<View style={{ flex:1 }}>
|
|
36
|
+
<View style={{ padding:20 }}>
|
|
37
|
+
<Text size={26} color={Colors.brand.midnight} weight='bold'>WALLET SETTINGS</Text>
|
|
38
|
+
<Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>Below are your overall wallet settings & configurations. These are set based on account type and past transaction history.</Text>
|
|
39
|
+
</View>
|
|
40
|
+
<View style={{ flexDirection: 'row', paddingLeft:10, paddingRight:10 }}>
|
|
41
|
+
<TouchableOpacity
|
|
42
|
+
style={{ flex:1, borderWidth:1,borderColor:Colors.shades.shade600, padding:10, borderTopRightRadius:8, borderTopLeftRadius:8, backgroundColor:active_tab=='deposit'?Colors.brand.midnight:undefined }}
|
|
43
|
+
onPress={() => setActiveTab('deposit')}
|
|
44
|
+
>
|
|
45
|
+
<Text weight={active_tab == 'deposit'?'bold':'regular'} textAlign="center" size={14} color={active_tab=='deposit'?Colors.shades.white:Colors.brand.midnight}>Deposit</Text>
|
|
46
|
+
</TouchableOpacity>
|
|
47
|
+
<TouchableOpacity
|
|
48
|
+
style={{ flex:1, borderWidth:1, borderColor:Colors.shades.shade600, padding:10, borderTopRightRadius:8, borderTopLeftRadius:8, backgroundColor:active_tab=='withdraw'?Colors.brand.midnight:undefined }}
|
|
49
|
+
onPress={() => setActiveTab('withdraw')}
|
|
50
|
+
>
|
|
51
|
+
<Text weight={active_tab == 'withdraw'?'bold':'regular'} textAlign="center" size={14} color={active_tab=='withdraw'?Colors.shades.white:Colors.brand.midnight}>Withdraw</Text>
|
|
52
|
+
</TouchableOpacity>
|
|
53
|
+
<TouchableOpacity
|
|
54
|
+
style={{ flex:1, borderWidth:1, borderColor:Colors.shades.shade600, padding:10, borderTopRightRadius:8, borderTopLeftRadius:8, backgroundColor:active_tab=='referral'?Colors.brand.midnight:undefined }}
|
|
55
|
+
onPress={() => setActiveTab('referral')}
|
|
56
|
+
>
|
|
57
|
+
<Text weight={active_tab == 'referral'?'bold':'regular'} textAlign="center" size={14} color={active_tab=='referral'?Colors.shades.white:Colors.brand.midnight}>Referral</Text>
|
|
58
|
+
</TouchableOpacity>
|
|
59
|
+
</View>
|
|
60
|
+
<View nativeID="settings" style={{ flex:1, marginLeft:10, marginRight:10, borderRightWidth:1, borderLeftWidth:1, borderBottomWidth:1, borderColor:Colors.shades.shade600 }}>
|
|
61
|
+
{active_tab == 'deposit' ?
|
|
62
|
+
<View>
|
|
63
|
+
{deposit_limit ?
|
|
64
|
+
<View nativeID="deposit_limit">
|
|
65
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10 }}>
|
|
66
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Deposit Settings</Text>
|
|
67
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Below are your current deposit limits. These may change based on historical transaction results.</Text>
|
|
68
|
+
</View>
|
|
69
|
+
<View style={{ padding:10 }}>
|
|
70
|
+
|
|
71
|
+
<View style={{ flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
72
|
+
<View style={{ flex:1 }}>
|
|
73
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>ACH Daily Limit</Text>
|
|
74
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>The maximum deposit amount allowed per day from an ACH account</Text>
|
|
75
|
+
</View>
|
|
76
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
77
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">${deposit_limit.ach_daily_limit}</Text>
|
|
78
|
+
</View>
|
|
79
|
+
</View>
|
|
80
|
+
<View style={{ marginTop:10, flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
81
|
+
<View style={{ flex:1 }}>
|
|
82
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Card / Paypal Daily Limit</Text>
|
|
83
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>The maximum deposit amount allowed per day from a card account</Text>
|
|
84
|
+
</View>
|
|
85
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
86
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">${deposit_limit.card_daily_limit}</Text>
|
|
87
|
+
</View>
|
|
88
|
+
</View>
|
|
89
|
+
<View style={{ flexDirection:'row', alignItems:'flex-start', marginTop:10, padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
90
|
+
<View style={{ flex:1 }}>
|
|
91
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Instant Deposit Limit</Text>
|
|
92
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>The total amount of unsettled deposits that will be instantly added to your wallet. Any deposit over this amount will be held until it settles.</Text>
|
|
93
|
+
</View>
|
|
94
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
95
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">${deposit_limit.instant_limit}</Text>
|
|
96
|
+
</View>
|
|
97
|
+
</View>
|
|
98
|
+
<View style={{ marginTop:10, flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
99
|
+
<View style={{ flex:1 }}>
|
|
100
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Hold Days</Text>
|
|
101
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>The number of days a deposit transaction will be held (not settled) before it can be withdrawn</Text>
|
|
102
|
+
</View>
|
|
103
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
104
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{deposit_limit.hold_days}</Text>
|
|
105
|
+
</View>
|
|
106
|
+
</View>
|
|
107
|
+
<View style={{ flexDirection:'row', alignItems:'flex-start', marginTop:10, padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
108
|
+
<View style={{ flex:1 }}>
|
|
109
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Instant Deposit Available</Text>
|
|
110
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Your instant deposit limit minus your unsettled deposits</Text>
|
|
111
|
+
</View>
|
|
112
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
113
|
+
<Text size={14} color={deposit_limit.instant_available > 0 ? Colors.utility.success : Colors.utility.error} weight="bold">${deposit_limit.instant_available.toFixed(2)}</Text>
|
|
114
|
+
</View>
|
|
115
|
+
</View>
|
|
116
|
+
</View>
|
|
117
|
+
</View>
|
|
118
|
+
:<></>}
|
|
119
|
+
</View>
|
|
120
|
+
:active_tab == 'withdraw' ?
|
|
121
|
+
<View>
|
|
122
|
+
{withdraw_limit ?
|
|
123
|
+
<View nativeID="withdraw_settings">
|
|
124
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10 }}>
|
|
125
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Withdraw Settings</Text>
|
|
126
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Below are your current withdraw settings and limits. These may change based on historical transaction results.</Text>
|
|
127
|
+
</View>
|
|
128
|
+
<View style={{ padding:10 }}>
|
|
129
|
+
<View style={{ flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
130
|
+
<View style={{ flex:1 }}>
|
|
131
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Weekly Withdraw Transaction Limit</Text>
|
|
132
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>The number of withdraws allowed per rolling week.</Text>
|
|
133
|
+
</View>
|
|
134
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
135
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{withdraw_limit.withdraws_per_week}</Text>
|
|
136
|
+
</View>
|
|
137
|
+
</View>
|
|
138
|
+
{withdraw_limit?.week_withdraw_count ?
|
|
139
|
+
<View style={{ marginTop:10, flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
140
|
+
<View style={{ flex:1 }}>
|
|
141
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Withdraws Remaining</Text>
|
|
142
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Withdraw transaction limit minus the number of withdraws already processed in the last 7 days</Text>
|
|
143
|
+
</View>
|
|
144
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
145
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{withdraw_limit.withdraws_per_week - withdraw_limit.week_withdraw_count}</Text>
|
|
146
|
+
</View>
|
|
147
|
+
</View>
|
|
148
|
+
:<></>}
|
|
149
|
+
<View style={{ marginTop:10, flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
150
|
+
<View style={{ flex:1 }}>
|
|
151
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>ACH Withdraw Daily Limit</Text>
|
|
152
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Maximum amount of withdraws that can be made per rolling 24 hours to an ACH account.</Text>
|
|
153
|
+
</View>
|
|
154
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
155
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{withdraw_limit.ach_daily_limit}</Text>
|
|
156
|
+
</View>
|
|
157
|
+
</View>
|
|
158
|
+
<View style={{ marginTop:10, flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
159
|
+
<View style={{ flex:1 }}>
|
|
160
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Card Withdraw Daily Limit</Text>
|
|
161
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Maximum amount of withdraws that can be made per rolling 24 hours to a card account.</Text>
|
|
162
|
+
</View>
|
|
163
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
164
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{withdraw_limit.card_daily_limit}</Text>
|
|
165
|
+
</View>
|
|
166
|
+
</View>
|
|
167
|
+
</View>
|
|
168
|
+
</View>
|
|
169
|
+
:<></>}
|
|
170
|
+
</View>
|
|
171
|
+
:active_tab == 'referral' ?
|
|
172
|
+
<View>
|
|
173
|
+
{player_referral && promo ?
|
|
174
|
+
<View nativeID="referral_settings">
|
|
175
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10 }}>
|
|
176
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>Referral Settings</Text>
|
|
177
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>Below are your current referral settings. Share your code with others to earn cash from referrals.</Text>
|
|
178
|
+
</View>
|
|
179
|
+
<View style={{ padding:10 }}>
|
|
180
|
+
{false ?
|
|
181
|
+
<TouchableOpacity style={{ flexDirection:'row', alignItems:'center', padding:10, borderRadius:8, backgroundColor:Colors.brand.electric }}>
|
|
182
|
+
<Icons.ShareIcon color={Colors.shades.white} size={8}/>
|
|
183
|
+
<Text style={{ marginLeft:5 }} size={10} color={Colors.shades.white} weight='regular'>Share Code</Text>
|
|
184
|
+
</TouchableOpacity>
|
|
185
|
+
:<></>}
|
|
186
|
+
<View style={{ flexDirection:'row', alignItems:'flex-start', padding:5, borderBottomWidth:1, borderColor:Colors.shades.shade100 }}>
|
|
187
|
+
<View style={{ flex:1 }}>
|
|
188
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold'>My Referral Code</Text>
|
|
189
|
+
<Text style={{ marginTop:5 }} size={12} color={Colors.brand.midnight} weight='regular'>{WalletHelpers.getReferralDescription(promo)}</Text>
|
|
190
|
+
</View>
|
|
191
|
+
<View style={{ backgroundColor:Colors.shades.shade100, padding:10, marginLeft:10, borderRadius:8 }}>
|
|
192
|
+
<Text size={14} color={Colors.brand.midnight} weight="bold">{player_referral.referral_code}</Text>
|
|
193
|
+
</View>
|
|
194
|
+
</View>
|
|
195
|
+
</View>
|
|
196
|
+
</View>
|
|
197
|
+
:<></>}
|
|
198
|
+
</View>
|
|
199
|
+
:<></>}
|
|
200
|
+
</View>
|
|
201
|
+
{false && player?.type == 'freemium' ?
|
|
202
|
+
<View style={{ backgroundColor:Colors.shades.shade600, borderRadius:8, padding:10, margin:10 }}>
|
|
203
|
+
<Text size={14} color={Colors.brand.midnight} weight='semibold' textAlign="center">Want better limits and higher referral awards?</Text>
|
|
204
|
+
<TouchableOpacity style={{ marginTop:5, borderRadius:8, backgroundColor:Colors.incentive.gold, padding:15 }} onPress={() => {if(onPremium){ return onPremium() }}}>
|
|
205
|
+
<Text size={14} color={Colors.shades.white} weight='bold' textAlign="center">VIEW PREMIUM</Text>
|
|
206
|
+
</TouchableOpacity>
|
|
207
|
+
</View>
|
|
208
|
+
:<></>}
|
|
209
|
+
<View style={{ padding:20 }}>
|
|
210
|
+
<Button
|
|
211
|
+
title='BACK'
|
|
212
|
+
title_color={Colors.brand.electric}
|
|
213
|
+
borderWidth={1}
|
|
214
|
+
borderColor={Colors.brand.electric}
|
|
215
|
+
padding={15}
|
|
216
|
+
onPress={() => onClose()}
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
</View>
|
|
220
|
+
)
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export default WalletSettings
|
|
224
|
+
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { View, Image, TouchableOpacity, Linking } from "react-native";
|
|
3
3
|
import type { WalletSettingsProps } from '../../types';
|
|
4
|
-
import { Button, Checkbox, Text, TextInput } from '../../Components';
|
|
4
|
+
import { Button, Checkbox, Icons, Text, TextInput } from '../../Components';
|
|
5
5
|
import Colors from '../../constants/colors';
|
|
6
6
|
import type { MyPlayerProps } from '../../ProfileManager/api/types';
|
|
7
7
|
import { WalletApi } from '../api';
|
|
8
8
|
import moment from 'moment-mini';
|
|
9
|
+
import { button_styles } from '../../constants/styles';
|
|
9
10
|
|
|
10
11
|
type WalletSetupProps = {
|
|
11
12
|
player: MyPlayerProps,
|
|
12
13
|
wallet_settings: WalletSettingsProps,
|
|
13
14
|
onSettingsUpdate:(ws:WalletSettingsProps) => void,
|
|
15
|
+
onClose?:() => void,
|
|
16
|
+
onNext?:() => void
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) => {
|
|
19
|
+
const WalletSetup = ({ wallet_settings, onSettingsUpdate, onClose, onNext }:WalletSetupProps) => {
|
|
17
20
|
const [ terms_agreed, setTermsAgreed ] = useState(false);
|
|
18
21
|
const [ auth_error, setAuthError ] = useState<string>();
|
|
19
22
|
const [ pin_view, setPinView ] = useState<'set'|'confirm'>('set');
|
|
@@ -25,7 +28,7 @@ const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) =>
|
|
|
25
28
|
|
|
26
29
|
const pin_valid = pin.length >= 4 ? true:false;
|
|
27
30
|
const go_valid = pin_valid && confirm_pin == pin ? true : false;
|
|
28
|
-
|
|
31
|
+
|
|
29
32
|
const handleAgreeTerms = async() => {
|
|
30
33
|
const ws = await WalletApi.agreeToTerms()
|
|
31
34
|
onSettingsUpdate(ws)
|
|
@@ -52,8 +55,14 @@ const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) =>
|
|
|
52
55
|
return (
|
|
53
56
|
<View style={{ flex:1 }}>
|
|
54
57
|
<View style={{ padding:20 }}>
|
|
55
|
-
<Text size={
|
|
56
|
-
|
|
58
|
+
<Text size={26} color={Colors.brand.midnight} weight='bold'>MY WALLET</Text>
|
|
59
|
+
{onNext ?
|
|
60
|
+
<Text style={{ marginTop:10 }} 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>
|
|
61
|
+
:!wallet_settings.agreed_to_terms ?
|
|
62
|
+
<Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>Welcome to your wallet. This is where your sensitive account details are kept. Please review our terms and conditions!</Text>
|
|
63
|
+
:
|
|
64
|
+
<Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>Welcome to your wallet. Please enter your security pin to continue!</Text>
|
|
65
|
+
}
|
|
57
66
|
</View>
|
|
58
67
|
{!wallet_settings.agreed_to_terms ?
|
|
59
68
|
<View style={{ flex:1, padding:20 }}>
|
|
@@ -146,18 +155,41 @@ const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) =>
|
|
|
146
155
|
</View>
|
|
147
156
|
:<></>}
|
|
148
157
|
</View>
|
|
149
|
-
|
|
158
|
+
:
|
|
159
|
+
<View style={{ flex:1 }}>
|
|
160
|
+
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
161
|
+
<Image
|
|
162
|
+
source={{ uri: 'https://res.cloudinary.com/hoabts6mc/image/upload/v1717099686/Secure_lock_and_key_successfully_unlocked_it6hy0.png' }}
|
|
163
|
+
style={{ width: 250, height:250 }}
|
|
164
|
+
resizeMode='cover'
|
|
165
|
+
/>
|
|
166
|
+
</View>
|
|
167
|
+
<View style={{ margin:15, borderRadius:8, padding:10 }}>
|
|
168
|
+
<Text size={18} color={Colors.brand.midnight} weight='bold' textAlign='center'>WALLET SECURED!</Text>
|
|
169
|
+
<Text style={{ marginTop:5 }} size={14} color={Colors.brand.midnight} textAlign='center'>Select next to continue your wallet set up by adding a transaction account.</Text>
|
|
170
|
+
</View>
|
|
171
|
+
</View>
|
|
172
|
+
}
|
|
150
173
|
<View style={{ flexDirection:'row', padding:10 }}>
|
|
151
|
-
{!wallet_settings.agreed_to_terms ?
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
174
|
+
{!wallet_settings.agreed_to_terms && onClose ?
|
|
175
|
+
<View style={{ flex:1, flexDirection:'row' }}>
|
|
176
|
+
<Button
|
|
177
|
+
title='EXIT SETUP'
|
|
178
|
+
style={{ flex:1, marginRight:5 }}
|
|
179
|
+
title_color={Colors.utility.error}
|
|
180
|
+
backgroundColor='transparent'
|
|
181
|
+
onPress={() => onClose()}
|
|
182
|
+
/>
|
|
183
|
+
<Button
|
|
184
|
+
title='I AGREE'
|
|
185
|
+
style={{ flex:3, opacity:terms_agreed?1:0.5 }}
|
|
186
|
+
disabled={!terms_agreed}
|
|
187
|
+
backgroundColor={Colors.brand.electric}
|
|
188
|
+
title_color={Colors.shades.white}
|
|
189
|
+
padding={15}
|
|
190
|
+
onPress={() => handleAgreeTerms()}
|
|
191
|
+
/>
|
|
192
|
+
</View>
|
|
161
193
|
: !wallet_settings.pin && pin_view == 'set' ?
|
|
162
194
|
<Button
|
|
163
195
|
title='CONFIRM PIN'
|
|
@@ -188,7 +220,24 @@ const WalletSetup = ({ wallet_settings, onSettingsUpdate }:WalletSetupProps) =>
|
|
|
188
220
|
padding={15}
|
|
189
221
|
onPress={() => handleAuthPin()}
|
|
190
222
|
/>
|
|
191
|
-
|
|
223
|
+
: onClose && onNext ?
|
|
224
|
+
<View style={{ flex:1, flexDirection:'row', alignItems:'center', justifyContent:'space-between' }}>
|
|
225
|
+
<Button
|
|
226
|
+
title='EXIT SETUP'
|
|
227
|
+
title_color={Colors.utility.error}
|
|
228
|
+
backgroundColor='transparent'
|
|
229
|
+
onPress={() => onClose()}
|
|
230
|
+
/>
|
|
231
|
+
<TouchableOpacity
|
|
232
|
+
style={button_styles.wizard_valid}
|
|
233
|
+
onPress={() => onNext()}
|
|
234
|
+
//disabled={loading}
|
|
235
|
+
>
|
|
236
|
+
<Icons.ChevronIcon size={20} direction='right' color={Colors.brand.midnight}/>
|
|
237
|
+
</TouchableOpacity>
|
|
238
|
+
</View>
|
|
239
|
+
:<></>
|
|
240
|
+
}
|
|
192
241
|
</View>
|
|
193
242
|
</View>
|
|
194
243
|
)
|