aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-09-11 05:04:58 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-09-11 05:04:58 +0800
commit8541442b8db8d845f6d92675997d612f8751074c (patch)
tree4504cee912907aabd2760358ec943a5fdb7366c4 /ui
parentfdb023381be323bd3198d5e102447e6591e7e73e (diff)
downloadtangerine-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.js10
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()))