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.
Files changed (172) hide show
  1. package/lib/commonjs/Checkout/components/AccountSummaryCard.js +52 -57
  2. package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
  3. package/lib/commonjs/Checkout/components/ItemSummaryCard.js +8 -11
  4. package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -1
  5. package/lib/commonjs/Checkout/components/OrderSummaryCard.js +21 -25
  6. package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
  7. package/lib/commonjs/Checkout/components/PayPalHtml.js +32 -0
  8. package/lib/commonjs/Checkout/components/PayPalHtml.js.map +1 -0
  9. package/lib/commonjs/Checkout/components/PayPalWebview.js +125 -0
  10. package/lib/commonjs/Checkout/components/PayPalWebview.js.map +1 -0
  11. package/lib/commonjs/Checkout/components/ShippingSummaryCard.js +11 -15
  12. package/lib/commonjs/Checkout/components/ShippingSummaryCard.js.map +1 -1
  13. package/lib/commonjs/Checkout/index.js +92 -146
  14. package/lib/commonjs/Checkout/index.js.map +1 -1
  15. package/lib/commonjs/Components/Checkbox.js +7 -5
  16. package/lib/commonjs/Components/Checkbox.js.map +1 -1
  17. package/lib/commonjs/Components/Icons.js +9 -9
  18. package/lib/commonjs/Components/Icons.js.map +1 -1
  19. package/lib/commonjs/Wallet/components/ACHAddCard.js +233 -194
  20. package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
  21. package/lib/commonjs/Wallet/components/AddressCard.js +19 -17
  22. package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -1
  23. package/lib/commonjs/Wallet/components/AddressManager.js +64 -92
  24. package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
  25. package/lib/commonjs/Wallet/components/FundAccountCard.js +106 -95
  26. package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
  27. package/lib/commonjs/Wallet/components/LinkAccountManager.js +80 -106
  28. package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
  29. package/lib/commonjs/Wallet/components/ManualACHAdd.js +155 -151
  30. package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
  31. package/lib/commonjs/Wallet/components/ManualCardAdd.js +207 -204
  32. package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
  33. package/lib/commonjs/Wallet/components/MyBalance.js +73 -66
  34. package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
  35. package/lib/commonjs/Wallet/components/WalletSetup.js +286 -246
  36. package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
  37. package/lib/commonjs/Wallet/index.js +1 -0
  38. package/lib/commonjs/Wallet/index.js.map +1 -1
  39. package/lib/module/Checkout/components/AccountSummaryCard.js +25 -30
  40. package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
  41. package/lib/module/Checkout/components/ItemSummaryCard.js +4 -7
  42. package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -1
  43. package/lib/module/Checkout/components/OrderSummaryCard.js +9 -13
  44. package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
  45. package/lib/module/Checkout/components/PayPalHtml.js +25 -0
  46. package/lib/module/Checkout/components/PayPalHtml.js.map +1 -0
  47. package/lib/module/Checkout/components/PayPalWebview.js +118 -0
  48. package/lib/module/Checkout/components/PayPalWebview.js.map +1 -0
  49. package/lib/module/Checkout/components/ShippingSummaryCard.js +5 -9
  50. package/lib/module/Checkout/components/ShippingSummaryCard.js.map +1 -1
  51. package/lib/module/Checkout/index.js +58 -112
  52. package/lib/module/Checkout/index.js.map +1 -1
  53. package/lib/module/Components/Checkbox.js +6 -4
  54. package/lib/module/Components/Checkbox.js.map +1 -1
  55. package/lib/module/Components/Icons.js +10 -10
  56. package/lib/module/Components/Icons.js.map +1 -1
  57. package/lib/module/Wallet/components/ACHAddCard.js +233 -194
  58. package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
  59. package/lib/module/Wallet/components/AddressCard.js +14 -12
  60. package/lib/module/Wallet/components/AddressCard.js.map +1 -1
  61. package/lib/module/Wallet/components/AddressManager.js +29 -57
  62. package/lib/module/Wallet/components/AddressManager.js.map +1 -1
  63. package/lib/module/Wallet/components/FundAccountCard.js +71 -60
  64. package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
  65. package/lib/module/Wallet/components/LinkAccountManager.js +55 -81
  66. package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
  67. package/lib/module/Wallet/components/ManualACHAdd.js +146 -141
  68. package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
  69. package/lib/module/Wallet/components/ManualCardAdd.js +204 -201
  70. package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
  71. package/lib/module/Wallet/components/MyBalance.js +45 -38
  72. package/lib/module/Wallet/components/MyBalance.js.map +1 -1
  73. package/lib/module/Wallet/components/WalletSetup.js +287 -247
  74. package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
  75. package/lib/module/Wallet/index.js +1 -0
  76. package/lib/module/Wallet/index.js.map +1 -1
  77. package/lib/typescript/lib/commonjs/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  78. package/lib/typescript/lib/commonjs/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  79. package/lib/typescript/lib/commonjs/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts +3 -0
  81. package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts.map +1 -0
  82. package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts +4 -0
  83. package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts.map +1 -0
  84. package/lib/typescript/lib/commonjs/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  85. package/lib/typescript/lib/commonjs/Checkout/index.d.ts.map +1 -1
  86. package/lib/typescript/lib/commonjs/Components/Checkbox.d.ts.map +1 -1
  87. package/lib/typescript/lib/commonjs/Wallet/components/ACHAddCard.d.ts.map +1 -1
  88. package/lib/typescript/lib/commonjs/Wallet/components/AddressCard.d.ts.map +1 -1
  89. package/lib/typescript/lib/commonjs/Wallet/components/AddressManager.d.ts.map +1 -1
  90. package/lib/typescript/lib/commonjs/Wallet/components/FundAccountCard.d.ts.map +1 -1
  91. package/lib/typescript/lib/commonjs/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  92. package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  93. package/lib/typescript/lib/commonjs/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  94. package/lib/typescript/lib/commonjs/Wallet/components/MyBalance.d.ts.map +1 -1
  95. package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
  96. package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
  97. package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts +1 -2
  98. package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  99. package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -2
  100. package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  101. package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts +1 -2
  102. package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  103. package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts +2 -0
  104. package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts.map +1 -0
  105. package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts +5 -0
  106. package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts.map +1 -0
  107. package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts +1 -2
  108. package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  109. package/lib/typescript/lib/module/Checkout/index.d.ts +1 -2
  110. package/lib/typescript/lib/module/Checkout/index.d.ts.map +1 -1
  111. package/lib/typescript/lib/module/Components/Checkbox.d.ts +1 -2
  112. package/lib/typescript/lib/module/Components/Checkbox.d.ts.map +1 -1
  113. package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
  114. package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts +1 -2
  115. package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts.map +1 -1
  116. package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts +1 -2
  117. package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts.map +1 -1
  118. package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts +1 -2
  119. package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts.map +1 -1
  120. package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts +1 -2
  121. package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts.map +1 -1
  122. package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts +1 -2
  123. package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  124. package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +1 -2
  125. package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  126. package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts +1 -2
  127. package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  128. package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts +1 -2
  129. package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts.map +1 -1
  130. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +1 -2
  131. package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
  132. package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
  133. package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
  134. package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
  135. package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
  136. package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts +2 -0
  137. package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts.map +1 -0
  138. package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts +4 -0
  139. package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts.map +1 -0
  140. package/lib/typescript/src/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
  141. package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
  142. package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
  143. package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
  144. package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -1
  145. package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
  146. package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
  147. package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
  148. package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
  149. package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
  150. package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
  151. package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
  152. package/package.json +2 -1
  153. package/src/Checkout/components/AccountSummaryCard.tsx +25 -27
  154. package/src/Checkout/components/ItemSummaryCard.tsx +4 -6
  155. package/src/Checkout/components/OrderSummaryCard.tsx +9 -11
  156. package/src/Checkout/components/PayPalHtml.ts +26 -0
  157. package/src/Checkout/components/PayPalOrderCapture.tsx +1 -1
  158. package/src/Checkout/components/PayPalWebview.tsx +118 -0
  159. package/src/Checkout/components/ShippingSummaryCard.tsx +5 -8
  160. package/src/Checkout/index.tsx +68 -96
  161. package/src/Components/Checkbox.tsx +7 -6
  162. package/src/Components/Icons.tsx +10 -10
  163. package/src/Wallet/components/ACHAddCard.tsx +90 -60
  164. package/src/Wallet/components/AddressCard.tsx +11 -11
  165. package/src/Wallet/components/AddressManager.tsx +33 -44
  166. package/src/Wallet/components/FundAccountCard.tsx +52 -51
  167. package/src/Wallet/components/LinkAccountManager.tsx +49 -59
  168. package/src/Wallet/components/ManualACHAdd.tsx +99 -79
  169. package/src/Wallet/components/ManualCardAdd.tsx +119 -95
  170. package/src/Wallet/components/MyBalance.tsx +38 -40
  171. package/src/Wallet/components/WalletSetup.tsx +138 -113
  172. package/src/Wallet/index.tsx +7 -7
@@ -1,12 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import { TouchableOpacity, View, Linking } from "react-native"
3
- import { Button, Icons, Text } from '../../Components';
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 size={26} color={Colors.brand.midnight} weight='bold'>LINK NEW ACCOUNT</Text>
80
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>Link an account via instant bank transfer and get access to instant deposits and withdraws.</Text>
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
- <Icons.IBTFLowIcon size={350} />
84
- <View style={{backgroundColor:Colors.shades.shade100, padding:20, marginTop:20}}>
85
- <Text size={16} color={Colors.brand.cobalt} weight='light' textAlign='center' style={{marginBottom:2}}>Using <TouchableOpacity onPress={() => window.open('https://plaid.com/safety', '_blank')}><Text weight='bold' color={Colors.brand.electric} size={18}>Plaid</Text></TouchableOpacity>, you will be asked to securly login to your bank and select the account you wish to link and transact from.</Text>
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' weight='bold' size={16} color={Colors.brand.midnight}>Billing Address</Text>
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
- </View>
100
+ </View>
99
101
  </View>
100
102
 
101
103
  {error?
102
- <Text size={14} color={Colors.utility.warning}>{error}</Text>
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
- title_color={Colors.brand.electric}
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
- title_color={Colors.shades.white}
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
- title_color={Colors.shades.white}
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, backgroundColor:Colors.shades.shade600, padding:20 }}>
140
- <Text size={14} color={Colors.brand.midnight} textAlign='center'>Before we continue, we will need get the billing address associated with the account to be linked</Text>
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
- title_color={Colors.shades.white}
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
- {show_addresses.visible ?
152
- <View style={{ position:'absolute', top:0, left:0, right:0, bottom:0, backgroundColor:Colors.shades.black_faded, justifyContent:'flex-end' }}>
153
- <SpringView
154
- slide='vertical'
155
- from={500}
156
- to={0}
157
- style={{ borderTopRightRadius:40, borderTopLeftRadius:40, backgroundColor:Colors.shades.white }}>
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
- </SpringView>
165
- </View>
166
- :<></>}
167
- {account && account.status != 'redirect' ?
168
- <View style={{ position:'absolute', top:0, left:0, right:0, bottom:0, backgroundColor:Colors.shades.black_faded, justifyContent:'flex-end' }}>
169
- <SpringView
170
- slide='vertical'
171
- from={500}
172
- to={0}
173
- style={{ borderTopRightRadius:40, borderTopLeftRadius:40, backgroundColor:Colors.shades.white }}>
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.utility.success, marginTop:20 }}>
178
- <Text size={20} color={Colors.utility.success} weight='bold' textAlign='center'>Account Linked Successfully</Text>
179
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.cobalt} weight='regular' textAlign='center'>Your account has successfully been added. Please select close below to continue.</Text>
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.utility.error, marginTop:20 }}>
186
- <Text size={20} color={Colors.utility.error} weight='bold' textAlign='center'>Failed to Link Account</Text>
187
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.cobalt} weight='regular' textAlign='center'>Sorry, we were unable to link your account at this time. Please try again or reach out to support for help.</Text>
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
- //disabled={loading}
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
- </SpringView>
207
- </View>
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 { View, TouchableOpacity, ScrollView } from "react-native";
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
- <View style={{ padding:20 }}>
46
- <Text size={26} color={Colors.brand.midnight} weight='bold'>MANUAL ACH ACCOUNT</Text>
47
- <Text style={{ marginTop:10 }} size={16} color={Colors.brand.midnight} weight='regular'>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>
48
- </View>
49
- <ScrollView style={{ flex:1, padding:20 }}>
50
- <View style={{ marginTop:10 }}>
51
- <Text size={14} color={Colors.brand.midnight} weight='semibold'>Name on account</Text>
52
- <TextInput
53
- style={{ marginTop:10 }}
54
- value={`${player.first_name} ${player.last_name}`}
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
- <TouchableOpacity style={{ flexDirection:'row', alignItems:'center', paddingLeft:20, paddingRight:20 }} onPress={() => setDisclaimer(!disclaimer)}>
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} color={Colors.brand.midnight}>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>
107
- </TouchableOpacity>
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.utility.warning} textAlign='center' weight='semibold'>{error}</Text>
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
- title_color={Colors.brand.electric}
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
- title_color={Colors.shades.white}
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
- title_color={Colors.brand.electric}
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
- title_color={Colors.shades.white}
153
- backgroundColor={Colors.brand.slate}
154
- padding={15}
174
+ backgroundColor={Colors.absolutes.brand.slate}
155
175
  onPress={() => console.log('')}
156
176
  />
157
177
  </View>