diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-12-22 09:19:53 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-12-22 09:19:53 +0800 |
commit | 05ce7086f78e344aee23bb95de56d28317074a7d (patch) | |
tree | 7daf845ef32b20138da9db9d3fbcf06df3b8d41c /app | |
parent | 48f2ae2154b6e804ee60cfc1235025c128a6cfa8 (diff) | |
download | tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar.gz tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar.bz2 tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar.lz tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar.xz tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.tar.zst tangerine-wallet-browser-05ce7086f78e344aee23bb95de56d28317074a7d.zip |
Added error when trying to unlock uninitialized vault
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/keyring-controller.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 1786f7c24..4e9193ab2 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -721,6 +721,10 @@ module.exports = class KeyringController extends EventEmitter { // initializing the persisted keyrings to RAM. unlockKeyrings (password) { const encryptedVault = this.configManager.getVault() + if (!encryptedVault) { + throw new Error('Cannot unlock without a previous vault.') + } + return this.encryptor.decrypt(password, encryptedVault) .then((vault) => { this.password = password |