Re-lock account only after save

This commit is contained in:
Jaco Greeff 2018-10-09 17:21:14 +02:00 committed by GitHub
parent 25d57d0be3
commit 0a38f454e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,10 +153,11 @@ class Restore extends React.PureComponent<Props, State> {
hexToU8a(json.encoded)
);
// unlock, save account and then lock (locking cleans secretKey, so needs to be last)
pair.decodePkcs8(password);
keyring.addAccountPair(pair, password);
pair.lock();
keyring.addAccountPair(pair, password);
InputAddress.setLastValue('account', pair.address());
onBack();
} catch (error) {