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

Removes AddRecurringPayment as it's not used #2864

Merged
merged 1 commit into from
Jul 5, 2019
Merged

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jul 4, 2019

Resolves brave/brave-browser#5136

Submitter Checklist:

Test Plan:

make sure that CI passes

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.

tmancey
tmancey previously approved these changes Jul 4, 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

@NejcZdovc NejcZdovc added this to the 0.69.x - Nightly milestone Jul 4, 2019
emerick
emerick previously approved these changes Jul 4, 2019
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

Copy link
Collaborator

@kylehickinson kylehickinson left a comment

Choose a reason for hiding this comment

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

iOS looks good

@@ -132,9 +132,6 @@ NS_SWIFT_NAME(BraveLedger)

- (void)listRecurringTips:(void (^)(NSArray<BATPublisherInfo *> *))completion;

- (void)addRecurringTipToPublisherWithId:(NSString *)publisherId
Copy link
Collaborator

Choose a reason for hiding this comment

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

On second thought, please leave this here, we are going to use it anyways from UI to add recurring tip

@@ -488,11 +488,6 @@ - (void)listRecurringTips:(void (^)(NSArray<BATPublisherInfo *> *))completion
});
}

- (void)addRecurringTipToPublisherWithId:(NSString *)publisherId amount:(double)amount
{
ledger->AddRecurringPayment(std::string(publisherId.UTF8String), amount);
Copy link
Collaborator

@kylehickinson kylehickinson Jul 4, 2019

Choose a reason for hiding this comment

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

And instead of removing this entire method, we'll replace this call with:

  [BATLedgerDatabase insertOrUpdateRecurringTipWithPublisherID:publisherId
                                                        amount:amount
                                                     dateAdded:[[NSDate date] timeIntervalSince1970]
                                                    completion:nil];

Same way that rewards_service_impl handles this in SaveRecurringTip()

[Edit: timeIntervalSinceNowtimeIntervalSince1970]

@NejcZdovc NejcZdovc dismissed stale reviews from emerick and tmancey via d375390 July 4, 2019 15:42
Copy link
Collaborator

@kylehickinson kylehickinson left a comment

Choose a reason for hiding this comment

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

iOS lgtm

Copy link
Contributor

@jasonrsadler jasonrsadler left a comment

Choose a reason for hiding this comment

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

This line should've been removed. publisher_state loading fails with this here:

https://github.com/brave/brave-core/pull/2864/files#diff-8e22b475f70e7eca00ac43fcfb993885L642

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.

Remove AddRecurringPayment from ledger.h
5 participants