@@ -190,9 +190,15 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy, navigation}:
190190 return ;
191191 }
192192
193+ // If USD bank account is in pending state, we should navigate straight to the validation step and skip Continue step
194+ if ( policyCurrency === CONST . CURRENCY . USD && achData ?. state === CONST . BANK_ACCOUNT . STATE . PENDING ) {
195+ setUSDBankAccountStep ( CONST . BANK_ACCOUNT . STEP . VALIDATION ) ;
196+ return ;
197+ }
198+
193199 setShouldShowConnectedVerifiedBankAccount ( isNonUSDWorkspace ? achData ?. state === CONST . BANK_ACCOUNT . STATE . OPEN : achData ?. currentStep === CONST . BANK_ACCOUNT . STEP . ENABLE ) ;
194200 setShouldShowContinueSetupButton ( shouldShowContinueSetupButtonValue ) ;
195- } , [ achData ?. currentStep , shouldShowContinueSetupButtonValue , isNonUSDWorkspace , isPreviousPolicy , achData ?. state ] ) ;
201+ } , [ achData ?. currentStep , shouldShowContinueSetupButtonValue , isNonUSDWorkspace , isPreviousPolicy , achData ?. state , policyCurrency ] ) ;
196202
197203 useEffect (
198204 ( ) => {
@@ -354,9 +360,6 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy, navigation}:
354360 case CONST . BANK_ACCOUNT . STEP . VALIDATION :
355361 if ( [ CONST . BANK_ACCOUNT . STATE . VERIFYING , CONST . BANK_ACCOUNT . STATE . SETUP ] . some ( ( value ) => value === achData ?. state ) ) {
356362 goToWithdrawalAccountSetupStep ( CONST . BANK_ACCOUNT . STEP . ACH_CONTRACT ) ;
357- } else if ( ! isOffline && achData ?. state === CONST . BANK_ACCOUNT . STATE . PENDING ) {
358- setShouldShowContinueSetupButton ( true ) ;
359- setUSDBankAccountStep ( null ) ;
360363 } else {
361364 Navigation . goBack ( ) ;
362365 }
@@ -365,7 +368,7 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy, navigation}:
365368 default :
366369 Navigation . dismissModal ( ) ;
367370 }
368- } , [ achData , currentStep , isOffline , onfidoToken ] ) ;
371+ } , [ achData , currentStep , onfidoToken ] ) ;
369372
370373 const isLoading =
371374 ( isLoadingApp || ( reimbursementAccount ?. isLoading && ! reimbursementAccount ?. isCreateCorpayBankAccount ) ) &&
0 commit comments