diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-09-11 05:04:58 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-09-11 05:04:58 +0800 |
commit | 8541442b8db8d845f6d92675997d612f8751074c (patch) | |
tree | 4504cee912907aabd2760358ec943a5fdb7366c4 /ui | |
parent | fdb023381be323bd3198d5e102447e6591e7e73e (diff) | |
download | tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar.gz tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar.bz2 tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar.lz tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar.xz tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.tar.zst tangerine-wallet-browser-8541442b8db8d845f6d92675997d612f8751074c.zip |
Clear old seed words when importing new seed words
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 10 |
1 files 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())) |