Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
fix(MyWallet): if wallet is updated remotely and decrypt fails, logout.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Apr 28, 2016
1 parent 98b9893 commit 16bf33e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ MyWallet.getWallet = function (success, error) {

if (success) success();
}, function () {
if (error) error();
// When re-fetching the wallet after a remote update, if we can't decrypt
// it, logout for safety.
MyWallet.logout(true);
if (error) error(
);
});
}, function (e) {
if (error) error();
Expand Down

0 comments on commit 16bf33e

Please sign in to comment.