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

[P3A] Incorrect value set for Q12 / WalletBalance (Brave.Rewards.WalletBalance.2) #8296

Closed
srirambv opened this issue Feb 18, 2020 · 6 comments · Fixed by brave/brave-core#8734

Comments

@srirambv
Copy link
Contributor

Description

[P3A] Incorrect value set for WalletBalance [Follow up to #7633]

Steps to Reproduce

Scenario 1:

  1. Clean install 1.3.116
  2. Open local-state
  3. Brave.Rewards.WalletBalance.2 is set to 0 (as expected)
  4. Enable Rewards
  5. Brave.Rewards.WalletBalance.2 is set to 2[10-50 BAT, excluding grants] instead of 1[Less than 10 BAT (0-9), excluding grants]

Scenario 2:

  1. Clean install 1.3.116
  2. Open local-state
  3. Brave.Rewards.WalletBalance.2 is set to 0 (as expected)
  4. Enable Rewards
  5. Brave.Rewards.WalletBalance.2 is set to 2[10-50 BAT, excluding grants] instead of 1[Less than 10 BAT (0-9), excluding grants]
  6. Claim UGP grant
  7. Brave.Rewards.WalletBalance.2 is set to 3[Over 50 BAT, excluding grants] instead of 1 [Less than 10 BAT (0-9), excluding grants]

Actual result:

Incorrect value set for WalletBalance

Expected result:

Correct values for excluding grants should be set

Reproduces how often:

Easy

Brave version (brave://version info)

Brave 1.3.116 Chromium: 80.0.3987.106 (Official Build) (64-bit)
Revision f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}
OS Linux

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the dev channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

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

Miscellaneous Information:

Incorrect value is set on current release version as well. May be related to #7235. Issue reproduced on Windows by @GeetaSarvadnya .
cc: @iefremov @rebron

@LaurenWags
Copy link
Member

Reproduced on macOS.

Brave 1.3.116 Chromium: 80.0.3987.106 (Official Build) (64-bit)
Revision f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}
OS macOS Version 10.14.6 (Build 18G3020)

Restored a wallet with 28 BAT (no grants). Expected "Brave.Rewards.WalletBalance.2" value to be 3 for "10-50 BAT, excluding grants", however it is still displaying 2, even after browser restart.

Screen Shot 2020-02-18 at 4 37 08 PM

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 4, 2020

In one more scenario, the wallet balance is not shown correctly. Reproduced the issue in both 1.11.x and 1.9.x

  1. Clean profile
  2. Enable rewards
  3. Brave.Rewards.WalletBalance.2 is set to 2 as expected
  4. Restore a wallet ( which has balance 1)
  5. Claim UGP grants of 20 BAT
  6. Brave.Rewards.WalletBalance.2 is set to 3 10-50 BAT, excluding grants, instead of 2 Less than 10 BAT (0-9), excluding grants

@bsclifton bsclifton changed the title [P3A] Incorrect value set for WalletBalance [Follow up to #7633] [P3A] Incorrect value set for Q12 / WalletBalance (Brave.Rewards.WalletBalance.2) Apr 30, 2021
@emerick emerick self-assigned this Apr 30, 2021
@emerick emerick modified the milestone: tia check May 2, 2021
@emerick emerick added this to the 1.26.x - Nightly milestone May 12, 2021
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 28, 2021

Verification passed on



<!--StartFragment-->
Brave | 1.26.43 Chromium: 91.0.4472.77&nbsp;(Official Build)&nbsp;beta&nbsp;(64-bit)
-- | --
Revision | 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS | Windows&nbsp;10 OS Version 2004 (Build 19041.985)

<!--EndFragment-->

Clean profile

Scenario 1: Check the response value when no wallet created
  • Confirmed there is no Brave.Rewards.WalletBalance.2 stats display in brave://local-state/ when Rewards is NOT enabled which is expected as per the new implementation.
    image
Scenario 2: Check the response value when the rewards is enabled
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants) when rewards is enabled
    image
Scenario 3: Check the response value when restore a wallet which has balance 1
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants) when wallet is restored and balance is 1 BAT
    image
Scenario 4: Check the response value when Claim UGP grants+restore a user funded wallet
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants)
    image
Scenario 5: Check the response value when uphold wallet (over 50 BAT balance) is connected and UGP grants claimed
  • Confirmed that the response value is displayed as 4 (Over 50 BAT, excluding grants)
    image
Scenario 6: Check the response value when uphold wallet (with 0 BAT balance) is connected
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants)
    image
Scenario 7: Check the response value when uphold wallet (with 0 BAT balance) is connected and UGP grants claimed
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants)
    image
Scenario 8: Check the response value when Ad grants is claimed (23 BAT Ad grants)
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants)
    image
Scenario 9: Check the response value when Ad grants is claimed (23 BAT Ad grants)+ 10 BAT (from QA Uphold) is deposited to the wallet
  • Confirmed that the response value is displayed as 3 (10-50 BAT, excluding grants)
    image
Scenario 10: Check the response value when one-time tip is sent from uphold wallet (which has balance less than 10 BAT deposited fund )
  • Confirmed that the response value is displayed as 2 (Less than 10 BAT (0-9), excluding grants)
    image
Scenario 11: check the response value when rewards is disabled ( Ads and AC switches are off)
  • Confirmed that the response value for Brave.Rewards.WalletBalance.2 is displayed as 1 (Rewards Disabled)
    image

Upgrade profile

Scenario 12: Install 1.25.x and enable rewards and upgrade profile to 1.26.x and _check the response value when the rewards is enabled
  • Confirmed that the response value for Brave.Rewards.WalletBalance.2 is displayed as 2 (Less than 10 BAT (0-9), excluding grants) when rewards is enabled
    image
Scenario 13: Install 1.25.x and enable rewards and restore a wallet which has balance >100 BAT and then upgrade profile to 1.26.x
  • Confirmed that the response value for Brave.Rewards.WalletBalance.2 is displayed as 4 (Over 50 BAT, excluding grants) when wallet is restored and balance >100 BAT
Scenario 14: Install 1.25.x and enable rewards and connect uphold wallet and then upgrade profile to 1.26.x

Install 1.25.x and enable rewards
Connect uphold wallet which has balance <10 BAT
Upgrade profile to 1.26.x
Confirmed response value 2 is shown correctly in 1.26.x
Deposited funds to uphold wallet via QA uphold and make sure balance is above 50 BAT
Confirmed response value 4 is shown correctly

uphold wallet<10 BAT uphold wallet>50 BAT
image image

Send a one-time tip of 5 BAT to a verified pubs laurenwags.github.io
Confirmed response value 3 is shown correctly in 1.26.x
image

Scenario 15: Install 1.25.x and enable rewards and disable rewards (disable Ads and AC ) and then upgrade profile to 1.26.x

Install 1.25.x and enable rewards
Disable Ads and AC switches
Response value is displayed as 2 ( Less than 10 BAT (0-9), excluding grants) which is incorrect
Upgrade profile to 1.26.x
Response value is displayed as 1 (Rewards disabled) which is expected
image


Verified passed with

Brave | 1.26.47 Chromium: 91.0.4472.77&nbsp;(Official Build)&nbsp;beta&nbsp;(x86_64)
-- | --
Revision | 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS | macOS Version 10.15.7 (Build 19H1030)

Verified test plan from brave/brave-core#8734

Confirmed the following values for Brave.Rewards.WalletBalance.2 in brave://local-state

Brave.Rewards.WalletBalance.2 = 0 Brave.Rewards.WalletBalance.2 = 2 Brave.Rewards.WalletBalance.2 = 3 Brave.Rewards.WalletBalance.2 = 4
0 2 3 4

Verified passed with

Brave	1.26.47 Chromium: 91.0.4472.77 (Official Build) beta (64-bit)
Revision	1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
OS	Linux

Verified test plan from brave/brave-core#8734

Confirmed the following values for Brave.Rewards.WalletBalance.2 in brave://local-state

Brave.Rewards.WalletBalance.2 = 0 Brave.Rewards.WalletBalance.2 = 2 Brave.Rewards.WalletBalance.2 = 3 Brave.Rewards.WalletBalance.2 = 4
Screen Shot 2021-06-01 at 3 57 17 PM Screen Shot 2021-06-01 at 4 08 12 PM Screen Shot 2021-06-01 at 4 09 06 PM Screen Shot 2021-06-01 at 4 09 46 PM

@GeetaSarvadnya
Copy link

@iefremov @emerick Looks like it's a common rewards library fix that is shared by both Desktop and Android, I hope this fix is applicable for Android also

@srirambv Looks like this issue is appearing in Android also, have you seen this issue while testing P3A rewards on Android?

@GeetaSarvadnya GeetaSarvadnya added the OS/Android Fixes related to Android browser functionality label Jun 4, 2021
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 4, 2021

Verified Android GPS version 1.25.x, the issue persists on Android also. This issue #8296 might have fixed the issue on android also. @srirambv please verify the issue on Android or let me know if you want me to verify the issue on 1.26.x. Thanks!

@srirambv
Copy link
Contributor Author

Verification passed on OnePlus 6T with Android 10 running 1.26.59 x64 Beta Build

Brave.Rewards.WalletBalance.2 = 0 Brave.Rewards.WalletBalance.2 = 2 Brave.Rewards.WalletBalance.2 = 3 Brave.Rewards.WalletBalance.2 = 4
image image image image

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.

7 participants