From 9fca556f91b40a6450e0ec93d5c700d1873ff1c3 Mon Sep 17 00:00:00 2001 From: Jon Kuperman Date: Tue, 11 Oct 2016 11:30:50 -0700 Subject: [PATCH] wrap about actions in setImmediate --- app/ledger.js | 4 ++-- js/about/preferences.js | 2 +- js/stores/appStore.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/ledger.js b/app/ledger.js index e8a5937b58e..272d3b1f0ae 100644 --- a/app/ledger.js +++ b/app/ledger.js @@ -269,9 +269,9 @@ var backupKeys = (appState, action) => { var recoverKeys = (appState, action) => { client.recoverWallet(action.firstRecoveryKey, action.secondRecoveryKey, (err, body) => { if (err) { - appActions.ledgerRecoveryFailed() + setImmediate(() => appActions.ledgerRecoveryFailed()) } else { - appActions.ledgerRecoverySucceeded() + setImmediate(() => appActions.ledgerRecoverySucceeded()) } }) diff --git a/js/about/preferences.js b/js/about/preferences.js index 6f3e4f0c20e..77c9829b876 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -976,7 +976,7 @@ class PaymentsTab extends ImmutableComponent { this.props.ledgerData.get('recoverySucceeded') === true ?

Success!

-

+

: null diff --git a/js/stores/appStore.js b/js/stores/appStore.js index 227d7a8bb63..d7935aa4bf9 100644 --- a/js/stores/appStore.js +++ b/js/stores/appStore.js @@ -588,10 +588,10 @@ const handleAppAction = (action) => { appState = appState.setIn(['dictionary', 'locale'], action.locale) break case AppConstants.APP_BACKUP_KEYS: - ledger.backupKeys(appState, action) + appState = ledger.backupKeys(appState, action) break case AppConstants.APP_RECOVER_WALLET: - ledger.recoverKeys(appState, action) + appState = ledger.recoverKeys(appState, action) break case AppConstants.APP_LEDGER_RECOVERY_SUCCEEDED: appState = appState.setIn(['ui', 'about', 'preferences', 'recoverySucceeded'], true)