aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-04-18 15:31:33 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-04-19 01:18:24 +0800
commit2c8156ebe91941309d49e8f8f1ed8e9d740bb9de (patch)
treea125bf68c21e9625bd4267b2978f1617473ffbc6 /ui/app/actions.js
parent7b70804aa0d74120098a4bcb2c375d29080e8368 (diff)
downloadtangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar.gz
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar.bz2
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar.lz
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar.xz
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.tar.zst
tangerine-wallet-browser-2c8156ebe91941309d49e8f8f1ed8e9d740bb9de.zip
Fix UI getting stuck in Reveal Seed screen
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index f5cdd32bc..73335db97 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -351,7 +351,6 @@ function confirmSeedWords () {
log.debug(`background.clearSeedWordCache`)
return new Promise((resolve, reject) => {
background.clearSeedWordCache((err, account) => {
- dispatch(actions.hideLoadingIndication())
if (err) {
dispatch(actions.displayWarning(err.message))
return reject(err)
@@ -362,6 +361,9 @@ function confirmSeedWords () {
resolve(account)
})
})
+ .then(() => dispatch(setIsRevealingSeedWords(false)))
+ .then(() => dispatch(actions.hideLoadingIndication()))
+ .catch(() => dispatch(actions.hideLoadingIndication()))
}
}
@@ -446,11 +448,13 @@ function requestRevealSeed (password) {
}
dispatch(actions.showNewVaultSeed(result))
- dispatch(actions.hideLoadingIndication())
resolve()
})
})
})
+ .then(() => dispatch(setIsRevealingSeedWords(true)))
+ .then(() => dispatch(actions.hideLoadingIndication()))
+ .catch(() => dispatch(actions.hideLoadingIndication()))
}
}
@@ -1907,3 +1911,11 @@ function updateNetworkEndpointType (networkEndpointType) {
value: networkEndpointType,
}
}
+
+function setIsRevealingSeedWords (reveal) {
+ return dispatch => {
+ log.debug(`background.setIsRevealingSeedWords`)
+ background.setIsRevealingSeedWords(reveal)
+ return forceUpdateMetamaskState(dispatch)
+ }
+}