Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
wrap about actions in setImmediate
Browse files Browse the repository at this point in the history
  • Loading branch information
jkup committed Oct 11, 2016
1 parent 4124965 commit 9fca556
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
})

Expand Down
2 changes: 1 addition & 1 deletion js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ class PaymentsTab extends ImmutableComponent {
this.props.ledgerData.get('recoverySucceeded') === true
? <div className='recoveryOverlay'>
<h1>Success!</h1>
<p data-l10n-id='balanceRecovered' data-l10n-args={JSON.stringify(l10nDataArgs)} />
<p className='spaceAround' data-l10n-id='balanceRecovered' data-l10n-args={JSON.stringify(l10nDataArgs)} />
<Button l10nId='ok' className='whiteButton inlineButton' onClick={this.clearRecoveryStatus} />
</div>
: null
Expand Down
4 changes: 2 additions & 2 deletions js/stores/appStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9fca556

Please sign in to comment.