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

Integrate with BAP reporting endpoint #14315

Closed
zenparsing opened this issue Feb 23, 2021 · 3 comments · Fixed by brave/brave-core#8054
Closed

Integrate with BAP reporting endpoint #14315

zenparsing opened this issue Feb 23, 2021 · 3 comments · Fixed by brave/brave-core#8054
Assignees
Labels
feature/rewards OS/Android Fixes related to Android browser functionality OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Win64 QA/Yes release-notes/exclude

Comments

@zenparsing
Copy link

No description provided.

@kjozwiak
Copy link
Member

kjozwiak commented Mar 8, 2021

Pending 1.21.x uplift via brave/brave-core#8178.

@LaurenWags
Copy link
Member

Per discussion in Rewards meeting today, this will only be checked on Windows once uplifted to 1.21.x.

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Mar 11, 2021

Verification passed on


Brave | 1.21.76 Chromium: 89.0.4389.86 (Official Build) (64-bit)
-- | --
Revision | 0c2dac31bc21e806a791641316e99920f84ea52c-refs/branch-heads/4389@{#1472}
OS | Windows 10 OS Version 2004 (Build 19041.804)

Brave	1.21.76 Chromium: 89.0.4389.86 (Official Build) (64 ビット)
変更履歴	0c2dac31bc21e806a791641316e99920f84ea52c-refs/branch-heads/4389@{#1472}
OS	Windows 10 OS Version 1809 (Build 17763.1637)
Test Case 1: Non-JP regions
  • Ensured UGP grants are shown

  • Ensured users can claim UGP grants
    image
    image
    image

  • Relaunch the browser and ensured that the requests to /v1/promotions/report-bap will not be shown in the terminal or brave://rewards-internals

Test Case 2: Happy Path, JP Region
  • Clean profile, enable rewards and ensured that the confirmed BAP retry is scheduled due to zero balance logs is shown in the terminal
[9144:1068:0311/020658.319:VERBOSE1:recovery.cc(22)] Running empty balance check...
[9144:1068:0311/020658.320:VERBOSE1:promotion.cc(606)] Promotion is empty
[9144:1068:0311/020658.321:VERBOSE1:bap_reporter.cc(95)] User has zero balance - rescheduling BAP reporting in 86400 s
  • Claimed UGP grants, closed the browser and restart the browser and ensured that BAP is successfully sent to the server (calls to /v1/promotions/report-bap)
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="39f5b80a-65e1-47df-9d6e-205610deb16a",algorithm="ed25519",headers="digest (request-target)",signature="0hntwLpJ+rMfmWyIjGyY507CniijLQdXGRYr2boWiSlN0v2sKeK0jYU4m5W4RSCYlTQT2X343c2eicX1gNyNBw=="
> Header accept: application/json
[1844:4796:0311/040620.467:WARNING:CONSOLE(1)] "no tab id so cannot request shield data from window focus change!", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[1844:4796:0311/040621.478:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Success
> HTTP Code: 200
> Body: {"reportBapId":"05d90d26-84cd-40d1-a1d9-5db5047d7924"}

[1844:4796:0311/040621.480:VERBOSE1:bap_reporter.cc(82)] BAP successsfully reported
  • Restart the browser, review brave://rewards-internals (or terminal) and confirmed there is no additional requests made to /v1/promotions/report-bap
  • Sent payment id to Ben to confirm server received expected amount
select * from bap_report where wallet_id='e4281a37-87c2-4b58-8f80-f81fdbbd7f36';
                  id                  |              wallet_id               |        amount         |          created_at           
--------------------------------------+--------------------------------------+-----------------------+-------------------------------
 ca7d6181-cb8f-46a8-b1d9-2f4927f5ba5c | e4281a37-87c2-4b58-8f80-f81fdbbd7f36 | 30.000000000000000000 | 2021-03-11 16:22:16.107471+00
(1 row)
    
Test Case 3: Tip before BAP is reported
  • Claim UGP grants and send a tip to a verified publisher and close the browser, restart the browser and ensured that the BAP is successfully sent to the server
    image
    image
    image
[ REQUEST ]
> URL: https://api.rewards.bravesoftware.com/v1/parameters
> Method: UrlMethod::GET
[1048:8036:0311/042738.299:VERBOSE5:ledger_impl.cc(133)]
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":20.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=stGhxGmERHswrKsP9rKzkEy/Z/zI7/84Eel6Upxiek8=
> Header signature: keyId="4db2f938-25d2-44f2-9723-65a9784d73b0",algorithm="ed25519",headers="digest (request-target)",signature="ytBnExlL9NWIRbupXmAYN7pXk3C+cpIWlYdzCVD6HV/Y/zTylioiVbLH+tuKyz3SL7fMZ0FvokpvKhLggR5yBQ=="
> Header accept: application/json
[1048:8036:0311/042739.706:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Success
> HTTP Code: 200
> Body: {"reportBapId":"299cff13-6a04-4ec4-8c0f-28926fd4582d"}

[1048:8036:0311/042739.706:VERBOSE1:bap_reporter.cc(82)] BAP successsfully reported
  • Sent payment id to Ben to confirm server received expected amount
select * from bap_report where wallet_id='4db2f938-25d2-44f2-9723-65a9784d73b0';
                  id                  |              wallet_id               |        amount         |          created_at           
--------------------------------------+--------------------------------------+-----------------------+-------------------------------
 299cff13-6a04-4ec4-8c0f-28926fd4582d | 4db2f938-25d2-44f2-9723-65a9784d73b0 | 20.000000000000000000 | 2021-03-11 12:27:40.369954+00
(1 row)
  • Verified tips sent to verified pubs are shown in the tips panel
    image

  • Verified that the wallet balance is shown correctly in the summary
    image

Test Case 4: Server returns 400, reporting goes into retries

(Referred the steps from brave/brave-core#8054 (comment))

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="273d81e3-d740-47d5-a33f-afd8dd61cfbc",algorithm="ed25519",headers="digest (request-target)",signature="sQCroQHZZJEs3dDaVMB1glus+x/zPzHTdaXfuv4CMR5RemyG+21+hFVMW7SbVsSDHXgDJeLrCYDbTnoBgw5OBQ=="
[7728:5068:0311/051320.302:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 400
> Body: {"reportBapId":"5baff876-a44e-4062-bf7d-4c8081f8fe83"}

[7728:5068:0311/051320.302:INFO:bap_reporter_endpoint.cc(70)] Invalid request
[7728:5068:0311/051320.302:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 73 s
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="273d81e3-d740-47d5-a33f-afd8dd61cfbc",algorithm="ed25519",headers="digest (request-target)",signature="sQCroQHZZJEs3dDaVMB1glus+x/zPzHTdaXfuv4CMR5RemyG+21+hFVMW7SbVsSDHXgDJeLrCYDbTnoBgw5OBQ=="
> Header accept: application/json
[7728:5068:0311/051752.339:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 400
> Body: {"message":"Error inserting bap report, paymentId already reported: unable to record BAP report","code":409}

[7728:5068:0311/051752.339:INFO:bap_reporter_endpoint.cc(70)] Invalid request
[7728:5068:0311/051752.339:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 122 s
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="273d81e3-d740-47d5-a33f-afd8dd61cfbc",algorithm="ed25519",headers="digest (request-target)",signature="sQCroQHZZJEs3dDaVMB1glus+x/zPzHTdaXfuv4CMR5RemyG+21+hFVMW7SbVsSDHXgDJeLrCYDbTnoBgw5OBQ=="
> Header accept: application/json
[7728:5068:0311/051439.955:INFO:CONSOLE(2960)] "show reserved 0 0", source: chrome://rewards/brave_rewards_page.bundle.js (2960)
[7728:5068:0311/051440.307:VERBOSE1:refill_unblinded_tokens.cc(137)] OnRequestSignedTokens
[7728:5068:0311/051440.309:VERBOSE6:refill_unblinded_tokens.cc(139)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/token/273d81e3-d740-47d5-a33f-afd8dd61cfbc
  Response Status Code: 400
  Response: "Invalid Request R1"
[7728:5068:0311/051440.309:VERBOSE1:refill_unblinded_tokens.cc(143)] Failed to request signed tokens
[7728:5068:0311/051440.309:VERBOSE1:refill_unblinded_tokens.cc(342)] Retry refilling unblinded tokens in 0 時間 0 分 38 秒 at 5:15
[7728:5068:0311/051441.147:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 400
> Body: {"message":"Error inserting bap report, paymentId already reported: unable to record BAP report","code":409}

[7728:5068:0311/051441.147:INFO:bap_reporter_endpoint.cc(70)] Invalid request
[7728:5068:0311/051441.147:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 190 s

Test Case 5 - Server returns 500, reporting goes into retries

(Referred the steps from brave/brave-core#8054 (comment))

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8

[ RESPONSE - OnRequest ]
> Url: https://api.rewards.bravesoftware.com/v1/parameters
> Result: Success
> HTTP Code: 200
> Body: {"batRate":0.8158775676737129,"autocontribute":{"choices":[5,10,15,20,25,50,100],"defaultChoice":20},"tips":{"defaultTipChoices":[1,10,100],"defaultMonthlyChoices":[1,10,100]}}

[3280:3484:0311/065611.073:VERBOSE1:api_parameters.cc(97)] Params timer set for 10925 s
[3280:3484:0311/065611.121:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 500
> Body: {"reportBapId":"5b5e2afa-64bc-40be-b557-bdba78b28348"}

[3280:3484:0311/065611.121:INFO:bap_reporter_endpoint.cc(74)] Internal server error
[3280:3484:0311/065611.121:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 267 s

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="cc6eb667-25b2-42de-b542-3c3a4dff3d7e",algorithm="ed25519",headers="digest (request-target)",signature="QErJaEK1mrlmkW/5mlL4o6ceXJQXpfus0WxYgABFqEmdQgUw1h31A/Y8Rgj2ehR3XkO4NlsOqSq3AKMb/VBEDw=="
> Header accept: application/json
[4216:8568:0311/054151.645:WARNING:CONSOLE(1)] "no tab id so cannot request shield data from window focus change!", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[4216:8568:0311/054154.080:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 500
> Body: {"reportBapId":"b9a2506b-68c7-4c84-a270-723e5f18b8cb"}

[4216:8568:0311/054154.082:INFO:bap_reporter_endpoint.cc(74)] Internal server error
[4216:8568:0311/054154.086:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 1472 s
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="edb936e1-5554-4ba1-9b5e-7521a6bd5f47",algorithm="ed25519",headers="digest (request-target)",signature="mfXyaeukEQLWRQ0x6BxSkvBQfMsH+xYu4zqHN2hH/9Ps7kPzWx+BNRaG924IeUclM1HRJE+yO8t3yavqjg0gAw=="
> Header accept: application/json
[3280:3484:0311/070146.840:INFO:CONSOLE(2960)] "show reserved 0 0", source: chrome://rewards/brave_rewards_page.bundle.js (2960)
[3280:3484:0311/070148.028:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 500
> Body: {"message":"Error inserting bap report, paymentId already reported: unable to record BAP report","code":409}

[3280:3484:0311/070148.184:INFO:bap_reporter_endpoint.cc(74)] Internal server error
[3280:3484:0311/070148.887:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 2641 s

Test Case 6 - wifi is off, reporting goes into retries (Referred the steps from https://github.com/brave/brave-core/pull/8054#issuecomment-791539362)
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="c4db2db0-7d28-4cc5-ac1b-16d31e69527d",algorithm="ed25519",headers="digest (request-target)",signature="STiAGJ/0W6g13xOC14qc2JoD9P/gP8lEOwvYcUMa6xyI2j8k5iD50CMPHvuUqVPCMVM8Vl7LE5a4Vld4i4m7Dg=="
> Header accept: application/json
[3724:4280:0311/072526.477:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Error (net::ERR_INTERNET_DISCONNECTED)
> HTTP Code: -1
> Body:
[3724:4280:0311/072526.481:INFO:bap_reporter_endpoint.cc(83)] Unexpected reponse code -1
[3724:4280:0311/072526.487:VERBOSE1:bap_reporter.cc(108)] BAP reporting failed - rescheduling in 2601 s
Test Case 7 - Promotions disabled after BAP successfully reported

(Referred the steps from brave/brave-core#8054 (comment))

[7804:7360:0311/080539.173:VERBOSE1:promotion.cc(122)] Fetch promotions disabled after BAP reporting
  • Confirmed no ad grant listed on brave://rewards, panel, or brave://rewards-internals Promotions tab.
Test Case 8 - Server returns 409, reporting does not retry

(Referred the steps from brave/brave-core#8054 (comment))

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="9157fd78-5ed4-4173-a635-93f108c54733",algorithm="ed25519",headers="digest (request-target)",signature="F4/j8f3TNsAJpgfhfTV2YEmEOEeJEYMh+8yB3SV9gqLNXj5WK+1s+jfNruU0i7FVnwXWjtKNyBBsnVna9XVfDg=="
> Header accept: application/json
[4816:5000:0311/081658.436:WARNING:CONSOLE(1)] "no tab id so cannot request shield data from window focus change!", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[4816:5000:0311/081659.771:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Failure
> HTTP Code: 409
> Body: {"message":"Error inserting bap report, paymentId already reported: unable to record BAP report","code":409}

[4816:5000:0311/081659.772:VERBOSE1:bap_reporter.cc(82)] BAP successsfully reported
Test Case 9 - Upgrade w/ single grant claimed

Upgraded profile from 1.21.74 to 1.21.76

Enabled Rewards in 1.21.74 and claimed UGP grants and upgraded profile to 1.21.76 and ensured BAP is successfully sent to the server (calls to /v1/promotions/report-bap)

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":30.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=Z/frhwyMcI3GeHys2lrUHmtSKj/pkTWttptg5TAw+6o=
> Header signature: keyId="d7e8d834-3988-44b5-a925-56f435908142",algorithm="ed25519",headers="digest (request-target)",signature="5XfZurOGCjvOnUmcZ87gKNvocPmrrd+rSbp3nuzPcDGgonK2765odkl8eJa1LKdUkaLZR+JwEvKguW5L7iIVCA=="

[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Success
> HTTP Code: 200
> Body: {"reportBapId":"0e1ecf24-6dab-41d7-aeca-de02bcef2fc9"}

[7996:1512:0311/084919.180:VERBOSE1:bap_reporter.cc(82)] BAP successsfully reported
Test Case 10 - Upgrade with more than one grant claimed
  • Install 1.21.74 and restore AD grants and claim AD grants only
    image
    image

  • Claim UGP grants also in 1.2.74 and ensured wallet balance is shown correctly (AD+UGP)
    image

  • Upgraded profile to 1.21.76 and ensured BAP is successfully sent to the server (calls to /v1/promotions/report-bap)

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Method: UrlMethod::POST
> Content: {"amount":53.0}
> Content Type: application/json; charset=utf-8
> Header digest: SHA-256=6rUw4FQ6xvCC3lJt7stUMS1gBdp+Y/Yb5GFu1vGG2vM=
> Header signature: keyId="064875e0-bd0c-4257-9ec1-f7e1c02d0283",algorithm="ed25519",headers="digest (request-target)",signature="j6FnWkaNO3563jVFrg5Q0C2nlC4G8SBbAMzl/9jbEWqLM+aiovowuDD3aNOFgn17hSskTzqY3xrD8wZ7zIfWDg=="
> Header accept: application/json
[4216:5424:0311/092324.054:WARNING:CONSOLE(1)] "no tab id so cannot request shield data from window focus change!", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[4216:5424:0311/092324.131:WARNING:CONSOLE(1)] "Could not find style data in module named null", source: chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js (1)
[4216:5424:0311/092325.157:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://api.rewards.bravesoftware.com/v1/parameters
> Result: Success
> HTTP Code: 200
> Body: {"batRate":0.8039083424836173,"autocontribute":{"choices":[5,10,15,20,25,50,100],"defaultChoice":20},"tips":{"defaultTipChoices":[1,10,100],"defaultMonthlyChoices":[1,10,100]}}

[4216:5424:0311/092325.159:VERBOSE1:api_parameters.cc(97)] Params timer set for 11654 s
[4216:5424:0311/092325.245:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnFetchCompleted ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions/report-bap
> Result: Success
> HTTP Code: 200
> Body: {"reportBapId":"8463fc52-aeeb-43b2-aa91-f5f17985a299"}

[4216:5424:0311/092325.246:VERBOSE1:bap_reporter.cc(82)] BAP successsfully reported

  • Sent payment id to Ben to confirm server received expected amount
select * from bap_report where wallet_id='064875e0-bd0c-4257-9ec1-f7e1c02d0283';
                  id                  |              wallet_id               |        amount         |          created_at           
--------------------------------------+--------------------------------------+-----------------------+-------------------------------
 8463fc52-aeeb-43b2-aa91-f5f17985a299 | 064875e0-bd0c-4257-9ec1-f7e1c02d0283 | 53.000000000000000000 | 2021-03-11 17:23:25.190171+00
(1 row)
Test Case 11 - Upgrade w/ 0 BAP balance
  • Installed 1.21.74 and enabled rewards without claiming UGP grants and upgraded the profile to 1.21.76 and ensured that BAP retry is scheduled due to zero balance
[5968:5500:0311/094129.372:VERBOSE1:bap_reporter.cc(95)] User has zero balance - rescheduling BAP reporting in 86400 s
Test Case 12 - recheck https://github.com//pull/7698

Scenario 1 - Non JP Region

Confirmed able to claim promotion
Confirmed no BAP popup on NTP
Confirmed no BAP alert on NTP when date is after 2021-03-06
Confirmed wallet balance is not showing 0 BAP on 2021-03-13

Claim Promotion NTP - no BAP popup NTP - no BAP alert Wallet balance is retained
image image image image

Scenario 2 - JP Region

Confirmed when BAP balance is 0, there is no popup/alert on NTP
Confirmed after claiming grant, balance is non-zero BAP
Confirmed when opening NTP, the BAP alert is displayed (note, no popup since alert starts showing March 6, and it is now after March 6)
Confirmed when date is 2021-03-13, balance shows 0.0 BAP

0 BAP balance non-zero BAP balance BAP alert is displayed on NTP Balance shows O BAP on 2021-03-13
image image image image

Confirmed BAP alert remains on NTP until it is acknowledged (clicking on OK or "x").
Confirmed clicking OK or x closes BAP alert.

Scenario 3 - Promotion fetching

JP Region - Confirmed on a clean profile, promotions not fetched when date is 2021-03-13

[9480:9576:0313/100438.766:VERBOSE1:promotion.cc(116)] Fetch promotions disabled for BAP migration

image

US Region - Confirmed on a clean profile, promotions are fetched when date is 2021-03-13

[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&platform=windows
> Method: UrlMethod::GET
[27376:5404:0313/234053.495:VERBOSE1:publisher_prefix_list_updater.cc(102)] Resetting publisher prefix list table
[27376:5404:0313/234053.497:VERBOSE1:database_publisher_prefix_list.cc(123)] Clearing publisher prefixes table
[27376:5404:0313/234053.597:VERBOSE1:database_publisher_prefix_list.cc(133)] Inserting 100000 records into publisher prefix table
[27376:5404:0313/234054.142:VERBOSE1:database_publisher_prefix_list.cc(133)] Inserting 100000 records into publisher prefix table
[27376:5404:0313/234054.292:VERBOSE6:logging_util.cc(136)]
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&platform=windows
> Result: Success
> HTTP Code: 200
> Body: {"promotions":[{"id":"f05568e6-f4a1-4438-8e81-cc0490fd14f7","createdAt":"2021-03-10T14:42:34.631225Z","expiresAt":"2021-07-10T14:42:34.631225Z","version":5,"suggestionsPerGrant":120,"approximateValue":"3

image

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/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Win64 QA/Yes release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants