Skip to content

[Android] [Rewards 2.5 Phase 4] vBAT expiry notice is shown when past date is set in the vbatDeadline at the /parameter endpoint #28817

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

Closed
GeetaSarvadnya opened this issue Mar 1, 2023 · 5 comments · Fixed by brave/brave-core#19599
Assignees
Labels
bug feature/rewards OS/Android Fixes related to Android browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android ARM QA/Yes release-notes/include

Comments

@GeetaSarvadnya
Copy link

Description

Found while testing #27883
[Rewards 2.5 Phase 4] vBAT expiry notice is shown when past date is set in the vbatDeadline at the /parameter endpoint

Steps to Reproduce

  1. Follow the steps from scenario 2 via https://docs.google.com/document/d/1YVa6Wx4kMd90Q7mfx29iW--xa4tPNl7YXc486CkYQAI/edit#heading=h.t2vdk6dnw3tr
  2. Open brave://settings, vBAT expiry notice is NOT shown as expected
  3. Open BR panel vBAT expiry notice is shown, which is NOT as expected as the past date is set at the /parameter endpoint

Actual result:

past date is set at the /parameter endpoint

[ 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

Screenshot_20230301-140818_Brave - Beta

Expected result:

vBAT expiry notice should NOT be shown when past date is set at the /parameter endpoint

Reproduces how often:

Easy

Brave version (brave://version info)

1.49.108

Version/Channel Information:

  • Can you reproduce this issue with the current release? NA
  • Can you reproduce this issue with the beta 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:

cc: @brave/qa-team @deeppandya @Miyayes

@deeppandya
Copy link
Contributor

@GeetaSarvadnya regarding this issue, you should set vbatExpired to true when you try to set the expiry date. it should behave the same on desktop as well.

@GeetaSarvadnya
Copy link
Author

@deeppandya The same case works fine on Desktop with vbatExpired = false and vbatDeadline to past date

@Miyayes Miyayes added the priority/P2 A bad problem. We might uplift this to the next planned release. label Mar 1, 2023
@Miyayes
Copy link
Collaborator

Miyayes commented Mar 1, 2023

Aim for 1.49.x maintenance release // we have some time on this one because it will only come into play nearer the actual vBAT sunset deadline date.

@Miyayes Miyayes added OS/Android Fixes related to Android browser functionality and removed OS/Desktop labels Mar 1, 2023
@Miyayes Miyayes changed the title [Rewards 2.5 Phase 4] vBAT expiry notice is shown when past date is set in the vbatDeadline at the /parameter endpoint [Android] [Rewards 2.5 Phase 4] vBAT expiry notice is shown when past date is set in the vbatDeadline at the /parameter endpoint Mar 1, 2023
@Miyayes Miyayes added priority/P3 The next thing for us to work on. It'll ride the trains. and removed priority/P2 A bad problem. We might uplift this to the next planned release. labels Mar 21, 2023
@brave-builds brave-builds added this to the 1.59.x - Nightly milestone Aug 9, 2023
@kjozwiak
Copy link
Member

The above requires 1.58.93 or higher for 1.58.x verification 👍

@GeetaSarvadnya
Copy link
Author

GeetaSarvadnya commented Sep 4, 2023

Verification PASSED on Vivo X70 Pro version 12 running Bravemonoarm64.apk_1.58.110

Example Example Example
Screenshot_20230904_165441 Screenshot_20230904_165447 Screenshot_20230904_165453
[ 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.170927,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["US","CA","SG","GB"],"block":[]},"uphold":{"allow":["AD","AU","AR","AT","BE","BR","BS","BZ","CA","CH","CL","CO","CR","CY","CZ","DK","EC","EE","FI","FR","GD","GT","GR","HK","HN","HU","IE","IS","IT","JM","KY","LI","LT","LV","LU","MC","MT","MX","NI","NO","NZ","PE","PT","PY","SG","TR","UY","ES","SE","GB","US","UM","ZA","PL","SK","HR","SI","GR","TW"],"block":[]},"zebpay":{"allow":["IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"off","zebpay":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-25T04:00:00Z","vbatExpired":false}
2023-09-04 16:51:03.948 19055-19055/? V/chromium: [VERBOSE1:api_parameters.cc(88)] Params timer set for 10873 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/rewards OS/Android Fixes related to Android browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass - Android ARM QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants