Added error when trying to unlock uninitialized vault

feature/default_network_editable
Dan Finlay 8 years ago
parent 48f2ae2154
commit 05ce7086f7
  1. 4
      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

Loading…
Cancel
Save