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

Fixing recovery progress indicator showing before a recovery file has been loaded. #14017

Merged
merged 1 commit into from
May 5, 2018

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented May 3, 2018

Fixes: #14014

The in progress overlay now waits for:
A recovery file to have been loaded
A recovery to then start off of the loaded file

This PR also includes some refactoring by way of adding setRecoveryInProgress to aboutPreferencesState. Tests have been updated to reflect both the refactoring and the fix.

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. Enable payments
  2. Go to advance settings, recover your wallet
  3. Click import recovery keys, confirm recovery progress message does not show.
  4. Exit Brave. Corrupt your wallet by removing seeds 20 and 21 from ledger-state.json
  5. Restart brave, recover your wallet by clicking import recovery key but then hit cancel as opposed to choosing a file.
  6. Confirm recovery progress message does not show
  7. Load in an actual recovery file.
  8. Confirm recovery progress messages shows for the duration of the recovery
  9. [Regression testing via pasting in a recovery key]

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

@ryanml ryanml added this to the 0.22.x Release 3 (Beta channel) milestone May 3, 2018
@ryanml ryanml self-assigned this May 3, 2018
@ryanml ryanml requested review from NejcZdovc and srirambv May 3, 2018 20:33
@codecov-io
Copy link

codecov-io commented May 3, 2018

Codecov Report

Merging #14017 into master will decrease coverage by 0.1%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##           master   #14017      +/-   ##
==========================================
- Coverage   56.51%    56.4%   -0.11%     
==========================================
  Files         284      284              
  Lines       29357    29392      +35     
  Branches     4880     4880              
==========================================
- Hits        16590    16580      -10     
- Misses      12767    12812      +45
Flag Coverage Δ
#unittest 56.4% <92.85%> (-0.11%) ⬇️
Impacted Files Coverage Δ
app/browser/api/ledger.js 63.1% <0%> (-0.56%) ⬇️
app/common/state/aboutPreferencesState.js 100% <100%> (ø) ⬆️
app/browser/reducers/ledgerReducer.js 44.51% <100%> (-3.56%) ⬇️
.../renderer/components/navigation/publisherToggle.js 81.25% <0%> (-0.17%) ⬇️
js/actions/appActions.js 19.16% <0%> (ø) ⬆️
app/renderer/components/preferences/paymentsTab.js 65.56% <0%> (ø) ⬆️

@ryanml ryanml force-pushed the recovery-progress-file-fix branch from 0e754bb to f3a595c Compare May 3, 2018 21:04
@ryanml ryanml force-pushed the recovery-progress-file-fix branch from 0e9c7f3 to fb2ed05 Compare May 4, 2018 18:34
@ryanml ryanml force-pushed the recovery-progress-file-fix branch from fb2ed05 to 40423cc Compare May 4, 2018 18:38
@ryanml
Copy link
Contributor Author

ryanml commented May 4, 2018

tests added

Copy link
Contributor

@jasonrsadler jasonrsadler 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 af63e87 into brave:master May 5, 2018
NejcZdovc added a commit that referenced this pull request May 5, 2018
Fixing recovery progress indicator showing before a recovery file has been loaded.
NejcZdovc added a commit that referenced this pull request May 5, 2018
Fixing recovery progress indicator showing before a recovery file has been loaded.
@NejcZdovc
Copy link
Contributor

master af63e87
0.23 e465f39
0.22-release3 a7c4c48

@ryanml ryanml deleted the recovery-progress-file-fix branch May 29, 2018 23:24
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 progress message shown before actual recovery starts
4 participants