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

Fixes wallet recovery dialogue re-appearing on relaunch after a successful recovery. #13850

Merged
merged 2 commits into from
Apr 19, 2018

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Apr 17, 2018

Fixes #13645

Additionally, per the feedback on this PR:

  1. about:preferences#payments is maintained when the recovery dialogue is closed

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. Clean install
  2. Create Wallet in about:preferences#payments
  3. Exit Brave
  4. Delete seed 20 and 21 in ledger-state.json
  5. Run Brave again
  6. Click "Recover your Brave wallet"
  7. Dismiss the modal dialogue via the 'x' or cancel button.
  8. Ensure that about:preferences#payments is opened
  9. Then successfully recover the wallet with:
    vower obovoid menace tobogganist hoyle honoree pixel pestilently disconcertment sellable ruffing supervision zoroastrian based coparent slackened
  10. Click OK on the dialog
  11. Relaunch Brave
  12. Ensure that about:preferences#payments is opened
  13. The same expected behavior should occur when using the Brave Wallet Backup dialog
  14. Open the back up dialog, then press 'x' to close it out
  15. Ensure that about:preferences#payments is opened
  16. Go back to the backup dialogue, this time hitting 'Done'
  17. Ensure that about:preferences#payments is opened

Links:
recovery: about:preferences#payments?ledgerRecoveryOverlayVisible
backup: about:preferences#payments?ledgerBackupOverlayVisible

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

cc: @bsclifton @btlechowski

…ge when a wallet recovery is successful, and when it is cancelled or closed out of.
@ryanml ryanml requested a review from NejcZdovc April 17, 2018 19:34
@ryanml ryanml self-assigned this Apr 17, 2018
@codecov-io
Copy link

codecov-io commented Apr 17, 2018

Codecov Report

Merging #13850 into master will decrease coverage by 0.04%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master   #13850      +/-   ##
==========================================
- Coverage   56.62%   56.57%   -0.05%     
==========================================
  Files         283      283              
  Lines       28849    28855       +6     
  Branches     4785     4786       +1     
==========================================
- Hits        16337    16326      -11     
- Misses      12512    12529      +17
Flag Coverage Δ
#unittest 56.57% <33.33%> (-0.05%) ⬇️
Impacted Files Coverage Δ
js/about/preferences.js 59.61% <33.33%> (-1.58%) ⬇️
js/stores/appStoreRenderer.js 91.66% <0%> (-8.34%) ⬇️
app/renderer/components/reduxComponent.js 57.75% <0%> (-3.45%) ⬇️
js/stores/windowStore.js 28.46% <0%> (-0.3%) ⬇️

@NejcZdovc
Copy link
Contributor

Sadly we had the same problem with backup overlay. Let's try to find more general solution. I was thinking to add some code to the general hideOverlay function and check if # is present we should remove it from the url. I would also try to remove it via history API instead of reloading the page if possible.

@ryanml
Copy link
Contributor Author

ryanml commented Apr 19, 2018

@NejcZdovc, changes pushed:

  1. Now using the History API to remove the visibility parameter
  2. Modifying the general overlay toggle function to perform this action on hide

@ryanml ryanml force-pushed the no-dialogue-after-recovery branch from 84e2f89 to 7f194c9 Compare April 19, 2018 07:33
@NejcZdovc NejcZdovc added this to the 0.22.x Release 3 (Beta channel) milestone Apr 19, 2018
Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ works great

@NejcZdovc NejcZdovc merged commit 0abdd64 into brave:master Apr 19, 2018
NejcZdovc added a commit that referenced this pull request Apr 19, 2018
Fixes wallet recovery dialogue re-appearing on relaunch after a successful recovery.
NejcZdovc added a commit that referenced this pull request Apr 19, 2018
Fixes wallet recovery dialogue re-appearing on relaunch after a successful recovery.
@NejcZdovc
Copy link
Contributor

master 0abdd64
0.23 ee7fad3
0.22 19b6163

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recover your Brave wallet dialog shown after successful recovery
3 participants