be-components 7.5.8 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ApiOverrides/index.js +5 -1
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/BetRouter/components/MyOpportunities.js +14 -9
- package/lib/commonjs/BetRouter/components/MyOpportunities.js.map +1 -1
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js +92 -41
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js.map +1 -1
- package/lib/commonjs/Checkout/api/index.js +11 -3
- package/lib/commonjs/Checkout/api/index.js.map +1 -1
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js +4 -4
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/Wallet/api/index.js +21 -4
- package/lib/commonjs/Wallet/api/index.js.map +1 -1
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +18 -2
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManageAccountCard.js +32 -2
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +47 -5
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletActionSelector.js +22 -2
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/commonjs/Wallet/components/WithdrawCard.js +56 -5
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +43 -4
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +5 -1
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/BetRouter/components/MyOpportunities.js +14 -9
- package/lib/module/BetRouter/components/MyOpportunities.js.map +1 -1
- package/lib/module/BetRouter/components/OpportunityHistory.js +93 -42
- package/lib/module/BetRouter/components/OpportunityHistory.js.map +1 -1
- package/lib/module/Checkout/api/index.js +11 -3
- package/lib/module/Checkout/api/index.js.map +1 -1
- package/lib/module/Checkout/components/OrderSummaryCard.js +4 -4
- package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/Wallet/api/index.js +21 -4
- package/lib/module/Wallet/api/index.js.map +1 -1
- package/lib/module/Wallet/components/LinkAccountManager.js +18 -2
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/module/Wallet/components/ManageAccountCard.js +32 -2
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js +47 -5
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/WalletActionSelector.js +22 -2
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/module/Wallet/components/WithdrawCard.js +55 -5
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/module/Wallet/index.js +43 -4
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts +1 -2
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/Wallet/api/index.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/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts +3 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts +4 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts +1 -2
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +3 -1
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts +4 -1
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts.map +1 -1
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts +1 -1
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/api/index.d.ts +1 -0
- package/lib/typescript/src/Wallet/api/index.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts +4 -2
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts +3 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ApiOverrides/index.ts +5 -1
- package/src/BetRouter/components/MyOpportunities.tsx +24 -21
- package/src/BetRouter/components/OpportunityHistory.tsx +72 -36
- package/src/Checkout/api/index.tsx +10 -2
- package/src/Checkout/components/OrderSummaryCard.tsx +4 -4
- package/src/Checkout/index.tsx +0 -1
- package/src/ProfileManager/Components/VouchCard.tsx +3 -4
- package/src/Wallet/api/index.ts +13 -5
- package/src/Wallet/components/LinkAccountManager.tsx +14 -6
- package/src/Wallet/components/ManageAccountCard.tsx +23 -2
- package/src/Wallet/components/ManualACHAdd.tsx +31 -8
- package/src/Wallet/components/WalletActionSelector.tsx +12 -2
- package/src/Wallet/components/WithdrawCard.tsx +41 -5
- package/src/Wallet/index.tsx +28 -1
- package/src/types.d.ts +3 -0
|
@@ -5,6 +5,7 @@ import { ItemOrderApi, ItemOrderHelpers } from '../api';
|
|
|
5
5
|
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
6
6
|
import { useColors } from '../../constants/useColors';
|
|
7
7
|
import { Icons } from '../../Components';
|
|
8
|
+
import ManualACHAdd from './ManualACHAdd';
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
type WithdrawCardProps = {
|
|
@@ -12,6 +13,8 @@ type WithdrawCardProps = {
|
|
|
12
13
|
wallet_settings:WalletSettingsProps,
|
|
13
14
|
player_balance:PlayerBalanceProps,
|
|
14
15
|
account:AccountProps,
|
|
16
|
+
instant?:boolean,
|
|
17
|
+
onAccountUpdate:(account:AccountProps) => void,
|
|
15
18
|
onFocusPosition?:(pos:FocusPositionProps) => void,
|
|
16
19
|
deposit_limit:PlayerDepositLimitProps,
|
|
17
20
|
withdraw_limit:PlayerWithdrawLimitProps,
|
|
@@ -19,26 +22,38 @@ type WithdrawCardProps = {
|
|
|
19
22
|
onCancel:() => void
|
|
20
23
|
}
|
|
21
24
|
const sections = ['header','input','limits']
|
|
22
|
-
const WithdrawCard = ({ wallet_settings, onTransact, player_balance, account, withdraw_limit, onFocusPosition, deposit_limit , onCancel}:WithdrawCardProps) => {
|
|
25
|
+
const WithdrawCard = ({ player, wallet_settings, onTransact, instant, player_balance, account, withdraw_limit, onAccountUpdate, onFocusPosition, deposit_limit , onCancel}:WithdrawCardProps) => {
|
|
23
26
|
const Colors = useColors();
|
|
24
27
|
const [ draft_order, setDraftOrder ] = useState<ItemOrderProps>();
|
|
25
|
-
|
|
28
|
+
const [ confirm_ach, setConfirmAch ] = useState(false);
|
|
29
|
+
//const [ withdraw_item, setWithdrawItem ] = useState<ItemProps | undefined>(undefined);
|
|
26
30
|
useEffect(() => {
|
|
27
31
|
getItemFromServer()
|
|
28
32
|
},[])
|
|
29
33
|
|
|
30
34
|
const getItemFromServer = async() => {
|
|
31
|
-
const item = await ItemOrderApi.getItemByIdentifier('withdraw')
|
|
35
|
+
const item = await ItemOrderApi.getItemByIdentifier(instant?'instant_withdraw':'withdraw');
|
|
36
|
+
//setWithdrawItem(item);
|
|
32
37
|
setDraftOrder(ItemOrderHelpers.genWithdrawOrder(item, account))
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
|
|
36
41
|
const { errors, available_for_withdraw } = ItemOrderHelpers.isWithdrawOrderValid(account, withdraw_limit, deposit_limit, player_balance, wallet_settings, draft_order)
|
|
37
42
|
|
|
38
43
|
const handleTransact = () => {
|
|
39
44
|
if(!draft_order){ return }
|
|
40
45
|
if(errors.length > 0){ return }
|
|
41
|
-
|
|
46
|
+
|
|
47
|
+
//OK LETS CHECK THE ACCOUNT TYPE AND IF WE NEED ACCOUNT NUMBER INFORMATION
|
|
48
|
+
if(!instant){
|
|
49
|
+
if(!account.ach_detail?.account_number){
|
|
50
|
+
return setConfirmAch(true);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//Lets get the item
|
|
54
|
+
let draft_item = draft_order.items[0]
|
|
55
|
+
if(!draft_item){ return }
|
|
56
|
+
onTransact({ ...draft_order, total_amount: draft_order.amount as number, items: [{ ...draft_item, amount: draft_order.amount as number }] })
|
|
42
57
|
}
|
|
43
58
|
|
|
44
59
|
|
|
@@ -51,7 +66,9 @@ const WithdrawCard = ({ wallet_settings, onTransact, player_balance, account, wi
|
|
|
51
66
|
return (
|
|
52
67
|
<View nativeID='deposit_rules' style={{ padding:10 }}>
|
|
53
68
|
<Text size={28} textAlign='center' theme='h1'>Withdraw to your bank</Text>
|
|
69
|
+
{!instant ?
|
|
54
70
|
<Text style={{ marginTop:10 }} size={14} textAlign='center' theme='description'>Withdraws can take up to 3 business days</Text>
|
|
71
|
+
:<></>}
|
|
55
72
|
</View>
|
|
56
73
|
)
|
|
57
74
|
case 'input':
|
|
@@ -181,6 +198,25 @@ const WithdrawCard = ({ wallet_settings, onTransact, player_balance, account, wi
|
|
|
181
198
|
onPress={() => handleTransact()}
|
|
182
199
|
/>
|
|
183
200
|
</View>
|
|
201
|
+
{confirm_ach ?
|
|
202
|
+
<View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, flex:1, padding:20 }}>
|
|
203
|
+
<ManualACHAdd
|
|
204
|
+
account_id={account.account_id}
|
|
205
|
+
player={player}
|
|
206
|
+
onAddAccount={(account) => console.log(account)}
|
|
207
|
+
onUpdateAchDetails={(ach_detail) => {
|
|
208
|
+
console.log('HERE!!!')
|
|
209
|
+
let new_account = { ...account }
|
|
210
|
+
new_account.ach_detail = ach_detail
|
|
211
|
+
console.log(new_account)
|
|
212
|
+
onAccountUpdate(new_account);
|
|
213
|
+
setConfirmAch(false);
|
|
214
|
+
}}
|
|
215
|
+
onCancel={() => setConfirmAch(false)}
|
|
216
|
+
onFocusPosition={onFocusPosition}
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
:<></>}
|
|
184
220
|
</View>
|
|
185
221
|
)
|
|
186
222
|
}
|
package/src/Wallet/index.tsx
CHANGED
|
@@ -291,6 +291,7 @@ const MyWallet = ({ height, new_balance, account_id, view_mode, insets, header_s
|
|
|
291
291
|
:walkthrough.step_action == 'manual_ach' ?
|
|
292
292
|
<ManualACHAdd
|
|
293
293
|
player={player}
|
|
294
|
+
onUpdateAchDetails={(_) => console.log('')}
|
|
294
295
|
onFocusPosition={onFocusPosition}
|
|
295
296
|
onAddAccount={(acct) => {
|
|
296
297
|
setWallet({ ...wallet, accounts: accounts.concat(acct) })
|
|
@@ -343,6 +344,7 @@ const MyWallet = ({ height, new_balance, account_id, view_mode, insets, header_s
|
|
|
343
344
|
{walkthrough.step_action == 'manual_ach' ?
|
|
344
345
|
<ManualACHAdd
|
|
345
346
|
player={player}
|
|
347
|
+
onUpdateAchDetails={(_) => console.log('')}
|
|
346
348
|
onFocusPosition={onFocusPosition}
|
|
347
349
|
onAddAccount={(acct) => setWallet({ ...wallet, accounts: accounts.concat(acct) })}
|
|
348
350
|
onCancel={() => setWalkthrough({ ...walkthrough, step_action: undefined })}
|
|
@@ -485,7 +487,10 @@ const MyWallet = ({ height, new_balance, account_id, view_mode, insets, header_s
|
|
|
485
487
|
account={selected_account}
|
|
486
488
|
deposit_limit={deposit_limit}
|
|
487
489
|
withdraw_limit={withdraw_limit}
|
|
488
|
-
onAccountUpdate={(acct) =>
|
|
490
|
+
onAccountUpdate={(acct) => {
|
|
491
|
+
setWallet({ ...wallet, accounts: accounts.filter(a => a.account_id != acct.account_id).concat(acct) })
|
|
492
|
+
if(selected_account.account_id == acct.account_id){ setSelectedAccount(acct) }
|
|
493
|
+
}}
|
|
489
494
|
onClose={() => setView({active_view:'my_accounts'})}
|
|
490
495
|
onTransact={(o, account_id) => {
|
|
491
496
|
setView({ active_view: 'my_accounts' });
|
|
@@ -516,6 +521,27 @@ const MyWallet = ({ height, new_balance, account_id, view_mode, insets, header_s
|
|
|
516
521
|
wallet_settings={wallet_settings}
|
|
517
522
|
withdraw_limit={withdraw_limit}
|
|
518
523
|
deposit_limit={deposit_limit}
|
|
524
|
+
onAccountUpdate={(acct) => {
|
|
525
|
+
setWallet({ ...wallet, accounts: accounts.filter(a => a.account_id != acct.account_id).concat(acct) })
|
|
526
|
+
if(selected_account.account_id == acct.account_id){ setSelectedAccount(acct) }
|
|
527
|
+
}}
|
|
528
|
+
account={selected_account}
|
|
529
|
+
onTransact={(item_order) => onTransact(item_order, selected_account.account_id)}
|
|
530
|
+
onCancel={() => setView({active_view:'my_accounts'})}
|
|
531
|
+
/>
|
|
532
|
+
:active_view == 'instant_withdraw' && selected_account ?
|
|
533
|
+
<WithdrawCard
|
|
534
|
+
player={player}
|
|
535
|
+
instant
|
|
536
|
+
onFocusPosition={onFocusPosition}
|
|
537
|
+
player_balance={player_balance}
|
|
538
|
+
wallet_settings={wallet_settings}
|
|
539
|
+
withdraw_limit={withdraw_limit}
|
|
540
|
+
deposit_limit={deposit_limit}
|
|
541
|
+
onAccountUpdate={(acct) => {
|
|
542
|
+
setWallet({ ...wallet, accounts: accounts.filter(a => a.account_id != acct.account_id).concat(acct) })
|
|
543
|
+
if(selected_account.account_id == acct.account_id){ setSelectedAccount(acct) }
|
|
544
|
+
}}
|
|
519
545
|
account={selected_account}
|
|
520
546
|
onTransact={(item_order) => onTransact(item_order, selected_account.account_id)}
|
|
521
547
|
onCancel={() => setView({active_view:'my_accounts'})}
|
|
@@ -546,6 +572,7 @@ const MyWallet = ({ height, new_balance, account_id, view_mode, insets, header_s
|
|
|
546
572
|
:active_view == 'add_ach'?
|
|
547
573
|
<ManualACHAdd
|
|
548
574
|
player={player}
|
|
575
|
+
onUpdateAchDetails={(_) => console.log('')}
|
|
549
576
|
onFocusPosition={onFocusPosition}
|
|
550
577
|
onAddAccount={(acct) => setWallet({ ...wallet, accounts: accounts.concat(acct) })}
|
|
551
578
|
onCancel={() => setView({active_view:'my_accounts'})}
|
package/src/types.d.ts
CHANGED
|
@@ -1303,6 +1303,8 @@ export interface ACHDetailProps {
|
|
|
1303
1303
|
account_type: 'checking' | 'savings'
|
|
1304
1304
|
routing_number?:string,
|
|
1305
1305
|
account_number?:string,
|
|
1306
|
+
manual_withdraw_allowed?:boolean,
|
|
1307
|
+
instant_allowed?:boolean,
|
|
1306
1308
|
encryption_iv?:string,
|
|
1307
1309
|
session_id?:string,
|
|
1308
1310
|
payment_provider:'nuvei' | 'payliance',
|
|
@@ -1492,6 +1494,7 @@ export interface ItemProps {
|
|
|
1492
1494
|
color_options?: ColorOptionProps[],
|
|
1493
1495
|
price_editable?:boolean,
|
|
1494
1496
|
location_required?:boolean,
|
|
1497
|
+
processing_fee?:number,
|
|
1495
1498
|
location_restricted?:boolean,
|
|
1496
1499
|
locations_allowed?:string[],
|
|
1497
1500
|
shipping_address_required:boolean,
|