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

Refactor unblinded tokens #10087

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Refactor unblinded tokens #10087

merged 1 commit into from
Dec 6, 2021

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Sep 14, 2021

Resolves brave/brave-browser#16005

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:

  • Confirm tokens are refilled after successfully fetching issuers from GET /v1/issuers
  • Confirm tokens are refilled after successfully redeeming a token
  • Confirm tokens are refilled after failing to redeem a token redeeming a token
  • Confirm users are rewarded for viewing ads
  • Confirm tokens are cashed-out
  • Confirm creativeType (i.e. ad_notification, new_tab_page_ad, inline_content_ad or promoted_content_ad) is not included in the payload when tokens are cashed-out
  • Confirm issuers are rejected if any payment issuer has more than two public keys with the same value
  • Confirm issuers are rejected if the payment issuer is missing from GET /v1/issuers/ endpoint
  • Confirm issuers are rejected if issuers have not changed since the last update
  • Confirm issuers are fetched from GET /v1/issuers/ endpoint on browser launch
  • Confirm issuers are fetched when ads are enabled
  • Confirm issuers are not fetched when updating the catalog
  • Confirm issuers are fetched every x milliseconds (see ping in GET /v1/issuers/ response)
  • Confirm "like" button (thumbs up) on 30-day ads history sends an upvote confirmation to the server
  • Confirm "dislike" button (thumbs down) on 30-day ads history sends a downvote confirmation to the server
  • Confirm "save" button on 30-day ads history sends a saved confirmation to the server
  • Confirm "mark as inappropriate" button on 30-day ads history sends a flag confirmation to the server
  • Confirm clicking an ad sends a click confirmation to the server
  • Confirm converting an ad sends a conversion confirmation to the server
  • Confirm landing an ad (transferred) sends landed a confirmation to the server
  • Confirm unblinded_payment_tokens node in confirmations.json is migrated to include ad_type (empty string), confirmation_type (empty string) and transaction_id (random v4 UUID)
  • Confirm viewed ads are shown within 30-day ads history
  • Confirm issuers are persisted in confirmations.json
  • Confirm unblinded_payment_tokens node in confirmations.json has ad_type, confirmation_type and transaction_id for new entries
  • Confirm catalog is downloaded from GET /v9/catalog endpoint

NOTE: Failed to get issuers will be shown after upgrading because the issuers node will only be created after successfully downloading issuers from GET /v1/issuers/ for the first time. See the spec for more detail

@tmancey tmancey self-assigned this Sep 14, 2021
@tmancey tmancey force-pushed the issues/16005 branch 22 times, most recently from 830adf7 to 909a0d9 Compare September 21, 2021 20:35
@tmancey tmancey force-pushed the issues/16005 branch 2 times, most recently from f1ed9db to 2f3d3f3 Compare September 24, 2021 21:50
@tmancey tmancey marked this pull request as ready for review September 24, 2021 21:51
@tmancey tmancey requested a review from a team as a code owner September 24, 2021 21:51
@tmancey tmancey force-pushed the issues/16005 branch 7 times, most recently from 6bbd482 to c484f9a Compare November 19, 2021 20:56
@tmancey
Copy link
Collaborator Author

tmancey commented Nov 25, 2021

CI failing due to unrelated reasons (Storybook)

@tmancey tmancey force-pushed the issues/16005 branch 12 times, most recently from 06b6457 to a3dfd0b Compare December 2, 2021 21:27
@tmancey tmancey force-pushed the issues/16005 branch 3 times, most recently from 835ad39 to d876177 Compare December 3, 2021 21:26
@tmancey
Copy link
Collaborator Author

tmancey commented Dec 6, 2021

CI failed during the upload of binary. Unrelated

@tmancey tmancey merged commit 0cb5c0c into master Dec 6, 2021
@tmancey tmancey deleted the issues/16005 branch December 6, 2021 15:55
@tmancey tmancey added this to the 1.35.x - Nightly milestone Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor unblinded tokens
5 participants