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

grandfathered unverified state does not display processing or complete payout banners #28001

Closed
LaurenWags opened this issue Jan 24, 2023 · 4 comments · Fixed by brave/brave-core#16833
Assignees
Labels
feature/rewards OS/Android Fixes related to Android browser functionality OS/Desktop priority/P1 A very extremely bad problem. We might push a hotfix for it. QA Pass - Android ARM QA Pass-macOS QA/Yes regression release-notes/exclude

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Jan 24, 2023

Description

The grandfathered unverified state does not display "processing" or "complete" payout banners. It does display the "pending" banner.

See test case 16 from QA doc (see @Miyayes for access to doc)

Steps to Reproduce

16.1 Create rewards profile on older version of Brave and view some ads. Then update to 1.48.x so that you’re in the grandfathered-unverified state.
16.2 View couple of ads and confirm ads are cashed in with the server (verify Successfully redeemed unblinded payment tokens msg in logs)
16.3 Look for the last message similar to "You have X unblinded payment tokens which will be redeemed in (some hours, minutes, seconds) at (some time)" message, once this time has come, you should then see a response in the logs for "OnRedeemUnblindedPaymentTokens". If this is successful, you can proceed to next steps.
16.4 Close browser. Advance clock to the next month to the 2nd (or between 1st and 7th), and then relaunch the browser, to see if you see any “Payout will arrive in x days” banner”. This banner displays as expected:

Example Example Example
4a 4b 4c

16.5 Advance your clock to the 8th or later and then relaunch the browser.
16.6 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “processing” for unverified users.
16.7 Make sure that the browser has picked up this new /parameters 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.261167,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","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-01-19T00:00:00Z","vbatExpired":true}

---> 16.8 The “processing” banner does not appear in the Rewards panel, NTP widget, and brave://rewards page as it should:

Example Example Example
8a 8b 8c

16.9 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “complete” for unverified users.
16.10 Make sure that the browser has picked up this new /parameters value.

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
[3896:259:0208/093501.525166:VERBOSE6:logging_util.cc(134)] 
[ 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.260985,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-01-19T00:00:00Z","vbatExpired":true}

---> 16.11 The “complete” banner does not appear in the Rewards panel, NTP widget, or brave://rewards page as expected

Example Example Example
11a 11b 11c

16.12 Bring your clock back to the current month to 9th or later, and then relaunch the browser, and make sure you don’t see the banners (because it’s the wrong month)

Example Example Example
12a 12b 12c

Actual result:

see above, screenshots are in line w/ steps

Expected result:

processing and complete banners should show in steps 8 and 11 respectively.

Here's an example from 1.47.x of the "complete" banner:

Example Example Example
Screen Shot 2023-02-08 at 9 52 24 AM Screen Shot 2023-02-08 at 9 52 34 AM Screen Shot 2023-02-08 at 9 52 44 AM

Reproduces how often:

easily

Desktop Brave version:

1.48.x

Android Device details:

  • Install type (ARM, x86):
  • Device type (Phone, Tablet, Phablet):
  • Android version:

Version/Channel Information:

  • Can you reproduce this issue with the current release? no, works on 1.47.x
  • Can you reproduce this issue with the beta channel? yes 1.48.x
  • Can you reproduce this issue with the nightly channel? likely yes

Other Additional Information:

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

Miscellaneous Information:

cc @Miyayes @brave/qa-team

@LaurenWags
Copy link
Member Author

@brave/qa-team when retesting this, we should also re-verify test case 15 from QA doc for "Rewards payout banner status (non-connected state)" to ensure that is still working as expected since that is also an unverified state.

@kjozwiak
Copy link
Member

The above requires 1.48.143 or higher for 1.48.x verification 👍

@LaurenWags
Copy link
Member Author

LaurenWags commented Jan 30, 2023

Verified with

Brave | 1.48.148 Chromium: 109.0.5414.119 (Official Build) beta (x86_64)
-- | --
Revision | 772095164c7d5d4e73160f858efed3b5e87eca83-refs/branch-heads/5414@{#1458}
OS | macOS Version 12.6.3 (Build 21G419)
STR from issue (Test Case 16) - PASSED
  1. Grandfathered-unverified payout banner status

16.1 Create rewards profile on older version of Brave (I used 1.47.186) and view some ads.
16.2 View couple of ads and confirm ads are cashed in with the server (verify Successfully redeemed unblinded payment tokens msg in logs)

1 47 x ads

16.3 Look for the last message similar to "You have X unblinded payment tokens which will be redeemed in (some hours, minutes, seconds) at (some time)" message, once this time has come, you should then see a response in the logs for "OnRedeemUnblindedPaymentTokens". If this is successful, you can proceed to next steps.

Logs:

[52071:259:0130/105238.730328:VERBOSE1:redeem_unblinded_payment_tokens.cc(138)] OnRedeemUnblindedPaymentTokens
[52071:259:0130/105238.730473:VERBOSE6:redeem_unblinded_payment_tokens.cc(140)] URL Response:
  URL: https://mywallet.ads.bravesoftware.com/v2/confirmation/payment/49503498-51b8-5ef0-9976-44a923688241
  Response Status Code: 200
  Response: {"message":"Ok","status":200}

16.4 Then update to 1.48.x (version with the fix) so that you’re in the grandfathered-unverified state. Close browser. Advance clock to the next month to the 2nd (or between 1st and 7th), and then relaunch the browser, to see if you see any “Payout will arrive in x days” banner”. This banner displays as expected:

Example Example Example
1 2 3

16.5 Advance your clock to the 8th or later and then relaunch the browser.
16.6 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “processing” for unverified users.
16.7 Make sure that the browser has picked up this new /parameters value.

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
[54152:259:0208/140258.898145:VERBOSE6:logging_util.cc(134)] 
[ 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.26291,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","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-10T00:00:00Z","vbatExpired":false}

16.8 The “processing” banner does appear in the Rewards panel, NTP widget, and brave://rewards page as it should:

Example Example Example
4 5 6

16.9 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “complete” for unverified users.
16.10 Make sure that the browser has picked up this new /parameters value.

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
[54231:259:0208/140428.540183:VERBOSE6:logging_util.cc(134)] 
[ 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.252626,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-10T00:00:00Z","vbatExpired":false}

16.11 The “complete” banner does appear in the Rewards panel, NTP widget, or brave://rewards page as expected

Example Example Example
7 8 9

16.12 Bring your clock back to the current month to 9th or later, and then relaunch the browser, and make sure you don’t see the banners (because it’s the wrong month)

Example Example Example
10 11 12
Regression testing (Test Case 15) - PASSED
  1. Rewards payout banner status (non-connected state)

15.1 Create new profile in staging so you’re in the new non-connected state
15.2 View couple of ads and confirm ads are cashed in with the server (verify Successfully redeemed unblinded payment tokens msg in logs)
15.3 Look for the last message similar to "You have X unblinded payment tokens which will be redeemed in (some hours, minutes, seconds) at (some time)" message, once this time has come, you should then see a response in the logs for "OnRedeemUnblindedPaymentTokens". If this is successful, you can proceed to next steps.

Logs:

[55150:259:0130/145557.339645:VERBOSE1:redeem_unblinded_payment_tokens.cc(139)] OnRedeemUnblindedPaymentTokens
[55150:259:0130/145557.339719:VERBOSE6:redeem_unblinded_payment_tokens.cc(141)] URL Response:
  URL: https://mywallet.ads.bravesoftware.com/v3/confirmation/payment/282c48cb-3d5d-54b9-a500-32e259b1fae4
  Response Status Code: 200
  Response: {"message":"Ok","status":200}

15.4 Advance clock to the next month to the 2nd (or between 1st and 7th), and then relaunch the browser, to see if you see any “Payout will arrive in x days” banner”. There should NOT be any banner like this.

Example Example Example
1 2 3

15.5 Advance your clock to the 8th or later and then relaunch the browser.
15.6 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “processing” for unverified users.
15.7 Make sure that the browser has picked up this new /parameters 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.26291,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","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-10T00:00:00Z","vbatExpired":false}

15.8 Make sure no “processing” banner appears in the Rewards panel, NTP widget, or brave://rewards page.

Example Example Example
4 5 6

15.9 Ask someone on server team, or use Charles Proxy to set the payout status at the staging /parameters endpoint to “complete” for unverified users.
15.10 Make sure that the browser has picked up this new /parameters value.

Logs:

[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: GET
[55394:259:0208/150101.410849:VERBOSE6:logging_util.cc(134)] 
[ 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.247414,"custodianRegions":{"bitflyer":{"allow":["JP"],"block":[]},"gemini":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US"],"block":[]},"uphold":{"allow":["AU","AT","BE","CA","CO","DK","FI","HK","IE","IT","NL","NO","PL","PT","SG","ES","SE","GB","US","IN"],"block":[]}},"payoutStatus":{"bitflyer":"complete","gemini":"complete","payoutDate":"","unverified":"complete","uphold":"complete"},"tips":{"defaultMonthlyChoices":[1.25,5,10.5],"defaultTipChoices":[1.25,5,10.5]},"vbatDeadline":"2023-02-10T00:00:00Z","vbatExpired":false}

15.11 Make sure no “complete” banner appears in the Rewards panel, NTP widget, or brave://rewards page.

Example Example Example
7 8 9

15.12 Bring your clock back to the current month to 9th or later, and then relaunch the browser, and make sure you also don’t see anything then either.

Example Example Example
10 11 12

@LaurenWags LaurenWags added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jan 30, 2023
@GeetaSarvadnya
Copy link

Verification PASSED on Samsung Galaxy version 12 running Bravemonoarm64.aok_1.48.148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/rewards OS/Android Fixes related to Android browser functionality OS/Desktop priority/P1 A very extremely bad problem. We might push a hotfix for it. QA Pass - Android ARM QA Pass-macOS QA/Yes regression release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants