Skip to content

Commit

Permalink
Merge pull request #5229 from whymarrh/fix-confirm-seed-words
Browse files Browse the repository at this point in the history
Clear old seed words when importing new seed words
  • Loading branch information
danfinlay authored Sep 10, 2018
2 parents 9b3b704 + 8541442 commit 7fe638f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui/app/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 7fe638f

Please sign in to comment.