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

Switch tip where possible to tip via code #4120

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Switch tip where possible to tip via code #4120

merged 1 commit into from
Dec 11, 2019

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Dec 3, 2019

Resolves brave/brave-browser#7184

Submitter Checklist:

Test Plan:

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.

@@ -72,14 +72,6 @@ chrome.braveRewards.onRecurringTipRemoved.addListener((success: boolean) => {
}
})

chrome.braveRewards.onPendingContributionSaved.addListener((result: number) => {
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 code was duplicated

@@ -1189,7 +1189,7 @@ void RewardsServiceImpl::SavePublisherInfo(
ledger::PublisherInfoCallback callback) {
base::PostTaskAndReplyWithResult(file_task_runner_.get(), FROM_HERE,
base::BindOnce(&SavePublisherInfoOnFileTaskRunner,
std::move(publisher_info),
publisher_info->Clone(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need to clone as we use same pointer in second bind

@NejcZdovc NejcZdovc force-pushed the tip-via-code branch 3 times, most recently from d4ca210 to bfd76ba Compare December 9, 2019 09:54
@NejcZdovc NejcZdovc marked this pull request as ready for review December 10, 2019 11:03
@NejcZdovc NejcZdovc requested a review from a team December 10, 2019 11:04
@NejcZdovc NejcZdovc added this to the 1.4.x - Nightly milestone Dec 10, 2019
Copy link
Collaborator

@tmancey tmancey left a comment

Choose a reason for hiding this comment

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

LGTM++

}

if (should_contribute) {
// Wait for reconciliation to complete
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: comment is not required as code is self-documented

@NejcZdovc
Copy link
Contributor Author

CI failed on test-install, not related to the PR

@NejcZdovc
Copy link
Contributor Author

CI failed on test-install, not related to this PR

@NejcZdovc NejcZdovc merged commit c6bb174 into master Dec 11, 2019
@NejcZdovc NejcZdovc deleted the tip-via-code branch December 11, 2019 05:36
@NejcZdovc NejcZdovc mentioned this pull request Dec 19, 2019
32 tasks
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.

Switch to TipViaCode when possible
2 participants