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

Fixes [ads] Toggle between Likes and Dislikes in 30-Day history is broken #25569

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Sep 15, 2024

Resolves brave/brave-browser#41032

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • 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 wiki
    • npm run presubmit wiki, 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:

@tmancey tmancey self-assigned this Sep 15, 2024
@tmancey tmancey requested a review from a team as a code owner September 15, 2024 06:44
Copy link
Collaborator

@aseren aseren left a comment

Choose a reason for hiding this comment

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

LGTM

@tmancey tmancey merged commit cf16fb5 into master Sep 16, 2024
17 checks passed
@tmancey tmancey deleted the issues/41032 branch September 16, 2024 13:40
@github-actions github-actions bot added this to the 1.72.x - Nightly milestone Sep 16, 2024
@btlechowski
Copy link

Verified with

Brave 1.72.51 Chromium: 129.0.6668.70 (Official Build) nightly (64-bit)
Revision 06fad82
OS Linux

Verified test plan from brave/brave-browser#41032

Like toggle

Verified Liked is toggled on

image

Verified the confirmation is sent:

[4278:4278:1001/161541.474481:VERBOSE1:redeem_reward_confirmation.cc(77)] Redeem reward confirmation
[4278:4278:1001/161541.477010:VERBOSE1:redeem_reward_confirmation.cc(92)] Create reward confirmation
[4278:4278:1001/161541.477282:VERBOSE6:redeem_reward_confirmation.cc(96)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/91753ba3-70b2-47f3-aaa8-b1877b2e5503/eyJzaWduYXR1cmUiOiJEWFBjODkxaGRyQ2FBRFJEMk5PckFHQnJhb28vWk9xZHhQek1iZ0ZYY1p2b2dSMCtsK1I4NVFSUDNVdHdlQTk2QlJDV0JjYTkvSXdlWFhKY0VqOTlWdz09IiwidCI6InNRL3VUZWVIOE9acnUvaVU1NnFrVWYwTGp0SFBpb09xaGpBYXlQQ2hQVTRxOG1OVEkyYXUrbUhZWE1qbDNwbU1UZ21JbFZkU1lEQzE4OHlzTlR6U0Z3PT0ifQ==
  Content: {"blindedPaymentTokens":["HrgtTbFWUTl1oGgQCsiCiDczl6/7gkb4q4KydzDZUyQ="],"buildChannel":"nightly","catalog":[{"id":"gYG3GjGjMvMjOBL8p19OfV47IziHWOGIm4SZFpNuxYA="}],"createdAtTimestamp":"2024-10-01T14:00:00.000Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd","platform":"linux","publicKey":"hLaC3RQw5++hx8zaT+47CA8r8cOlAm+ygeky/ci6T1s=","rotatingHash":"H6IB+xBjGSNmPQlfUAbCioPYh9neYkma/Oygn5T1Tto=","segment":"untargeted","studies":[],"systemTimestamp":"2024-10-01T14:00:00.000Z","transactionId":"91753ba3-70b2-47f3-aaa8-b1877b2e5503","type":"upvote","versionNumber":"129.0.6668.70"}
  Content Type: application/json
  Method: kPost
[4278:4278:1001/161541.477439:VERBOSE7:redeem_reward_confirmation.cc(97)]   Headers:
    accept: application/json
[4278:4278:1001/161541.697811:VERBOSE6:redeem_reward_confirmation.cc(110)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/91753ba3-70b2-47f3-aaa8-b1877b2e5503/eyJzaWduYXR1cmUiOiJEWFBjODkxaGRyQ2FBRFJEMk5PckFHQnJhb28vWk9xZHhQek1iZ0ZYY1p2b2dSMCtsK1I4NVFSUDNVdHdlQTk2QlJDV0JjYTkvSXdlWFhKY0VqOTlWdz09IiwidCI6InNRL3VUZWVIOE9acnUvaVU1NnFrVWYwTGp0SFBpb09xaGpBYXlQQ2hQVTRxOG1OVEkyYXUrbUhZWE1qbDNwbU1UZ21JbFZkU1lEQzE4OHlzTlR6U0Z3PT0ifQ==
  Response Status Code: 201
  Response: {"id":"91753ba3-70b2-47f3-aaa8-b1877b2e5503","payload":{},"type":"upvote","createdAt":"2024-10-01T14:15:43.677Z","modifiedAt":"2024-10-01T14:15:43.677Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd"}
[4278:4278:1001/161541.697928:VERBOSE7:redeem_reward_confirmation.cc(111)]   Headers:
    accept-ranges: bytes
    access-control-allow-credentials: true
    content-length: 213
    content-security-policy: sandbox
    content-type: application/json; charset=utf-8
    cross-origin-opener-policy: same-origin
    cross-origin-resource-policy: same-origin
    date: Tue, 01 Oct 2024 14:15:43 GMT
    referrer-policy: same-origin
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    vary: Origin
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-content-type-options: nosniff
    x-frame-options: DENY
    x-served-by: cache-hel1410031-HEL
[4278:4278:1001/161556.734252:VERBOSE1:redeem_reward_confirmation.cc(135)] Fetch payment token
[4278:4278:1001/161556.734409:VERBOSE6:redeem_reward_confirmation.cc(139)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/91753ba3-70b2-47f3-aaa8-b1877b2e5503/paymentToken
  Method: kGet
[4278:4278:1001/161556.734445:VERBOSE7:redeem_reward_confirmation.cc(140)]   Headers:

[4278:4278:1001/161556.935725:VERBOSE6:redeem_reward_confirmation.cc(153)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/91753ba3-70b2-47f3-aaa8-b1877b2e5503/paymentToken
  Response Status Code: 200
  Response: {"id":"91753ba3-70b2-47f3-aaa8-b1877b2e5503","type":"upvote","createdAt":"2024-10-01T14:15:43.677Z","modifiedAt":"2024-10-01T14:15:45.815Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd","paymentToken":{"publicKey":"WHqbHLUCki23/7ZteaVrSJShC0uwtzPn0cVoPrVZkxM=","batchProof":"wzQrp71kOdd0/CThEfbD2rgL2RE0zMlNxuPeNahFbgaII0u6jVxnjAGxg4PbrHY1aSt2eFuRHrgnOC2nL8slDQ==","signedTokens":["kuuge1yb1GnMEFR2hF5SmLq8QbnT9T9BkfuE4W0yiyY="]}}
[4278:4278:1001/161556.935753:VERBOSE7:redeem_reward_confirmation.cc(154)]   Headers:
    accept-ranges: bytes
    access-control-allow-credentials: true
    content-length: 444
    content-security-policy: sandbox
    content-type: application/json; charset=utf-8
    cross-origin-opener-policy: same-origin
    cross-origin-resource-policy: same-origin
    date: Tue, 01 Oct 2024 14:15:59 GMT
    referrer-policy: same-origin
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    vary: Origin, Accept-Encoding
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-content-type-options: nosniff
    x-frame-options: DENY
    x-served-by: cache-hel1410031-HEL
[4278:4278:1001/161556.956032:VERBOSE1:confirmations.cc(92)] Successfully processed kLikedAd confirmation for kNotificationAd with transaction id 91753ba3-70b2-47f3-aaa8-b1877b2e5503 and creative instance id c1e56640-0a4b-4196-ad44-7221ca29f4cd

Dislike toggle

Verified dislike is toggled on and like is toggled off

image

Verified the confirmation is sent:

[4278:4278:1001/161945.428232:VERBOSE1:redeem_reward_confirmation.cc(92)] Create reward confirmation
[4278:4278:1001/161945.428290:VERBOSE6:redeem_reward_confirmation.cc(96)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/70a246c8-2b6d-40b4-b087-f0902825cfa7/eyJzaWduYXR1cmUiOiJyNTVSaU56Q0lKdHFJajdBYVlvdXg1Sm5DdVNQd09zNUlTZDIvV1VhYk1LRVEvVVBFVEhyVDhja2VtbHF3VWFxa3hXUWkxbEEydGJvSzZJcTJqaWo2QT09IiwidCI6ImoxK0dDbno2S3Z1eUVJRFB3akh1clR6cEpSYUhvZmtjU0RJcDVBVzkvZlJzODkvZCtNa2puT2pGNCszaHprVnNWVGlDV0EwanNpZ3ZIdHlUTUdNQTZ3PT0ifQ==
  Content: {"blindedPaymentTokens":["DGUPsR3EPSxfZ+ULXY3bj2c+aRM68YemphuRp1JtYD8="],"buildChannel":"nightly","catalog":[{"id":"gYG3GjGjMvMjOBL8p19OfV47IziHWOGIm4SZFpNuxYA="}],"createdAtTimestamp":"2024-10-01T14:00:00.000Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd","platform":"linux","publicKey":"hLaC3RQw5++hx8zaT+47CA8r8cOlAm+ygeky/ci6T1s=","rotatingHash":"H6IB+xBjGSNmPQlfUAbCioPYh9neYkma/Oygn5T1Tto=","segment":"untargeted","studies":[],"systemTimestamp":"2024-10-01T14:00:00.000Z","transactionId":"70a246c8-2b6d-40b4-b087-f0902825cfa7","type":"downvote","versionNumber":"129.0.6668.70"}
  Content Type: application/json
  Method: kPost
[4278:4278:1001/161945.428311:VERBOSE7:redeem_reward_confirmation.cc(97)]   Headers:
    accept: application/json
[4278:4278:1001/161946.126398:VERBOSE6:redeem_reward_confirmation.cc(110)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/70a246c8-2b6d-40b4-b087-f0902825cfa7/eyJzaWduYXR1cmUiOiJyNTVSaU56Q0lKdHFJajdBYVlvdXg1Sm5DdVNQd09zNUlTZDIvV1VhYk1LRVEvVVBFVEhyVDhja2VtbHF3VWFxa3hXUWkxbEEydGJvSzZJcTJqaWo2QT09IiwidCI6ImoxK0dDbno2S3Z1eUVJRFB3akh1clR6cEpSYUhvZmtjU0RJcDVBVzkvZlJzODkvZCtNa2puT2pGNCszaHprVnNWVGlDV0EwanNpZ3ZIdHlUTUdNQTZ3PT0ifQ==
  Response Status Code: 201
  Response: {"id":"70a246c8-2b6d-40b4-b087-f0902825cfa7","payload":{},"type":"downvote","createdAt":"2024-10-01T14:19:47.988Z","modifiedAt":"2024-10-01T14:19:47.988Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd"}
[4278:4278:1001/161946.126448:VERBOSE7:redeem_reward_confirmation.cc(111)]   Headers:
    accept-ranges: bytes
    access-control-allow-credentials: true
    content-length: 215
    content-security-policy: sandbox
    content-type: application/json; charset=utf-8
    cross-origin-opener-policy: same-origin
    cross-origin-resource-policy: same-origin
    date: Tue, 01 Oct 2024 14:19:48 GMT
    referrer-policy: same-origin
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    vary: Origin
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-content-type-options: nosniff
    x-frame-options: DENY
    x-served-by: cache-hel1410031-HEL
[4278:4278:1001/161946.126479:VERBOSE1:redeem_reward_confirmation.cc(122)] Fetch payment token in 15 s
[4278:4278:1001/162001.202157:VERBOSE1:redeem_reward_confirmation.cc(135)] Fetch payment token
[4278:4278:1001/162001.202349:VERBOSE6:redeem_reward_confirmation.cc(139)] URL Request:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/70a246c8-2b6d-40b4-b087-f0902825cfa7/paymentToken
  Method: kGet
[4278:4278:1001/162001.202390:VERBOSE7:redeem_reward_confirmation.cc(140)]   Headers:

[4278:4278:1001/162001.413619:VERBOSE6:redeem_reward_confirmation.cc(153)] URL Response:
  URL: https://anonymous.ads.bravesoftware.com/v3/confirmation/70a246c8-2b6d-40b4-b087-f0902825cfa7/paymentToken
  Response Status Code: 200
  Response: {"id":"70a246c8-2b6d-40b4-b087-f0902825cfa7","type":"downvote","createdAt":"2024-10-01T14:19:47.988Z","modifiedAt":"2024-10-01T14:19:50.146Z","creativeInstanceId":"c1e56640-0a4b-4196-ad44-7221ca29f4cd","paymentToken":{"publicKey":"WHqbHLUCki23/7ZteaVrSJShC0uwtzPn0cVoPrVZkxM=","batchProof":"OICTiSZZPXP+4pSgLVdN7DULCb1rL5sNv1KRh8Ec6Qso7hUKZbnRA9Hv5ebhXobD8OY/qW/pry/EafAlFclzAQ==","signedTokens":["Kq8X/690qFzB3vBivZVILB067eVnYXu56M3TS6chnnQ="]}}
[4278:4278:1001/162001.414108:VERBOSE7:redeem_reward_confirmation.cc(154)]   Headers:
    accept-ranges: bytes
    access-control-allow-credentials: true
    content-length: 446
    content-security-policy: sandbox
    content-type: application/json; charset=utf-8
    cross-origin-opener-policy: same-origin
    cross-origin-resource-policy: same-origin
    date: Tue, 01 Oct 2024 14:20:03 GMT
    referrer-policy: same-origin
    strict-transport-security: max-age=31536000; includeSubDomains; preload
    vary: Origin, Accept-Encoding
    via: 1.1 varnish
    x-cache: MISS
    x-cache-hits: 0
    x-content-type-options: nosniff
    x-frame-options: DENY
    x-served-by: cache-hel1410031-HEL
[4278:4278:1001/162001.440513:VERBOSE1:confirmations.cc(92)] Successfully processed kDislikedAd confirmation for kNotificationAd with transaction id 70a246c8-2b6d-40b4-b087-f0902825cfa7 and creative instance id c1e56640-0a4b-4196-ad44-7221ca29f4cd

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.

[ads] Toggle between Likes and Dislikes in 30-Day history is broken
3 participants