diff --git a/src/libs/actions/BankAccounts.js b/src/libs/actions/BankAccounts.js index f2697261a6f..e8dac3382bf 100644 --- a/src/libs/actions/BankAccounts.js +++ b/src/libs/actions/BankAccounts.js @@ -9,7 +9,6 @@ import * as API from '../API'; import BankAccount from '../models/BankAccount'; import Growl from '../Growl'; import {translateLocal} from '../translate'; -import Navigation from '../Navigation/Navigation'; /** * List of bank accounts. This data should not be stored in Onyx since it contains unmasked PANs. @@ -574,7 +573,6 @@ function validateBankAccount(bankAccountID, validateCode) { API.BankAccount_Validate({bankAccountID, validateCode}) .then((response) => { if (response.jsonCode === 200) { - Growl.show('Bank Account successfully validated!', CONST.GROWL.SUCCESS, 5000); Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT, null); API.User_IsUsingExpensifyCard() .then(({isUsingExpensifyCard}) => { @@ -584,12 +582,7 @@ function validateBankAccount(bankAccountID, validateCode) { achData: {state: BankAccount.STATE.OPEN}, }; - if (isUsingExpensifyCard) { - Navigation.dismissModal(); - } else { - reimbursementAccount.achData.currentStep = CONST.BANK_ACCOUNT.STEP.ENABLE; - } - + reimbursementAccount.achData.currentStep = CONST.BANK_ACCOUNT.STEP.ENABLE; Onyx.merge(ONYXKEYS.USER, {isUsingExpensifyCard}); Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, reimbursementAccount); }); diff --git a/src/pages/ReimbursementAccount/ReimbursementAccountForm.js b/src/pages/ReimbursementAccount/ReimbursementAccountForm.js index 3b1d5babd43..78a6be66527 100644 --- a/src/pages/ReimbursementAccount/ReimbursementAccountForm.js +++ b/src/pages/ReimbursementAccount/ReimbursementAccountForm.js @@ -11,6 +11,7 @@ import reimbursementAccountPropTypes from './reimbursementAccountPropTypes'; import compose from '../../libs/compose'; import ONYXKEYS from '../../ONYXKEYS'; import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButton'; +import CONST from '../../CONST'; const propTypes = { /** ACH data for the withdrawal account actively being set up */ @@ -34,6 +35,12 @@ class ReimbursementAccountForm extends React.Component { // @TODO once all validation errors show in multiples we can remove this check || lodashGet(this.props, 'reimbursementAccount.error', '').length > 0; + const currentStep = lodashGet( + this.props, + 'reimbursementAccount.achData.currentStep', + CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT, + ); + return ( { this.form.scrollTo({y: 0, animated: true});