Skip to content

Commit

Permalink
reset ACH data when bank account is removed instead of completely del…
Browse files Browse the repository at this point in the history
…eting it
  • Loading branch information
NikkiWines committed Nov 5, 2021
1 parent 3d22037 commit 5a44259
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/libs/actions/BankAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,15 @@ function resetFreePlanBankAccount() {
return;
}

// Clear reimbursement account, draft user input, and the bank account list
Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {});
// Reset reimbursement account, and clear draft user input, and the bank account list
const achData = {
useOnfido: true,
policyID: '',
isInSetup: true,
domainLimit: 0,
currentStep: CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT,
};
Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {achData});
Onyx.set(ONYXKEYS.REIMBURSEMENT_ACCOUNT_DRAFT, null);
Onyx.set(ONYXKEYS.BANK_ACCOUNT_LIST, []);

Expand Down

0 comments on commit 5a44259

Please sign in to comment.