aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js4
-rw-r--r--app/scripts/lib/encryptor.js1
2 files changed, 2 insertions, 3 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 141a1281a..68cf62f7a 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -118,6 +118,7 @@ module.exports = class KeyringController extends EventEmitter {
return this.idStoreMigrator.migratedVaultForPassword(password)
.then((serialized) => {
if (serialized && shouldMigrate) {
+ this.password = password
const keyring = this.restoreKeyring(serialized)
this.keyrings.push(keyring)
this.configManager.setSelectedAccount(keyring.getAccounts()[0])
@@ -185,7 +186,6 @@ module.exports = class KeyringController extends EventEmitter {
cb(null, this.getState())
})
.catch((err) => {
- console.error(err)
cb(err)
})
}
@@ -558,7 +558,7 @@ module.exports = class KeyringController extends EventEmitter {
}
setLocked (cb) {
- this.key = null
+ this.password = null
this.keyrings = []
this.emit('update')
cb()
diff --git a/app/scripts/lib/encryptor.js b/app/scripts/lib/encryptor.js
index 8bacab766..4770d2f54 100644
--- a/app/scripts/lib/encryptor.js
+++ b/app/scripts/lib/encryptor.js
@@ -42,7 +42,6 @@ function encryptWithKey (key, dataObj) {
var data = JSON.stringify(dataObj)
var dataBuffer = convertStringToArrayBufferView(data)
var vector = global.crypto.getRandomValues(new Uint8Array(16))
-
return global.crypto.subtle.encrypt({
name: 'AES-GCM',
iv: vector,