Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes wallet bad state #1508

Merged
merged 1 commit into from
Feb 4, 2019
Merged

Fixes wallet bad state #1508

merged 1 commit into from
Feb 4, 2019

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jan 30, 2019

Resolves brave/brave-browser#3061
Resolves brave/brave-browser#3060

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).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • 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.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

  1. go to master
  2. clean profile
  3. enable rewards
  4. save recovery keys
  5. close browser
  6. open ledger_state and save addresses
  7. rename addresses to something else
  8. change seed to OIeFXZsZd5rHDzAMwN1I0F1AX4S9KPM78uNTvmJZak8=
  9. start browser again
  10. make sure that addresses were not updated and see that recovery keys are still the same
  11. switch to this PR's branch
  12. start the browser
  13. check recovery keys, make sure that they are decade destroy first curtain number sniff bring toward art alone fall pass staff cool base pink veteran test rhythm polar tower coach powder wave
  14. close browser
  15. open ledger_state and make sure that addresses are the same as they were in step 6

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@@ -32,9 +32,10 @@ export const defaultState: Rewards.State = {
recoveryKey: '',
reconcileStamp: 0,
ui: {
addressCheck: false,
addressCheck: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed this as we don't need to run legacy fix for new installs

@jasonrsadler
Copy link
Contributor

jasonrsadler commented Feb 1, 2019

Can you clarify step 15 of the test plan? The addresses in my ledger_state are the same as the ones I changed them to.

@NejcZdovc
Copy link
Contributor Author

@jasonrsadler so when you start your browser in step 15 and then close it you have addresses in ledger_state from step 6 or 7?

@jasonrsadler
Copy link
Contributor

Step 7

@NejcZdovc NejcZdovc force-pushed the resolve-bad-state branch 2 times, most recently from ca796fa to 8e6f1cc Compare February 4, 2019 06:35
@NejcZdovc NejcZdovc force-pushed the resolve-bad-state branch 3 times, most recently from aefb3e1 to 37fd885 Compare February 4, 2019 13:48
}
state = saveAddresses(state, action.payload.addresses)
let ui = state.ui
ui.addressCheck = true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to final step as before it was in init call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants