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

[Android] Implement vBAT notices and sunset #27883

Closed
Miyayes opened this issue Jan 18, 2023 · 3 comments · Fixed by brave/brave-core#16775
Closed

[Android] Implement vBAT notices and sunset #27883

Miyayes opened this issue Jan 18, 2023 · 3 comments · Fixed by brave/brave-core#16775
Assignees
Labels
Android 8 - Test/Verification Checking on an older Android device to make sure everything is working as expected feature/rewards OS/Android Fixes related to Android browser functionality priority/P1 A very extremely bad problem. We might push a hotfix for it. QA Pass - Android ARM QA/Test-All-Platforms QA/Yes release-notes/include

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Jan 18, 2023

Description

Implement vBAT notices and sunsetting related to https://brave.com/rewards-changes.

@Miyayes Miyayes added feature/rewards OS/Android Fixes related to Android browser functionality labels Jan 18, 2023
@Miyayes Miyayes changed the title [Android] Implement vBAT notices [Android] Implement vBAT notices and sunset Jan 18, 2023
@Miyayes Miyayes added the priority/P1 A very extremely bad problem. We might push a hotfix for it. label Jan 18, 2023
@brave-builds brave-builds added this to the 1.49.x - Nightly milestone Jan 25, 2023
@kjozwiak kjozwiak added QA/Test-All-Platforms Android 8 - Test/Verification Checking on an older Android device to make sure everything is working as expected labels Feb 10, 2023
@kjozwiak
Copy link
Member

We'll try getting this verified/checked on an older device like Android 8 via the emulators, however, most of the time the emulators are x86 which doesn't work on rewards due to use disabling rewards on x86. If we can't manage to get a x64 emulator running on an older device, we'll at least ensure that it's working fine on mobile & tablet.

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Feb 28, 2023

Verification PASSED on Samsung Galaxy version 12 running Bravemonoarm64.apk_1.49.108

Verified the scenarios from https://docs.google.com/document/d/1YVa6Wx4kMd90Q7mfx29iW--xa4tPNl7YXc486CkYQAI/edit#heading=h.t2vdk6dnw3tr

Note: Reset rewards cases are NOT verified, thread about the discussion https://bravesoftware.slack.com/archives/CNH9Q6REV/p1675080664239119?thread_ts=1675061489.249839&cid=CNH9Q6REV

Logged #28817
Logged #28816

Case 1: vbatDeadline not specified_PASSED

1.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)

1.47.x rewards settings
Screenshot_20230228-212221_Brave - Beta

1.2. Upgrade the profile to 1.49.x
1.3. You are now in the grandfathered-unverified state. Make it so that the /parameters endpoint (via Ben Huson or a proxy) does not have a vbatDeadline field/value at all
1.4. Make sure that the browser has picked up this new /parameters value.

1.49.x rewards settings 1.49.x BR panel
Screenshot_20230228-213453_Brave - Beta Screenshot_20230228-213459_Brave - Beta

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]}}
2023-02-28 21:28:20.233 23243-23243/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 10968 s

1.5. Connect to a custodian. You are now in the connected state.

Example Example
Screenshot_20230228-213904_Brave - Beta Screenshot_20230228-213911_Brave - Beta

1.6. Make sure /parameters endpoint is still not showing any vbatDeadline value
1.7. Restart browser just in case.
1.8. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230228-213904_Brave - Beta Screenshot_20230228-213911_Brave - Beta

1.9. Reset Brave Rewards. You should now be in the new non-connected state.
1.10. Restart browser just in case.
1.11. Make sure /parameters endpoint is still not showing any vbatDeadline value.
1.12. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.
1.13. Delete your profile completely (fresh profile) and create one in 1.49.x. Enable Brave Rewards.

Example Example
Screenshot_20230228-214952_Brave - Beta Screenshot_20230228-215004_Brave - Beta

1.14. Make sure /parameters endpoint is still not showing any vbatDeadline value.

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
....
 [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]}}
2023-02-28 21:48:53.583 29026-29026/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11544 s

1.15. You should be in the new non-connected state.
1.16. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230228-214952_Brave - Beta Screenshot_20230228-215004_Brave - Beta
Case 2: vbatDeadline is in the past_FAILED_Logged #28817

2.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)
2.2. Accept accept UGP grant (so that you can check the vBAT expiry notices on the NTP Widget)

1.47.x rewards settings
Screenshot_20230301-135502_Brave - Beta

2.3. Upgrade the profile to 1.49.x
2.4. You are now in the grandfathered-unverified state. Make it so that the /parameters endpoint (via Ben Huson or a proxy) has a vbatDeadline field/value set in the past (such as January 2, 2023).
2.5. Ensure this is the result you’re getting from /parameters.

Logs

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
  [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false}
2023-03-01 14:02:57.164 9140-9140/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11286 s

2.6. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere. Encountered the issue #28817

1.49.x rewards settings 1.49.x BR panel
Screenshot_20230301-140030_Brave - Beta Screenshot_20230301-140501_Brave - Beta

2.7. Connect to a custodian. You are now in the connected state.

Example Example
Screenshot_20230301-142114_Brave - Beta Screenshot_20230301-142133_Brave - Beta
    1. Make sure /parameters endpoint vbatDeadline field/value is still set in the past (such as January 2, 2023).
[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
  [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false}
2023-03-01 14:02:57.164 9140-9140/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11286 s

2.9. Restart browser just in case.
2.10. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230301-142114_Brave - Beta Screenshot_20230301-142133_Brave - Beta

2.11. Reset Brave Rewards. You should now be in the new non-connected state. (NA)
2.12. Restart browser just in case.
2.13. Make sure /parameters endpoint is still showing vbatDeadline field/value set in the past (such as January 2, 2023).
2.14 Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.
2.15. Delete your profile completely (fresh profile) and create one in 1.49.x. Enable Brave Rewards.
2.16. Make sure /parameters endpoint’s vbatDeadline field/value is still set in the past (such as January 2, 2023). .
2.17. You should be in the new non-connected state
2.18. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230301-143145_Brave - Beta Screenshot_20230301-143154_Brave - Beta
Case 3: vbatDeadline is in the future (custodian available → connected → reset into non-connected)_FAILED_Logged #28816

3.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)

1.47.x rewards settings
Screenshot_20230228-221133_Brave - Beta

3.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is in the future. Note that vbatDeadline is a UTC date.
3.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
3.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
 [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 12:28:21.445 16982-16982/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 10957 s

3.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices. They SHOULD appear
(compare with Figma, row “Countdown to feature removal notification”). Make sure the “Connect account” and “Learn more” buttons work in all of them (open up relevant pages or modals, but do not connect to custodian yet).

brave://rewards Rewards panel
Screenshot_20230228-221241_Brave - Beta Screenshot_20230228-221252_Brave - Beta

3.6. Inside each of the notices, make sure the date and time correspond with what’s at the /parameters endpoint. The parameters endpoint is in UTC, and the value shown in notices should be translated into your local device time.

  • The date and time at the /parameters endpoint is in UTC "2023-03-25T04:00:00Z"
  • Ensured that the time is translated into local device time (IST) March 25, 2023 at 9:30  AM (IST = UTC + 5.30)

3.7. In the NTP Rewards widget, close the vBAT expiry notice. Then, refresh the NTP and it should appear again. (NA)
3.8. In the Rewards dropdown panel, close the vBAT expiry notice. Then, close and open the dropdown panel again. It should reappear again.

Close vBAT expiry notice in BR panel Refresh BR panel
Screenshot_20230301-125236_Brave - Beta Screenshot_20230301-125244_Brave - Beta

3.9. Connect a custodian.
3.10. Once connected, look around for vBAT expiry notices on NTP, brave://rewards, and Rewards dropdown panel. Now that you’re in the connected state, NO vBAT expiry notices should appear anywhere.

Example Example
Screenshot_20230301-130931_Brave - Beta Screenshot_20230301-130923_Brave - Beta

3.11. Reset Brave Rewards and enable Brave Rewards. You’re now in the non-connected state. Check NTP, brave://rewards and Rewards dropdown panel. NO vBAT expiry notices should appear anywhere. (NA see comments)

Case 4: Japan version of vbatDeadline is in the future (custodian available → connected → reset into non-connected)_PASSED

4.1. In older version of Brave, create a Rewards profile in staging and declare JP region

1.47.x rewards settings
Screenshot_20230301-182346_Brave - Beta

4.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is in the future. Note that vbatDeadline is a UTC date.
4.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
4.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 18:33:09.010 1241-1692/? I/ActivityManager: Start proc 22538:com.brave.browser_beta:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:2/u0ai112 for  {com.brave.browser_beta/org.chromium.content.app.Sandbox

4.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices. They SHOULD appear
(compare with Figma, row “Countdown to feature removal notification”). Make sure the “Connect account” and “Learn more” buttons work in all of them (open up relevant pages or modals, but do not connect to custodian yet).

brave://rewards Rewards panel
Screenshot_20230301-183506_Brave - Beta Screenshot_20230301-183558_Brave - Beta

4.6. Inside each of the notices, make sure the date and time correspond with what’s at the /parameters endpoint. The parameters endpoint is in UTC, and the value shown in notices should be translated into your local device time.

  • The date and time at the /parameters endpoint is in UTC "2023-03-25T04:00:00Z"
  • Ensured that the time is translated into local device time (IST) March 25, 2023 at 9:30 AM (IST = UTC + 5.30)

4.7. In the NTP Rewards widget, close the vBAT expiry notice. Then, refresh the NTP and it should appear again. (NA)

4.8. In the Rewards dropdown panel, close the vBAT expiry notice. Then, close and open the dropdown panel again. It should reappear again.

Close vBAT expiry notice in BR panel Refresh BR panel
Screenshot_20230301-183919_Brave - Beta Screenshot_20230301-183926_Brave - Beta

4.9. Connect a custodian.
4.10. Once connected, look around for vBAT expiry notices on NTP, brave://rewards, and Rewards dropdown panel. Now that you’re in the connected state, NO vBAT expiry notices should appear anywhere.

Example Example
Screenshot_20230301-184203_Brave - Beta Screenshot_20230301-184224_Brave - Beta

4.11. Reset Brave Rewards and enable Brave Rewards. You’re now in the non-connected state. Check NTP, brave://rewards and Rewards dropdown panel. NO vBAT expiry notices should appear anywhere. (NA)

Case 5: vbatDeadline is in the future (custodian available → not available → available → connected → reset into non-connected)_PASSED

5.1. Create a profile on 1.47.x or earlier and enable Rewards against staging in the US.

1.47.x rewards settings
Screenshot_20230301-135502_Brave - Beta

5.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is in the future. Note that vbatDeadline is a UTC date.
5.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
5.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
   [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 15:33:39.550 30077-30077/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11497 s  

5.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices.

brave://rewards Rewards panel
Screenshot_20230301-153712_Brave - Beta Screenshot_20230301-153717_Brave - Beta

5.6. Inside each of the notices, make sure the date and time correspond with what’s at the /parameters endpoint. The parameters endpoint is in UTC, and the value shown in notices should be translated into your local device time.

5.7. Now, have Ben Huson or proxy the /parameters endpoint so that there are NO available custodians for your region (in this example, US). I have added "GB" in the region not supported block for Uphold custodian

5.8. Make sure these new values are being picked up by the browser (e.g., try a browser restart).

Logs:

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....

    [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 15:49:59.391 415-415/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11038 s

5.9. Check for vBAT notices on NTP, brave://rewards, and Rewards dropdown. However, they should now be the variant that says “no available custodian” (matches Figma row “Countdown to feature removal notification + No custodians available”). Make sure the “Learn more” buttons work in all of them (open up relevant pages).

  • Confirmed that the content of “Countdown to feature removal notification+ No custodians available” message is as per the Figma spec
  • Confirmed that click on “Learn more” (verified all the 2 places) redirects to https://brave.com/rewards-changes/
Example Example
Screenshot_20230301-154314_Brave - Beta Screenshot_20230301-154326_Brave - Beta

5.10. In the NTP Rewards widget, close the vBAT expiry notice. Then, refresh the NTP and it should appear again (NA)

5.11. In the Rewards dropdown panel, close the vBAT expiry notice. Then, close and open the dropdown panel again. It should reappear again.

Close vBAT expiry notice in BR panel Refresh BR panel
Screenshot_20230301-154528_Brave - Beta Screenshot_20230301-154712_Brave - Beta

5.12. Now, update /parameters endpoint so that there is at least 1 available custodian for GB, then confirm new /parameters values are being picked up by the browser.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....

    [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 15:49:59.391 415-415/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11038 s

5.13. Check to see if vBAT notices have returned to looking like Figma’s row “Countdown to feature removal notification”, which allows a user to connect custodian. Make sure the “Connect account” and “Learn more” buttons work in all of them (open up relevant pages or modals, but do not connect to custodian yet).

Example Example
Screenshot_20230301-155019_Brave - Beta Screenshot_20230301-155032_Brave - Beta

5.14. Connect a custodian.
5.15. Look around and make sure no more vBAT notices of any kind appear in NTP, Rewards dropdown panel, or brave://rewards.

Example Example
Screenshot_20230301-155503_Brave - Beta Screenshot_20230301-155513_Brave - Beta

5.16. Reset Brave Rewards then re-enable Rewards. You should now be in the non-connected state.
5.17. No vBAT expiry notices should appear anywhere: none on NTP, brave://rewards or dropdown panel.

Case 6: Custodian available → forcible transition to non-connected_PASSED

6.1 Create a profile on 1.47.x or earlier and enable Rewards against staging in the UK.

1.47.x rewards settings
Screenshot_20230301-164342_Brave - Beta

6.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is sometime in the future.
6.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
6.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
   [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 16:43:19.999 13907-13907/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11034 s

6.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices (available custodian case).

Example Example
Screenshot_20230301-164521_Brave - Beta Screenshot_20230301-164536_Brave - Beta

6.6. Now, change /parameters to vbatDeadline to sometime in the recent past, and vbatExpired: true.
6.7. Make sure /parameters is picking up the new values.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....

   [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-25T04:00:00Z","vbatExpired":true}
2023-03-01 16:50:48.936 16762-16762/? V/chromium: [VERBOSE1:creatives_builder.cc(71)] Creative set id f1886272-e83d-4efb-b53c-72a1c79ae0b3 does not support android

6.8. Check Brave Rewards UI: user should now see the new non-connected state and no longer see the grandfathered-unverified state. No vBAT notices should appear anywhere. Do a general scan to make sure NTP widget, brave://rewards and Rewards dropdown panel match the new non-connected state.

Example Example
Screenshot_20230301-165152_Brave - Beta Screenshot_20230301-165203_Brave - Beta
Case 7: Japan version of custodian available → forcible transition to non-connected_PASSED

7.1 Create a profile on 1.47.x or earlier and enable Rewards against staging and select the JP region

1.47.x rewards settings
Screenshot_20230301-185309_Brave - Beta

7.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is sometime in the future.
7.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
7.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}

7.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices (available custodian case).

Example Example Example
Screenshot_20230301-185532_Brave - Beta Screenshot_20230301-185540_Brave - Beta Screenshot_20230301-185553_Brave - Beta

7.6. Now, change /parameters to vbatDeadline to sometime in the recent past, and vbatExpired: true.
7.7. Make sure /parameters is picking up the new values.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
    [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-25T04:00:00Z","vbatExpired":true}
2023-03-01 19:02:10.602 32263-32263/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11191 s

7.8. Check Brave Rewards UI: user should now see the new non-connected state and no longer see the grandfathered-unverified state. No vBAT notices should appear anywhere. Do a general scan to make sure NTP widget, brave://rewards and Rewards dropdown panel match the new non-connected state.

Example Example
Screenshot_20230301-190329_Brave - Beta Screenshot_20230301-190336_Brave - Beta
Case 8: No custodian available → forcible transition to non-connected_PASSED

8.1. Create a profile on 1.47.x or earlier and enable Rewards against staging in a region that has no supported custodians (like Antarctica).

1.47.x rewards settings
Screenshot_20230301-171319_Brave - Beta

8.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is sometime in the future.
8.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
8.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
    [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 17:15:35.980 24107-24107/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 10921 s

8.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices (no available custodian case).

Example Example
Screenshot_20230301-171604_Brave - Beta Screenshot_20230301-171645_Brave - Beta

8.6. Now, change /parameters to vbatDeadline to sometime in the recent past, and vbatExpired: true.
8.7. Make sure /parameters is picking up the new values.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-25T04:00:00Z","vbatExpired":true}
2023-03-01 17:19:46.687 25590-25590/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 10965 s
2023-03-01 17:19:52.429 25590-25590/? V/chromium: [VERBOSE5:ledger_impl.cc(117)] 

8.8. Check Brave Rewards UI: user should now see the new non-connected state and no longer see the grandfathered-unverified state. No vBAT notices should appear anywhere. Do a general scan to make sure NTP widget, brave://rewards and Rewards dropdown panel match the new non-connected state.

Example Example
Screenshot_20230301-172000_Brave - Beta Screenshot_20230301-172017_Brave - Beta
Case 9: vBAT flag (custodian available → flag → unflag → no custodian available → flag)_PASSED

9.1. Create a profile on 1.47.x or earlier and enable Rewards against staging in the US.

1.47.x rewards settings
Screenshot_20230301-173628_Brave - Beta

9.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is sometime in the future.
9.3. Update to 1.49.x. You are now in the grandfathered-unverified state.
9.4. You should see vBAT expiry notices on NTP, brave://rewards and Rewards dropdown panel.

Example Example
Screenshot_20230301-173844_Brave - Beta Screenshot_20230301-173902_Brave - Beta

Logs:

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 17:38:26.027 32307-32307/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11539 s

9.5. Go to brave://flags and set BraveRewardsVBatNotice feature flag to “disabled”.
9.6. Relaunch Brave.
Screenshot_20230301-174153_Brave - Beta

9.7. Look around and make sure there are no vBAT expiry notices visible anymore.

Example Example
Screenshot_20230301-174316_Brave - Beta Screenshot_20230301-174325_Brave - Beta

9.8. Go to brave://flags and set BraveRewardsVBatNotice feature flag to “enabled”. Relaunch browser.
Screenshot_20230301-174404_Brave - Beta

9.9. Make sure vBAT expiry notices appear again.

Example Example
Screenshot_20230301-174421_Brave - Beta Screenshot_20230301-174435_Brave - Beta

9.10. Change /parameters so that there are no available custodians for your region (in this example, UK)

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
.....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-01 17:47:27.004 4783-4783/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11839 s

9.11. vBAT notices should now show the Figma “Countdown to feature removal notification + No custodians available” case.

Example Example
Screenshot_20230301-174821_Brave - Beta Screenshot_20230301-174829_Brave - Beta

9.12. Go to brave://flags and set BraveRewardsVBatNotice feature flag to “disabled”. Relaunch browser.
Screenshot_20230301-174915_Brave - Beta

9.13. Make sure all vBAT notices have disappeared.

Example Example
Screenshot_20230301-175034_Brave - Beta Screenshot_20230301-175054_Brave - Beta

9.14. Go to brave://flags and set BraveRewardsVBatNotice feature flag to “enabled”. Relaunch browser.
Screenshot_20230301-175126_Brave - Beta

9.15. Make sure all vBAT notices have reappeared.

Example Example
Screenshot_20230301-175144_Brave - Beta Screenshot_20230301-175201_Brave - Beta

9.16. Reset Brave Rewards so that you’re in the non-connected state. (NA)

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Mar 7, 2023

Verification PASSED on Samsung Galaxy Tab A7 version 12 running Bravemonoarm64.apk_1.49.118

Verified the scenarios from https://docs.google.com/document/d/1YVa6Wx4kMd90Q7mfx29iW--xa4tPNl7YXc486CkYQAI/edit#heading=h.t2vdk6dnw3tr

Note: Reset rewards cases are NOT verified, thread about the discussion https://bravesoftware.slack.com/archives/CNH9Q6REV/p1675080664239119?thread_ts=1675061489.249839&cid=CNH9Q6REV

Encountered #28817
Encountered #28816

Case 1: vbatDeadline not specified_PASSED

1.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)

1.47.x rewards settings
Screenshot_20230308-151258_Brave

1.2. Upgrade the profile to 1.49.x
1.3. You are now in the grandfathered-unverified state. Make it so that the /parameters endpoint (via Ben Huson or a proxy) does not have a vbatDeadline field/value at all
1.4. Make sure that the browser has picked up this new /parameters value.

1.49.x rewards settings 1.49.x BR panel
Screenshot_20230308-151923_Brave Screenshot_20230308-151928_Brave

Logs:

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false}
2023-03-08 15:16:03.040 24445-24445/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 12060 s

1.5. Connect to a custodian. You are now in the connected state.

Example Example
Screenshot_20230308-152420_Brave Screenshot_20230308-152426_Brave

1.6. Make sure /parameters endpoint is still not showing any vbatDeadline value
1.7. Restart browser just in case.
1.8. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230308-152420_Brave Screenshot_20230308-152426_Brave

1.9. Reset Brave Rewards. You should now be in the new non-connected state.
1.10. Restart browser just in case.
1.11. Make sure /parameters endpoint is still not showing any vbatDeadline value.
1.12. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.
1.13. Delete your profile completely (fresh profile) and create one in 1.49.x. Enable Brave Rewards.

Example Example
Screenshot_20230308-152650_Brave Screenshot_20230308-152654_Brave

1.14. Make sure /parameters endpoint is still not showing any vbatDeadline value.

Logs:

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatExpired":false}
2023-03-08 15:26:39.495 28919-28919/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 12038 s

1.15. You should be in the new non-connected state.
1.16. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230308-152650_Brave Screenshot_20230308-152654_Brave
Case 2: vbatDeadline is in the past_FAILED_encountered #28817

2.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)
2.2. Accept accept UGP grant (so that you can check the vBAT expiry notices on the NTP Widget)

1.47.x rewards settings
Screenshot_20230307-225525_Brave

2.3. Upgrade the profile to 1.49.x
2.4. You are now in the grandfathered-unverified state. Make it so that the /parameters endpoint (via Ben Huson or a proxy) has a vbatDeadline field/value set in the past (such as January 2, 2023).
2.5. Ensure this is the result you’re getting from /parameters.

Logs

   [ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
2023-03-07 22:20:52.358 25033-25033/? V/chromium: [VERBOSE1:recovery.cc(22)] Running empty balance check...
....
     [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false}
2023-03-07 22:55:12.979 4781-4781/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11883 s

2.6. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere. Encountered the issue #28817

1.49.x rewards settings 1.49.x BR panel
Screenshot_20230307-225952_Brave Screenshot_20230307-230004_Brave

2.7. Connect to a custodian. You are now in the connected state.

Example Example
Screenshot_20230307-230226_Brave Screenshot_20230307-230237_Brave
    1. Make sure /parameters endpoint vbatDeadline field/value is still set in the past (such as January 2, 2023).
   [ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
 [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false}
2023-03-07 23:04:44.563 8269-8269/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11615 s

2.9. Restart browser just in case.
2.10. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230307-230226_Brave Screenshot_20230307-230237_Brave

2.11. Reset Brave Rewards. You should now be in the new non-connected state. (NA)
2.12. Restart browser just in case.
2.13. Make sure /parameters endpoint is still showing vbatDeadline field/value set in the past (such as January 2, 2023).
2.14 Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.
2.15. Delete your profile completely (fresh profile) and create one in 1.49.x. Enable Brave Rewards.
2.16. Make sure /parameters endpoint’s vbatDeadline field/value is still set in the past (such as January 2, 2023). .
2.17. You should be in the new non-connected state
2.18. Look at NTP Rewards Widget, Rewards panel, and brave://rewards page. Make sure there are no vBAT expiry notices anywhere.

Example Example
Screenshot_20230307-230834_Brave Screenshot_20230307-230842_Brave
Case 3: vbatDeadline is in the future (custodian available → connected → reset into non-connected)_FAILED_encountered #28816

3.1. In older version of Brave, create a Rewards profile in staging (ideally select a country with a supported custodian and that you have a matching account for, such as UK)

1.47.x rewards settings
Screenshot_20230307-222113_Brave

3.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is in the future. Note that vbatDeadline is a UTC date.
3.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
3.4. Make sure the right values are coming from /parameters.

   [ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
2023-03-07 22:20:52.358 25033-25033/? V/chromium: [VERBOSE1:recovery.cc(22)] Running empty balance check...
....
    [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-07 22:22:51.661 25990-25990/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11553 s

3.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices. They SHOULD appear
(compare with Figma, row “Countdown to feature removal notification”). Make sure the “Connect account” and “Learn more” buttons work in all of them (open up relevant pages or modals, but do not connect to custodian yet).

brave://rewards Rewards panel
Screenshot_20230307-224558_Brave Screenshot_20230307-222841_Brave

3.6. Inside each of the notices, make sure the date and time correspond with what’s at the /parameters endpoint. The parameters endpoint is in UTC, and the value shown in notices should be translated into your local device time.

  • The date and time at the /parameters endpoint is in UTC "2023-03-25T04:00:00Z"
  • Ensured that the time is translated into local device time (IST) March 25, 2023 at 9:30  AM (IST = UTC + 5.30)

3.7. In the NTP Rewards widget, close the vBAT expiry notice. Then, refresh the NTP and it should appear again. (NA)
3.8. In the Rewards dropdown panel, close the vBAT expiry notice. Then, close and open the dropdown panel again. It should reappear again.

Close vBAT expiry notice in BR panel Refresh BR panel
Screenshot_20230307-223036_Brave Screenshot_20230307-223100_Brave

3.9. Connect a custodian.
3.10. Once connected, look around for vBAT expiry notices on NTP, brave://rewards, and Rewards dropdown panel. Now that you’re in the connected state, NO vBAT expiry notices should appear anywhere.

Example Example
Screenshot_20230307-223443_Brave Screenshot_20230307-223624_Brave

3.11. Reset Brave Rewards and enable Brave Rewards. You’re now in the non-connected state. Check NTP, brave://rewards and Rewards dropdown panel. NO vBAT expiry notices should appear anywhere. (NA see comments)

Case 4: Japan version of vbatDeadline is in the future (custodian available → connected → reset into non-connected)_PASSED

4.1. In older version of Brave, create a Rewards profile in staging and declare JP region

1.47.x rewards settings
Screenshot_20230308-154649_Brave

4.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is in the future. Note that vbatDeadline is a UTC date.
4.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
4.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
 [ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-08 15:47:43.284 6699-6699/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 11325 s

4.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices. They SHOULD appear
(compare with Figma, row “Countdown to feature removal notification”). Make sure the “Connect account” and “Learn more” buttons work in all of them (open up relevant pages or modals, but do not connect to custodian yet).

brave://rewards Rewards panel
Screenshot_20230308-154919_Brave Screenshot_20230308-154926_Brave

4.6. Inside each of the notices, make sure the date and time correspond with what’s at the /parameters endpoint. The parameters endpoint is in UTC, and the value shown in notices should be translated into your local device time.

  • The date and time at the /parameters endpoint is in UTC "2023-03-25T04:00:00Z"
  • Ensured that the time is translated into local device time (IST) March 25, 2023 at 9:30 AM (IST = UTC + 5.30)

4.7. In the NTP Rewards widget, close the vBAT expiry notice. Then, refresh the NTP and it should appear again. (NA)

4.8. In the Rewards dropdown panel, close the vBAT expiry notice. Then, close and open the dropdown panel again. It should reappear again.

Close vBAT expiry notice in BR panel Refresh BR panel
Screenshot_20230308-155353_Brave Screenshot_20230308-155402_Brave

4.9. Connect a custodian.
4.10. Once connected, look around for vBAT expiry notices on NTP, brave://rewards, and Rewards dropdown panel. Now that you’re in the connected state, NO vBAT expiry notices should appear anywhere.

Example Example
Screenshot_20230308-160025_Brave Screenshot_20230308-160105_Brave

4.11. Reset Brave Rewards and enable Brave Rewards. You’re now in the non-connected state. Check NTP, brave://rewards and Rewards dropdown panel. NO vBAT expiry notices should appear anywhere. (NA)

Case 7: Japan version of custodian available → forcible transition to non-connected_PASSED

7.1 Create a profile on 1.47.x or earlier and enable Rewards against staging and select the JP region

1.47.x rewards settings

Screenshot_20230308-162334_Brave

7.2. Update parameters endpoint (or set up a proxy) so that vbatDeadline is sometime in the future.
7.3. Update to 1.49.x. You should now be in the grandfathered-unverified state.
7.4. Make sure the right values are coming from /parameters.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-03-25T04:00:00Z","vbatExpired":false}
2023-03-08 16:24:42.242 14536-14536/? V/chromium: [VERBOSE1:issuers.cc(74)] OnFetchIssuers

7.5. Go to NTP Rewards widget, brave://rewards, and Rewards dropdown panel and check for notices (available custodian case).

Example Example
Screenshot_20230308-162459_Brave Screenshot_20230308-162505_Brave

7.6. Now, change /parameters to vbatDeadline to sometime in the recent past, and vbatExpired: true.
7.7. Make sure /parameters is picking up the new values.

[ REQUEST ]
    > URL: https://api.rewards.bravesoftware.com/v1/parameters
    > Method: GET
....
[ RESPONSE - OnResponse ]
    > Url: https://api.rewards.bravesoftware.com/v1/parameters
    > Result: Success
    > HTTP Code: 200
    > Body: {"autocontribute":{"choices":[1,2,3,5,7,10,20],"defaultChoice":1},"batRate":0.262301,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","US","GB","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"processing","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-25T04:00:00Z","vbatExpired":true}
2023-03-08 16:27:26.451 15504-15504/? V/chromium: [VERBOSE1:api_parameters.cc(90)] Params timer set for 10903 s

7.8. Check Brave Rewards UI: user should now see the new non-connected state and no longer see the grandfathered-unverified state. No vBAT notices should appear anywhere. Do a general scan to make sure NTP widget, brave://rewards and Rewards dropdown panel match the new non-connected state.

Example Example
Screenshot_20230308-163019_Brave Screenshot_20230308-163030_Brave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android 8 - Test/Verification Checking on an older Android device to make sure everything is working as expected feature/rewards OS/Android Fixes related to Android browser functionality priority/P1 A very extremely bad problem. We might push a hotfix for it. QA Pass - Android ARM QA/Test-All-Platforms QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants