@@ -6,7 +6,7 @@ import useOnyx from '@hooks/useOnyx';
66import useSubStep from '@hooks/useSubStep' ;
77import type { SubStepProps } from '@hooks/useSubStep/types' ;
88import getSubStepValues from '@pages/ReimbursementAccount/utils/getSubStepValues' ;
9- import * as BankAccounts from '@userActions/BankAccounts' ;
9+ import { acceptACHContractForBankAccount } from '@userActions/BankAccounts' ;
1010import CONST from '@src/CONST' ;
1111import ONYXKEYS from '@src/ONYXKEYS' ;
1212import INPUT_IDS from '@src/types/form/ReimbursementAccountForm' ;
@@ -23,15 +23,15 @@ const bodyContent: Array<ComponentType<SubStepProps>> = [ConfirmAgreements];
2323function CompleteVerification ( { onBackButtonPress} : CompleteVerificationProps ) {
2424 const { translate} = useLocalize ( ) ;
2525
26- const [ reimbursementAccount ] = useOnyx ( ONYXKEYS . REIMBURSEMENT_ACCOUNT ) ;
27- const [ reimbursementAccountDraft ] = useOnyx ( ONYXKEYS . FORMS . REIMBURSEMENT_ACCOUNT_FORM_DRAFT ) ;
26+ const [ reimbursementAccount ] = useOnyx ( ONYXKEYS . REIMBURSEMENT_ACCOUNT , { canBeMissing : false } ) ;
27+ const [ reimbursementAccountDraft ] = useOnyx ( ONYXKEYS . FORMS . REIMBURSEMENT_ACCOUNT_FORM_DRAFT , { canBeMissing : true } ) ;
2828
2929 const values = useMemo ( ( ) => getSubStepValues ( COMPLETE_VERIFICATION_KEYS , reimbursementAccountDraft , reimbursementAccount ) , [ reimbursementAccount , reimbursementAccountDraft ] ) ;
30- const policyID = reimbursementAccount ?. achData ?. policyID ?? '-1' ;
30+ const policyID = reimbursementAccount ?. achData ?. policyID ;
3131
3232 const submit = useCallback ( ( ) => {
33- BankAccounts . acceptACHContractForBankAccount (
34- Number ( reimbursementAccount ?. achData ?. bankAccountID ?? '-1' ) ,
33+ acceptACHContractForBankAccount (
34+ Number ( reimbursementAccount ?. achData ?. bankAccountID ) ,
3535 {
3636 isAuthorizedToUseBankAccount : values . isAuthorizedToUseBankAccount ,
3737 certifyTrueInformation : values . certifyTrueInformation ,
0 commit comments