Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Aug 9, 2021
1 parent c099fe3 commit e6ee1fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libs/actions/BankAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,20 +554,20 @@ function validateBankAccount(bankAccountID, validateCode) {
Growl.show('Bank Account successfully validated!', CONST.GROWL.SUCCESS, 3000);
API.User_IsUsingExpensifyCard()
.then(({isUsingExpensifyCard}) => {
Onyx.merge(ONYXKEYS.USER, {isUsingExpensifyCard});
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {
const reimbursementAccount = {
loading: false,
error: '',
achData: {state: BankAccount.STATE.OPEN},
});
};

if (isUsingExpensifyCard) {
Navigation.dismissModal();
} else {
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {
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);
});
return;
}
Expand Down

0 comments on commit e6ee1fe

Please sign in to comment.