Skip to content

Commit

Permalink
Fixes brave#11422, keeps recovery modal open after recovery failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanml committed Feb 21, 2018
1 parent 1b8741c commit 677d827
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/renderer/components/preferences/payment/ledgerRecovery.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ class LedgerRecoveryContent extends ImmutableComponent {
this.props.handleRecoveryKeyChange(e.target.value)
}

clearRecoveryStatus () {
this.props.hideAdvancedOverlays()
clearRecoveryStatus (success) {
if (success) {
this.props.hideAdvancedOverlays()
}
appActions.resetRecoverStatus()
}

Expand All @@ -57,7 +59,7 @@ class LedgerRecoveryContent extends ImmutableComponent {
<BrowserButton secondaryColor
l10nId='ok'
testId='recoveryOverlayOkButton'
onClick={this.clearRecoveryStatus.bind(this)}
onClick={this.clearRecoveryStatus.bind(this, true)}
/>
</section>
: null
Expand All @@ -73,7 +75,7 @@ class LedgerRecoveryContent extends ImmutableComponent {
<BrowserButton secondaryColor
l10nId='ok'
testId='recoveryOverlayErrorButton'
onClick={this.clearRecoveryStatus.bind(this)}
onClick={this.clearRecoveryStatus.bind(this, false)}
/>
</section>
: null
Expand All @@ -89,7 +91,7 @@ class LedgerRecoveryContent extends ImmutableComponent {
<BrowserButton secondaryColor
l10nId='ok'
testId='recoveryOverlayErrorButton'
onClick={this.clearRecoveryStatus.bind(this)}
onClick={this.clearRecoveryStatus.bind(this, false)}
/>
</section>
: null
Expand Down

0 comments on commit 677d827

Please sign in to comment.