From 889132b16cbafbb5a8e35dd2cf6acc9a7fe3d5fa Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 06:57:49 -0700 Subject: [PATCH 1/5] Add action to hide loading indication on an incorrect pw. --- ui/app/actions.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/app/actions.js b/ui/app/actions.js index b09021577..13a9cf547 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -269,7 +269,10 @@ function requestRevealSeed (password) { dispatch(actions.showLoadingIndication()) log.debug(`background.submitPassword`) background.submitPassword(password, (err) => { - if (err) return dispatch(actions.displayWarning(err.message)) + if (err) { + dispatch(actions.hideLoadingIndication()) + return dispatch(actions.displayWarning(err.message)) + } log.debug(`background.placeSeedWords`) background.placeSeedWords((err) => { if (err) return dispatch(actions.displayWarning(err.message)) @@ -698,7 +701,7 @@ function setRpcTarget (newRpc) { } } -// Calls the addressBookController to add a new address. +// Calls the addressBookController to add a new address. function addToAddressBook (recipient, nickname) { log.debug(`background.addToAddressBook`) return (dispatch) => { From 10040bee497e3c9b3775dc444b3e8a7b30fab536 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 06:59:08 -0700 Subject: [PATCH 2/5] Changelog addition. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cd7b90ff..c081147b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added an address book functionality that remembers the last 15 unique addresses sent to. - Can now change network to custom RPC URL from lock screen. - Removed support for old, lightwallet based vault. Users who have not opened app in over a month will need to recover with their seed phrase. This will allow Firefox support sooner. +- Fixed bug where spinner wouldn't disappear on incorrect password submission on seed word reveal. ## 3.4.0 2017-3-8 From 605c2a7404ba235aa4894a5b6f4b6afa6b41004f Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 09:15:12 -0700 Subject: [PATCH 3/5] Remove redundant removal of loading indicator. Integrate loading indicator disappear with display warning. --- ui/app/actions.js | 7 ++----- ui/app/reducers/app.js | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/app/actions.js b/ui/app/actions.js index 13a9cf547..ac54158d0 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -215,7 +215,7 @@ function confirmSeedWords () { dispatch(actions.showLoadingIndication()) log.debug(`background.clearSeedWordCache`) background.clearSeedWordCache((err, account) => { - dispatch(actions.hideLoadingIndication()) + // dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) } @@ -231,7 +231,7 @@ function createNewVaultAndRestore (password, seed) { dispatch(actions.showLoadingIndication()) log.debug(`background.createNewVaultAndRestore`) background.createNewVaultAndRestore(password, seed, (err) => { - dispatch(actions.hideLoadingIndication()) + // dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) dispatch(actions.showAccountsPage()) }) @@ -270,13 +270,11 @@ function requestRevealSeed (password) { log.debug(`background.submitPassword`) background.submitPassword(password, (err) => { if (err) { - dispatch(actions.hideLoadingIndication()) return dispatch(actions.displayWarning(err.message)) } log.debug(`background.placeSeedWords`) background.placeSeedWords((err) => { if (err) return dispatch(actions.displayWarning(err.message)) - dispatch(actions.hideLoadingIndication()) }) }) } @@ -299,7 +297,6 @@ function importNewAccount (strategy, args) { dispatch(actions.showLoadingIndication('This may take a while, be patient.')) log.debug(`background.importAccountWithStrategy`) background.importAccountWithStrategy(strategy, args, (err) => { - dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) log.debug(`background.getState`) background.getState((err, newState) => { diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 7ea1e1d7c..b9e3f7b16 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -426,6 +426,7 @@ function reduceApp (state, action) { case actions.DISPLAY_WARNING: return extend(appState, { warning: action.value, + isLoading: false, }) case actions.HIDE_WARNING: From b0c0c30689773113ce592b0540de10696e54d372 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Tue, 21 Mar 2017 13:38:27 -0700 Subject: [PATCH 4/5] Uncomment lines relating to showing indicator. --- ui/app/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app/actions.js b/ui/app/actions.js index ac54158d0..2fefccf9f 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -215,7 +215,7 @@ function confirmSeedWords () { dispatch(actions.showLoadingIndication()) log.debug(`background.clearSeedWordCache`) background.clearSeedWordCache((err, account) => { - // dispatch(actions.hideLoadingIndication()) + dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) } @@ -231,7 +231,7 @@ function createNewVaultAndRestore (password, seed) { dispatch(actions.showLoadingIndication()) log.debug(`background.createNewVaultAndRestore`) background.createNewVaultAndRestore(password, seed, (err) => { - // dispatch(actions.hideLoadingIndication()) + dispatch(actions.hideLoadingIndication()) if (err) return dispatch(actions.displayWarning(err.message)) dispatch(actions.showAccountsPage()) }) From f2e40e85b7751e891ce04935ad85a984076495fd Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 22 Mar 2017 12:18:13 -0400 Subject: [PATCH 5/5] Add one more loading indication. --- ui/app/actions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app/actions.js b/ui/app/actions.js index 2fefccf9f..3b1fc0435 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -300,6 +300,7 @@ function importNewAccount (strategy, args) { if (err) return dispatch(actions.displayWarning(err.message)) log.debug(`background.getState`) background.getState((err, newState) => { + dispatch(actions.hideLoadingIndication()) if (err) { return dispatch(actions.displayWarning(err.message)) }