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

Remove Rewards JP-related restrictions for Android #8775

Merged
merged 2 commits into from
May 13, 2021

Conversation

zenparsing
Copy link
Collaborator

@zenparsing zenparsing commented May 11, 2021

Resolves brave/brave-browser#15786 & brave/brave-browser#15512

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

This change only affects Android.

With this change, all rewards blocks related to the BAP transition for Android JP users should be removed. Specifically:

  • Users should be able to fetch and claim promotions.
  • Users should be able to see their BAT balance.
  • Users should be able to tip.
  • Users should be able to set monthly contributions.
  • Users should be able to AC.

Additionally:

  • "BAP" and "points" strings should no longer appear. The user should see "BAT" and "tokens" instead.
  • The "verify wallet" button should not appear, and it should not be possible for the user to connect their wallet to any external wallet service provider.

@zenparsing zenparsing marked this pull request as ready for review May 12, 2021 21:08
@zenparsing zenparsing requested a review from a team as a code owner May 12, 2021 21:08
@zenparsing zenparsing requested review from jumde and deeppandya May 12, 2021 21:08
@zenparsing zenparsing force-pushed the ksmith-rewards-android branch from e5573fd to afe02f4 Compare May 12, 2021 21:08
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zenparsing
Copy link
Collaborator Author

CI

  • post-init failed on audit-deps (unrelated)
  • linux failed on BraveAdsBrowserTest/BraveAdsUpgradeBrowserTest (unrelated)

Copy link
Contributor

@deeppandya deeppandya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zenparsing zenparsing merged commit e67256c into master May 13, 2021
@zenparsing zenparsing deleted the ksmith-rewards-android branch May 13, 2021 16:22
@zenparsing zenparsing added this to the 1.26.x - Nightly milestone May 13, 2021
brave-builds pushed a commit that referenced this pull request May 13, 2021
@srirambv
Copy link
Contributor

Verification passed on OnePlus 6T with Android 10 running 1.26.21 x64 Nightly build

Verified test plan from PR
  • Verified grants is shown for JP locale
  • Verified able to claim grants
  • Verified wallet updates with UGP grant
  • Verified no mention of BAP Tokens or BAP on rewards panel/onboarding/rewards page/rewards internals page
  • Verified able to perform an one-time tip
  • Verified able to set a recurring tip
  • Verified able to perform a contribution
  • Verified no entry for Verify wallet on BR Panel
image image image image
image image image image
image image image image
image image image image

Logs

2021-05-18 01:10:49.350 21341-21341/? V/chromium: [VERBOSE5:ledger_impl.cc(145)] 
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v2/attestations/safetynet
    > Method: POST
    > Content: {"paymentIds":["3ecd111e-b091-440d-9c40-aa6043dd08b1"]}
    > Content Type: application/json; charset=utf-8
2021-05-18 01:10:50.349 21341-21341/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v2/attestations/safetynet
    > Result: Success
    > HTTP Code: 200
    > Body: {"nonce":"bd331916-64f6-41cd-864e-b0054a119e5c"}
2021-05-18 01:10:52.148 21341-21341/? V/chromium: [VERBOSE5:ledger_impl.cc(145)] 
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v2/attestations/safetynet/bd331916-64f6-41cd-864e-b0054a119e5c
    > Method: PUT
    > Content: {"token":"
2021-05-18 01:10:52.499 21341-21341/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v2/attestations/safetynet/bd331916-64f6-41cd-864e-b0054a119e5c
    > Result: Success
    > HTTP Code: 200
    > Body: 
2021-05-18 01:10:52.528 21341-21341/? V/chromium: [VERBOSE1:database_creds_batch.cc(131)] Record size is not correct: 0
2021-05-18 01:10:52.615 21341-21341/? V/chromium: [VERBOSE5:ledger_impl.cc(145)] 
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828
    > Method: POST
    > Content: {
2021-05-18 01:10:53.620 21341-21341/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828
    > Result: Success
    > HTTP Code: 200
    > Body: {"claimId":"72fa930c-b24a-4e8d-9025-92d4e88cf3bc"}
2021-05-18 01:10:53.645 21341-21341/? V/chromium: [VERBOSE5:ledger_impl.cc(145)] 
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828/claims/72fa930c-b24a-4e8d-9025-92d4e88cf3bc
    > Method: GET
2021-05-18 01:10:53.907 21341-21341/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828/claims/72fa930c-b24a-4e8d-9025-92d4e88cf3bc
    > Result: Success
    > HTTP Code: 202
    > Body: {"message":"Claim has been accepted but is not ready","code":202,"data":{}}
2021-05-18 01:10:53.911 21341-21341/? V/chromium: [VERBOSE1:promotion.cc(452)] Promotion completed with result LEDGER_OK
2021-05-18 01:10:58.914 21341-21341/? V/chromium: [VERBOSE5:ledger_impl.cc(145)] 
    [ REQUEST ]
    > URL: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828/claims/72fa930c-b24a-4e8d-9025-92d4e88cf3bc
    > Method: GET
2021-05-18 01:10:59.255 21341-21341/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v1/promotions/962abffd-4952-40cd-b90d-05868e233828/claims/72fa930c-b24a-4e8d-9025-92d4e88cf3bc
    > Result: Success
    > HTTP Code: 200
    > Body: {2021-06-17 01:20:59.381 27086-27086/? V/chromium: [VERBOSE6:logging_util.cc(136)] 
    [ RESPONSE - OnRequest ]
    > Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=3ecd111e-b091-440d-9c40-aa6043dd08b1&platform=android
    > Result: Success
    > HTTP Code: 200
    > Body: {"promotions":[]}

@kjozwiak
Copy link
Member

Added brave/brave-browser#15512 to the resolved list as this was a release/blocker and opened within the milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove JP-related rewards blocks for Android
5 participants