Skip to content

Commit 4025244

Browse files
committed
corrections by code review
1 parent 2b2ef0f commit 4025244

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

examples/wallet/app/actions/account.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,8 @@ export function setAccountFromPrivateKey(
8181
dispatch(updateNodeSettings()),
8282
dispatch(updateAccountState())
8383
])
84-
.then(() => dispatch(push(routes.WALLET)))
85-
.catch(error => {
86-
console.error(error);
87-
dispatch(push(routes.WALLET));
88-
});
84+
.catch(console.error)
85+
.then(() => dispatch(push(routes.WALLET)));
8986
});
9087
};
9188
}
@@ -115,11 +112,8 @@ const initializeKeysAndRedirect = (
115112
dispatch(updateNodeSettings()),
116113
dispatch(updateAccountState())
117114
])
118-
.then(() => dispatch(push(routes.WALLET)))
119-
.catch(error => {
120-
console.log(error);
121-
dispatch(push(routes.WALLET));
122-
});
115+
.catch(console.error)
116+
.then(() => dispatch(push(routes.WALLET)));
123117
};
124118

125119
export function setAccountFromMnemonic(

0 commit comments

Comments
 (0)