Skip to content

Commit

Permalink
Merge pull request #8338 from Expensify/marcaaron-fixSetWalletLinkedB…
Browse files Browse the repository at this point in the history
…ankAccount

Remove catch in `SetWalletLinkedAccount`
  • Loading branch information
marcaaron committed Mar 30, 2022
2 parents 1c4add7 + b45e58e commit 564ec88
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libs/actions/PaymentMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ function setWalletLinkedAccount(password, bankAccountID, fundID) {
Growl.show(Localize.translateLocal('paymentsPage.setDefaultSuccess'), CONST.GROWL.SUCCESS, 5000);
return;
}
Growl.show(Localize.translateLocal('paymentsPage.error.setDefaultFailure'), CONST.GROWL.ERROR, 5000);
}).catch((error) => {

// Make sure to show user more specific errors which will help support identify the problem faster.
switch (error.message) {
switch (response.message) {
case CONST.WALLET.ERROR.INVALID_WALLET:
case CONST.WALLET.ERROR.NOT_OWNER_OF_BANK_ACCOUNT:
Growl.show(`${Localize.translateLocal('paymentsPage.error.notOwnerOfBankAccount')} ${Localize.translateLocal('common.conciergeHelp')}`, CONST.GROWL.ERROR, 5000);
Expand Down

0 comments on commit 564ec88

Please sign in to comment.