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

paymentId/address discrepancy in ledger_state file - follow up to 2172 #3060

Closed
LaurenWags opened this issue Jan 23, 2019 · 9 comments · Fixed by brave/brave-core#1508
Closed

Comments

@LaurenWags
Copy link
Member

Description

Logging as a follow up to #2172 (comment) per discussion with @NejcZdovc

We have some users who are in a state where their paymentId/addresses in ledger_state don't match (the paymentId in ledger_state is not actually associated with the addresses listed) per #1831. We need to fix users who are in this state.

Background/Context for historical purposes:
Logged in issue #1831 you'll see that there was an issue with paymentId and address mismatch after using Restore functionality. This issue was fixed for users going forward, however, we still need to fix users who are already in this mismatched state. That was logged in #2172 as a follow up issue. However, there was some miscommunication where it was thought that the ledger_state file contained the correct addresses, where unfortunately it did not. The fix for 2172 was to have the UI update to reflect what was in ledger_state, but what is in ledger_state is wrong. We need to take an additional step to update the addresses in ledger_state to be the ones that correspond with the paymentId in ledger_state. After this is done, the fix from 2172 should correctly display the addresses in the UI.

Steps to Reproduce

  1. Install 0.56.6 dmg (this is a Beta version)
  2. Launch with clean profile and enable rewards.
  3. Note backup words.
  4. Note addresses displayed in Add Funds.
  5. Note paymentId, addresses, and CARD_ID from ledger_state.
  6. Use restore functionality to Restore a wallet.
  7. Note backup words (they updated to the words from the restored wallet and are different than step 3).
  8. Note addresses in Add Funds (these are still the same as step 4).
  9. Open ledger_state and note paymentId (this was updated, so it's different than step 5) addresses and CARD_ID (these are all still the same as step 5).
    At this point, you now have a paymentId/address discrepancy or mismatch. If you were to put the paymentId from step 9 into this URL: https://ledger.mercury.basicattentiontoken.org/v2/wallet/ you can see what addresses should be displayed to compare to what is actually displayed.
  10. Update to 0.59.28 Beta version.
  11. Navigate to Rewards page.

Actual result:

  • Backup words for wallet match step 7 and paymentId matches step 9 (pass)
  • Addresses in Add Funds are still the same as steps 4/8 (fail)
  • Addresses and CARD_ID are still the same as steps 5/9 (fail)

Expected result:

Backup words/paymentId for wallet should be accurate
Addresses in Add Funds should be updated to be the ones that correspond with the correct paymentID
Addresses and CARD_ID should be updated to be the ones that correspond with the correct paymentID

Reproduces how often:

easily with steps above

Brave version (brave://version info)

Brave 0.59.28 Chromium: 72.0.3626.64 (Official Build) beta(64-bit)
Revision eaa9668e80ce5405e7f1902579558ea725c06ca1-refs/branch-heads/3626@{#708}
OS Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? yes

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields?
  • Is the issue reproducible on the latest version of Chrome?

Additional Information

cc @brave/legacy_qa

@LaurenWags LaurenWags added bug feature/rewards priority/P2 A bad problem. We might uplift this to the next planned release. QA/Yes QA/Test-Plan-Specified labels Jan 23, 2019
@LaurenWags LaurenWags added this to the 1.x Backlog milestone Jan 23, 2019
@btlechowski
Copy link

Reproduced on Ubuntu 17.10

Brave 0.59.28 Chromium: 72.0.3626.64 (Official Build) beta(64-bit)
Revision eaa9668e80ce5405e7f1902579558ea725c06ca1-refs/branch-heads/3626@{#708}
OS Linux

@LaurenWags
Copy link
Member Author

@NejcZdovc I tried using the test plan in brave/brave-core#1508 to test this issue but it wasn't working for me. Step 10 I get a message about how my wallet is corrupted and I need to restore (so I can't check addresses or backup words). So I skipped that and continued on in the test plan, but once I get to step 13 I see the same message so I can't see what recovery keys are:
screen shot 2019-02-11 at 4 24 14 pm

@NejcZdovc
Copy link
Contributor

@LaurenWags will check it out and ping you tomorrow to see what is going on

@NejcZdovc
Copy link
Contributor

Did you do first portion of the test on old version of the browser, right? That don't have this code in yet

@LaurenWags
Copy link
Member Author

LaurenWags commented Feb 11, 2019

@NejcZdovc yep - I did steps 1-10 from test plan on 0.59.35 (current release channel version) and then renamed profile to be beta - should I use an older version than release?

fwiw - following the steps to reproduce from the description to test worked as expected.

@NejcZdovc
Copy link
Contributor

@LaurenWags did you used this seed OIeFXZsZd5rHDzAMwN1I0F1AX4S9KPM78uNTvmJZak8=? If so you need to do test against staging

@NejcZdovc
Copy link
Contributor

also did you modify paymentId by mistake? paymentId needs to be the same through the whole test

@LaurenWags
Copy link
Member Author

LaurenWags commented Feb 14, 2019

@NejcZdovc what about card_id - should that be modified or left alone?

Also - I tried again, using staging with 0.59.35 released version. I only modified BAT, BTC, ETH, and LTC addresses and the seed. I am still getting this message in step 10.
screen shot 2019-02-14 at 9 26 08 am

@LaurenWags
Copy link
Member Author

LaurenWags commented Feb 14, 2019

Verified passed with

Brave 0.60.28 Chromium: 72.0.3626.96 (Official Build) beta(64-bit)
Revision 84098ee7ef8622a9defc2ef043cd8930b617b10e-refs/branch-heads/3626@{#836}
OS Mac OS X

Verification passed on

Brave 0.60.40 Chromium: 72.0.3626.109 (Official Build) (64-bit)
Revision fae8db7ab9280fa6704a59980263c804f809ebd5-refs/branch-heads/3626@{#857}
OS Windows 7

Used test plan from brave/brave-core#1508

Verification passed on

Brave 0.60.40 Chromium: 72.0.3626.109 (Official Build) (64-bit)
Revision fae8db7ab9280fa6704a59980263c804f809ebd5-refs/branch-heads/3626@{#857}
OS Linux

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

Successfully merging a pull request may close this issue.

4 participants