brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.73k stars 2.31k forks source link

deprecated vBAT balance displays once self custody wallet is connected #36395

Closed LaurenWags closed 7 months ago

LaurenWags commented 7 months ago

Description

We deprecated vBAT awhile ago, however if a user had never connected to a custodian, had a vBAT balance at the time of deprecation, and then subsequently connects to self custody once available, the deprecated vBAT balance displays in the UI again.

Steps to Reproduce

  1. Have an old profile with a vBAT balance that existed prior to deprecation and was never connected to a custodian
  2. Connect to self custody (I used Brave Wallet)
  3. See deprecated vBAT Balance in the UI

Actual result:

Screenshot 2024-02-27 at 10 42 57 AM

Expected result:

no vBAT balance shown in UI as it's deprecated

Reproduces how often:

easily

Brave version (brave://version info)

Brave | 1.65.35 Chromium: 122.0.6261.69 (Official Build) nightly (x86_64)
-- | --
Revision | 8873b7ee8825b7b68a55a5ffbd3ab44759476d02
OS | macOS Version 13.6.4 (Build 22G513)

Version/Channel Information:

Other Additional Information:

Miscellaneous Information:

cc @Miyayes @zenparsing

Miyayes commented 7 months ago

@LaurenWags can confirm if this reproduces in release. If so, this is something we should try to get into an upcoming 1.63.x maintenance release.

kjozwiak commented 7 months ago

The above requires 1.63.167 or higher for 1.63.x verification 👍

LaurenWags commented 7 months ago

Verified with

Brave | 1.63.168 Chromium: 122.0.6261.94 (Official Build) (x86_64)
-- | --
Revision | 08196d502fa95681adc6dd9fc06a04d0664ac538
OS | macOS Version 13.6.4 (Build 22G513)

Used test plan from https://github.com/brave/brave-core/pull/22342#issue-2157160708 to reproduce the issue and confirm fix:

  1. Create a profile in a version without this fix. (I used 1.63.165)
  2. Enable rewards. (used staging environment)
  3. Close browser, get your paymentId whitelisted.
  4. Relaunch browser.
  5. Connect to a Solana account.
  6. Close the browser
  7. Open the database file in a SQLite database program (e.g. "DB Browser for SQLite")
  8. Execute the SQL statements from PR description.
  9. Save changes and close the database.
  10. Start the browser.
  11. Verify that the displayed Rewards balance contains 0.25 "too much" BAT.
11
  1. Upgrade to a version that contains this fix (1.63.168)
  2. Verify that the displayed balance is correct (i.e. does not contain the 0.25 extra BAT).
13