aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/keychains/hd/restore-vault.js
diff options
context:
space:
mode:
authorThomas Huang <tmashuang@users.noreply.github.com>2018-03-12 22:50:55 +0800
committerGitHub <noreply@github.com>2018-03-12 22:50:55 +0800
commitb7c7083a112ea6908e8c5990886ab388200a51f4 (patch)
treebf7e0f880b5a3ce32cd0b0e680f62e0f5068df8d /ui/app/keychains/hd/restore-vault.js
parent174f57b4646b3d320850c6286189a146cf0e23b0 (diff)
parentddc85354d3df508cbecc016fc0213a6560d885e1 (diff)
downloadtangerine-wallet-browser-b7c7083a112ea6908e8c5990886ab388200a51f4.tar.gz
tangerine-wallet-browser-b7c7083a112ea6908e8c5990886ab388200a51f4.tar.zst
tangerine-wallet-browser-b7c7083a112ea6908e8c5990886ab388200a51f4.zip
Merge branch 'master' into i18n
Diffstat (limited to 'ui/app/keychains/hd/restore-vault.js')
-rw-r--r--ui/app/keychains/hd/restore-vault.js23
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))
}