diff options
Use callback in placeSeedWord method.
When displaying seed words, we were not using a callback, which had some race condition potential. This is simply a little cleaner and more correct.
Fixes #842
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index e69b743e9..4a5507d33 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -221,9 +221,11 @@ function requestRevealSeed (password) { return (dispatch) => { dispatch(actions.showLoadingIndication()) background.submitPassword(password, (err) => { - dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) - background.placeSeedWords() + background.placeSeedWords((err) => { + if (err) return dispatch(actions.displayWarning(err.message)) + dispatch(actions.hideLoadingIndication()) + }) }) } } |