Skip to content

Commit

Permalink
Use early return
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Oct 24, 2023
1 parent 5bc7cd1 commit c99ef52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/EnablePayments/EnablePaymentsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ function EnablePaymentsPage({userWallet}) {

if (isPendingOnfidoResult || hasFailedOnfido) {
Navigation.navigate(ROUTES.SETTINGS_WALLET, CONST.NAVIGATION.TYPE.UP);
} else {
Wallet.openEnablePaymentsPage();
return;
}

Wallet.openEnablePaymentsPage();
}, [isOffline, isPendingOnfidoResult, hasFailedOnfido]);

if (_.isEmpty(userWallet)) {
Expand Down

0 comments on commit c99ef52

Please sign in to comment.