1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00

Clear old seed words when importing new seed words

This commit is contained in:
Whymarrh Whitby 2018-09-10 14:04:58 -07:00
parent fdb023381b
commit 8541442b8d

View File

@ -413,12 +413,18 @@ function createNewVaultAndRestore (password, seed) {
log.debug(`background.createNewVaultAndRestore`)
return new Promise((resolve, reject) => {
background.createNewVaultAndRestore(password, seed, err => {
background.clearSeedWordCache((err) => {
if (err) {
return reject(err)
}
resolve()
background.createNewVaultAndRestore(password, seed, (err) => {
if (err) {
return reject(err)
}
resolve()
})
})
})
.then(() => dispatch(actions.unMarkPasswordForgotten()))