mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix initial vault creation
This commit is contained in:
parent
4cf1b606e4
commit
ed1917d71a
@ -122,6 +122,7 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
return this.loadKey(password)
|
||||
.then((derivedKey) => {
|
||||
key = derivedKey
|
||||
this.key = key
|
||||
return this.idStoreMigrator.oldSeedForPassword(password)
|
||||
})
|
||||
.then((serialized) => {
|
||||
@ -144,12 +145,15 @@ module.exports = class KeyringController extends EventEmitter {
|
||||
const salt = this.encryptor.generateSalt()
|
||||
configManager.setSalt(salt)
|
||||
|
||||
return this.migrateAndGetKey(password)
|
||||
.then((key) => {
|
||||
return new Promise((res, rej) => {
|
||||
this.createFirstKeyTree(password, (err, state) => {
|
||||
if (err) return rej(err)
|
||||
res(configManager.getVault())
|
||||
})
|
||||
})
|
||||
})
|
||||
.then((encryptedString) => {
|
||||
const serialized = this.keyrings[0].serialize()
|
||||
cb(null, serialized)
|
||||
|
Loading…
Reference in New Issue
Block a user