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

Shows only completed tips in tip list #5121

Merged
merged 1 commit into from
Apr 1, 2020
Merged

Shows only completed tips in tip list #5121

merged 1 commit into from
Apr 1, 2020

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Mar 31, 2020

Resolves brave/brave-browser#8945

Submitter Checklist:

Test Plan:

  • enable rewards
  • connect KYC uphold wallet
  • tip Khanacademy.org
  • make sure that tip is not shown in tips list
  • make sure that tip is shown in pending list

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@@ -572,7 +572,7 @@ void DatabaseContributionInfo::GetOneTimeTips(
"ON spi.publisher_key = pi.publisher_id "
"WHERE strftime('%%m', datetime(ci.created_at, 'unixepoch')) = ? AND "
"strftime('%%Y', datetime(ci.created_at, 'unixepoch')) = ? "
"AND ci.type = ?",
"AND ci.type = ? AND ci.step = ?",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this change fixes tip table display

@@ -1189,6 +1189,24 @@ void Contribution::OnExternalWalletServerPublisherInfo(
return;
}

if (info->status != ledger::PublisherStatus::VERIFIED) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this change fixes pending contribution not logged

@NejcZdovc NejcZdovc merged commit 27239b3 into master Apr 1, 2020
@NejcZdovc NejcZdovc deleted the tip-tabel branch April 1, 2020 13:19
@LaurenWags
Copy link
Member

Verified using

Brave 1.8.60 Chromium: 81.0.4044.83 (Official Build) nightly (64-bit)
Revision 5718ca617723806b9aacfb41108a0d911d1bde74-refs/branch-heads/4044@{#853}
OS macOS Version 10.14.6 (Build 18G3020)
  • Verified test plan on staging env (not production). Used ddg as connected publisher for test and 3zsistemi.si as KYC'd publisher.

  • Confirmed one time tip to connected publisher (DDG) goes to 'Pending Contributions' list and not to Tips panel. Confirmed wallet balance does not decrease.

  • Confirmed one time tip to KYC'd publisher (3zsistemi) is listed in Tips panel and is contributed. Confirmed wallet balance decreases. Confirmed tip displays on summary.

  • Confirmed recurring tip to connected publisher (DDG) goes to 'Pending Contributions' list. Confirmed wallet balance does not decrease.

  • Confirmed recurring tip to KYC'd publisher (3zsistemi) is contributed. Confirmed wallet balance decreases. Confirmed recurring tip displays on summary.

Screen Shot 2020-04-01 at 4 56 39 PM

Screen Shot 2020-04-01 at 5 05 41 PM

Screen Shot 2020-04-01 at 5 05 34 PM

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.

Do not show failed contributions in Tips section
3 participants