Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Rewards should now respect main enable and autocontribute toggles #87

Merged
merged 1 commit into from
Sep 7, 2018
Merged

Rewards should now respect main enable and autocontribute toggles #87

merged 1 commit into from
Sep 7, 2018

Conversation

jasonrsadler
Copy link
Contributor

@jasonrsadler jasonrsadler commented Sep 7, 2018

Resolves #58
Unblocks brave/brave-core#419

Updates for Rewards to not save visit data when rewards is off. Also does not add to autocontribute when autocontribute is off.

Copy link
Contributor

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

ledger_->GetPublisherInfo(filter,
std::bind(&BatPublishers::saveVisitInternal, this,
publisher_id, visit_data, duration, _1, _2));
if (ledger_->GetRewardsMainEnabled() && ledger_->GetAutoContribute()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we could just return if either of them are false, so that we don't have this big wrap @jasonrsadler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#94 puts this in separate function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants