From 8541442b8db8d845f6d92675997d612f8751074c Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 10 Sep 2018 14:04:58 -0700 Subject: [PATCH] Clear old seed words when importing new seed words --- ui/app/actions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/app/actions.js b/ui/app/actions.js index 6d5b1ef3f..846a8cb8f 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -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()))