From ea56426b2355c1076c18256fb0b4e74f47ff4b39 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Nov 2016 20:08:36 -0800 Subject: 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 --- ui/app/actions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ui') 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()) + }) }) } } -- cgit v1.2.3