diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-03-08 23:29:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 23:29:29 +0800 |
commit | cbb65cc4930ff1571a84ac526a29a76010d6003f (patch) | |
tree | 091c801e627b37543a9a87c337d597a6bf1f1f1b /ui/app/keychains/hd | |
parent | f4e5dd37b172e954e40cd4683a92544393cb2983 (diff) | |
download | tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar.gz tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar.bz2 tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar.lz tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar.xz tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.tar.zst tangerine-wallet-browser-cbb65cc4930ff1571a84ac526a29a76010d6003f.zip |
Fix flashing to Log in screen after logging in or restoring from seed phrase (#3466)
Diffstat (limited to 'ui/app/keychains/hd')
-rw-r--r-- | ui/app/keychains/hd/restore-vault.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js index a4ed137f9..d1761f17d 100644 --- a/ui/app/keychains/hd/restore-vault.js +++ b/ui/app/keychains/hd/restore-vault.js @@ -107,12 +107,15 @@ RestoreVaultScreen.prototype.render = function () { } RestoreVaultScreen.prototype.showInitializeMenu = function () { - this.props.dispatch(actions.unMarkPasswordForgotten()) - if (this.props.forgottenPassword) { - this.props.dispatch(actions.backToUnlockView()) - } else { - this.props.dispatch(actions.showInitializeMenu()) - } + const { dispatch, forgottenPassword } = this.props + dispatch(actions.unMarkPasswordForgotten()) + .then(() => { + if (forgottenPassword) { + dispatch(actions.backToUnlockView()) + } else { + dispatch(actions.showInitializeMenu()) + } + }) } RestoreVaultScreen.prototype.createOnEnter = function (event) { @@ -150,11 +153,5 @@ RestoreVaultScreen.prototype.createNewVaultAndRestore = function () { this.warning = null this.props.dispatch(actions.displayWarning(this.warning)) this.props.dispatch(actions.createNewVaultAndRestore(password, seed)) - .then(() => { - this.props.dispatch(actions.unMarkPasswordForgotten()) - }) - .catch((err) => { - log.error(err.message) - }) - + .catch(err => log.error(err.message)) } |