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

Disable pending contributions for external wallet mismatches #11514

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

zenparsing
Copy link
Collaborator

@zenparsing zenparsing commented Dec 8, 2021

Resolves brave/brave-browser#19996

This change temporarily disables pending tips for the "cross-custodial" wallet case, where the creator is verified with a different wallet provider from the user.

The work to reenable cross-provider pending tips will be tracked at brave/brave-browser#20090.

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:

  • Given that the user is verified with wallet provider A
  • When the user sends a one-time tip to a creator that is verified with provider B
  • Then the "pending tips" list should be empty.

The pending tips list can be viewed at brave://rewards by clicking the "See all" link in the rewards summary. If there are no pending tips, then this link will not be available.

Note that pending tips should still work when the creator is not verified.

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

@LaurenWags
Copy link
Member

LaurenWags commented Dec 15, 2021

Verified using

Brave | 1.35.33 Chromium: 97.0.4692.45 (Official Build) nightly (x86_64)
-- | --
Revision | 513579c4234d36379b32e422772546e885cef641-refs/branch-heads/4692@{#802}
OS | macOS Version 11.6.1 (Build 20G224)
Case 1 - Clean install 1.34.x, Uphold verified - PASSED
  • Verify with Uphold
  • Tip Gemini creator --> no tip to pending list
[23153:259:1215/143600.250527:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type uphold (amount: 5, type: ONE_TIME_TIP)
[23153:259:1215/143600.253073:VERBOSE1:contribution.cc(90)] Queue timer set for 5 s
[23153:259:1215/143600.253656:VERBOSE1:database_server_publisher_banner.cc(142)] Server publisher banner not found
[23153:259:1215/143600.253984:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
Gemini1 Gemini2 Gemini3
  • Tip bF creator --> no tip to pending
[23153:259:1215/143820.387807:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type uphold (amount: 5, type: ONE_TIME_TIP)
[23153:259:1215/143820.391217:VERBOSE1:contribution.cc(90)] Queue timer set for 1 s
[23153:259:1215/143820.391940:VERBOSE1:database_server_publisher_banner.cc(142)] Server publisher banner not found
[23153:259:1215/143820.392378:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
bF1 bF2 bF3
  • Tip unverified creator --> tip goes to pending
[23153:259:1215/144027.098173:VERBOSE1:contribution_tip.cc(59)] Saving pending publisher nike.com
Example Example Example Example
Unverified1 unverified2 unverified3 unverified4
Case 2 - Clean install 1.34.x, Gemini verified - PASSED
  • Verify with Gemini
  • Tip Uphold creator --> no tip to pending
[27494:259:1215/175954.633386:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type gemini (amount: 5, type: ONE_TIME_TIP)
[27494:259:1215/175954.636274:VERBOSE1:contribution.cc(90)] Queue timer set for 19 s
[27494:259:1215/175954.637521:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
1 2 3
  • Tip bF creator --> no tip to pending
[27494:259:1215/180457.428663:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type gemini (amount: 10.5, type: ONE_TIME_TIP)
[27494:259:1215/180457.432599:VERBOSE1:contribution.cc(90)] Queue timer set for 1 s
[27494:259:1215/180457.433437:VERBOSE1:database_server_publisher_banner.cc(142)] Server publisher banner not found
[27494:259:1215/180457.433922:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
4 5 6
  • Tip unverified creator --> tip goes to pending
[27494:259:1215/180106.470524:VERBOSE1:contribution_tip.cc(59)] Saving pending publisher nike.com
Example Example Example Example
7 8 9 10
Case 3 - Clean install 1.34.x, bF verified - PASSED
  • Verify with bF
  • Tip Uphold creator --> no tip to pending
[24632:259:1215/162100.017620:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type bitflyer (amount: 2, type: ONE_TIME_TIP)
[24632:259:1215/162100.020641:VERBOSE1:contribution.cc(90)] Queue timer set for 0 s
[24632:259:1215/162100.022091:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
Uphold1 Uphold2 Uphold3
  • Tip Gemini creator --> no tip to pending
[24632:259:1215/162248.759413:VERBOSE1:contribution.cc(361)] Creating contribution for wallet type bitflyer (amount: 5, type: ONE_TIME_TIP)
[24632:259:1215/162248.762169:VERBOSE1:contribution.cc(90)] Queue timer set for 0 s
[24632:259:1215/162248.762809:VERBOSE1:database_server_publisher_banner.cc(142)] Server publisher banner not found
[24632:259:1215/162248.763153:VERBOSE1:contribution_external_wallet.cc(155)] Publisher not verified
Example Example Example
Gemini1 Gemini2 Gemini3
  • Tip unverified creator --> tip goes to pending
[24632:259:1215/162430.953584:VERBOSE1:contribution_tip.cc(59)] Saving pending publisher nike.com
Example Example Example Example
Unverified1 unverified2 unverified3 unverified4
Case 4 - Upgrade from 1.33.x, Uphold verified - PASSED
  1. Install 1.33.x
  2. Verify w/ Uphold
  3. Tip unverified creator
  4. Tip Gemini and bF creators
  5. Go to a verified publisher and refresh status from the panel.
  6. Watch the logs as this will cause pending tips to attempt to process.
  7. Upgrade to Nightly w/ the fix
  8. Go to a verified publisher and refresh the status from the panel
  9. Confirm pending tip list is cleared of cross custodial tips, the unverified tip should remain in the list
1.33.x 1.33.x 1.35.x 1.35.x
1 33-1 1 33-2 1 35-1 1 35-2
Case 5 - Upgrade from 1.33.x, Gemini verified - PASSED
  1. Install 1.33.x
  2. Verify w/ Gemini
  3. Tip unverified creator
  4. Tip Uphold and bF creators
  5. Go to a verified publisher and refresh status from the panel.
  6. Watch the logs as this will cause pending tips to attempt to process.
  7. Upgrade to Nightly w/ the fix
  8. Go to a verified publisher and refresh the status from the panel
  9. Confirm pending tip list is cleared of cross custodial tips, the unverified tip should remain in the list
1.33.x 1.33.x 1.35.x 1.35.x
1 33 1 1 33 2 1 35 1 1 35 2
Case 6 - Upgrade from 1.33.x, bF verified - PASSED
  1. Install 1.33.x
  2. Verify w/ bF
  3. Tip unverified creator
  4. Tip Gemini and Uphold creators
  5. Go to a verified publisher and refresh status from the panel.
  6. Watch the logs as this will cause pending tips to attempt to process.
  7. Upgrade to Nightly w/ the fix
  8. Go to a verified publisher and refresh the status from the panel
  9. Confirm pending tip list is cleared of cross custodial tips, the unverified tip should remain in the list
1.33.x 1.33.x 1.35.x 1.35.x
1 33a 1 33b 1 35a 1 35b

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.

Pending tips processing can continue indefinitely for cross-provider tips
4 participants