diff --git a/browser/extensions/api/brave_rewards_api.cc b/browser/extensions/api/brave_rewards_api.cc index 9ad93c75a201..7cd584e156fe 100644 --- a/browser/extensions/api/brave_rewards_api.cc +++ b/browser/extensions/api/brave_rewards_api.cc @@ -481,12 +481,26 @@ BraveRewardsSaveRecurringTipFunction::Run() { RewardsService* rewards_service_ = RewardsServiceFactory::GetForProfile(profile); - if (rewards_service_) { - rewards_service_->SaveRecurringTip(params->publisher_key, - params->new_amount); + if (!rewards_service_) { + return RespondNow(NoArguments()); } - return RespondNow(NoArguments()); + rewards_service_->SaveRecurringTipUI( + params->publisher_key, + params->new_amount, + base::Bind( + &BraveRewardsSaveRecurringTipFunction::OnSaveRecurringTip, + this)); + + return RespondLater(); +} + +void BraveRewardsSaveRecurringTipFunction::OnSaveRecurringTip(bool success) { + if (!success) { + Respond(Error("Failed to save")); + return; + } + Respond(NoArguments()); } BraveRewardsRemoveRecurringTipFunction:: diff --git a/browser/extensions/api/brave_rewards_api.h b/browser/extensions/api/brave_rewards_api.h index 526c6e27c903..5769d532dee2 100644 --- a/browser/extensions/api/brave_rewards_api.h +++ b/browser/extensions/api/brave_rewards_api.h @@ -215,6 +215,9 @@ class BraveRewardsSaveRecurringTipFunction : ~BraveRewardsSaveRecurringTipFunction() override; ResponseAction Run() override; + + private: + void OnSaveRecurringTip(bool success); }; class BraveRewardsRemoveRecurringTipFunction : diff --git a/components/brave_ads/browser/ads_service_impl_unittest.cc b/components/brave_ads/browser/ads_service_impl_unittest.cc index a809ecaa0540..19ac58740898 100644 --- a/components/brave_ads/browser/ads_service_impl_unittest.cc +++ b/components/brave_ads/browser/ads_service_impl_unittest.cc @@ -131,7 +131,10 @@ class MockRewardsService : public RewardsService { void(brave_rewards::GetRewardsInternalsInfoCallback)); MOCK_METHOD1(GetTransactionHistory, void(brave_rewards::GetTransactionHistoryCallback)); - MOCK_METHOD2(SaveRecurringTip, void(const std::string&, const int)); + MOCK_METHOD3(SaveRecurringTipUI, + void(const std::string&, + const int, + brave_rewards::SaveRecurringTipCallback)); MOCK_METHOD2(RefreshPublisher, void(const std::string&, brave_rewards::RefreshPublisherCallback)); MOCK_METHOD0(GetAllNotifications, diff --git a/components/brave_rewards/browser/rewards_service.h b/components/brave_rewards/browser/rewards_service.h index fda792f688d1..903f32541852 100644 --- a/components/brave_rewards/browser/rewards_service.h +++ b/components/brave_rewards/browser/rewards_service.h @@ -69,6 +69,7 @@ using GetTransactionHistoryCallback = base::OnceCallback; using GetRewardsInternalsInfoCallback = base::OnceCallback)>; +using SaveRecurringTipCallback = base::OnceCallback; using GetRecurringTipsCallback = base::OnceCallback)>; using GetOneTimeTipsCallback = base::OnceCallbackpublisher = publisher_key; + info->value = amount; + info->date = GetCurrentTimestamp(); + + bat_ledger_->SaveRecurringTip( + std::move(info), + base::BindOnce(&RewardsServiceImpl::OnSaveRecurringTipUI, + AsWeakPtr(), + std::move(callback))); +} + +void RewardsServiceImpl::OnRecurringTipSaved( + ledger::SaveRecurringTipCallback callback, + const bool success) { + if (!Connected()) { + return; + } + + callback(success ? ledger::Result::LEDGER_OK + : ledger::Result::LEDGER_ERROR); } void RewardsServiceImpl::SaveRecurringTip( - const std::string& publisher_key, const int amount) { - brave_rewards::RecurringDonation info; - info.publisher_key = publisher_key; - info.amount = amount; - info.added_date = GetCurrentTimestamp(); + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) { + if (!info) { + callback(ledger::Result::NOT_FOUND); + return; + } + + brave_rewards::RecurringDonation new_info; + new_info.publisher_key = info->publisher; + new_info.amount = info->value; + new_info.added_date = info->date; base::PostTaskAndReplyWithResult(file_task_runner_.get(), FROM_HERE, base::Bind(&SaveRecurringTipOnFileTaskRunner, - info, + new_info, publisher_info_backend_.get()), base::Bind(&RewardsServiceImpl::OnRecurringTipSaved, - AsWeakPtr())); + AsWeakPtr(), + callback)); } void RewardsServiceImpl::OnMediaInlineInfoSaved( diff --git a/components/brave_rewards/browser/rewards_service_impl.h b/components/brave_rewards/browser/rewards_service_impl.h index 40a0b57f80c4..ae6dc22e9f8e 100644 --- a/components/brave_rewards/browser/rewards_service_impl.h +++ b/components/brave_rewards/browser/rewards_service_impl.h @@ -210,8 +210,13 @@ class RewardsServiceImpl : public RewardsService, const std::string& publisher_key, RefreshPublisherCallback callback) override; - void SaveRecurringTip(const std::string& publisher_key, - const int amount) override; + void OnSaveRecurringTipUI( + SaveRecurringTipCallback callback, + const ledger::Result result); + void SaveRecurringTipUI( + const std::string& publisher_key, + const int amount, + SaveRecurringTipCallback callback) override; const RewardsNotificationService::RewardsNotificationsMap& GetAllNotifications() override; @@ -344,7 +349,9 @@ class RewardsServiceImpl : public RewardsService, ledger::PublisherInfoPtr publisher_info); void OnContributionInfoSaved(const ledger::REWARDS_CATEGORY category, bool success); - void OnRecurringTipSaved(bool success); + void OnRecurringTipSaved( + ledger::SaveRecurringTipCallback callback, + const bool success); void OnGetRecurringTips( const ledger::PublisherInfoListCallback callback, ledger::PublisherInfoList list); @@ -539,6 +546,9 @@ class RewardsServiceImpl : public RewardsService, const uint32_t date, const std::string& publisher_key, const ledger::REWARDS_CATEGORY category) override; + void SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) override; void GetRecurringTips( ledger::PublisherInfoListCallback callback) override; std::unique_ptr Log( diff --git a/components/services/bat_ledger/bat_ledger_client_mojo_proxy.cc b/components/services/bat_ledger/bat_ledger_client_mojo_proxy.cc index e7184b7e3e31..de44328b1b2c 100644 --- a/components/services/bat_ledger/bat_ledger_client_mojo_proxy.cc +++ b/components/services/bat_ledger/bat_ledger_client_mojo_proxy.cc @@ -429,6 +429,24 @@ void BatLedgerClientMojoProxy::FetchFavIcon(const std::string& url, base::BindOnce(&OnFetchFavIcon, std::move(callback))); } +void OnSaveRecurringTip(const ledger::SaveRecurringTipCallback& callback, + const ledger::Result result) { + callback(result); +} + +void BatLedgerClientMojoProxy::SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) { + if (!Connected()) { + callback(ledger::Result::LEDGER_ERROR); + return; + } + + bat_ledger_client_->SaveRecurringTip( + std::move(info), + base::BindOnce(&OnSaveRecurringTip, std::move(callback))); +} + void OnGetRecurringTips(const ledger::PublisherInfoListCallback& callback, ledger::PublisherInfoList publisher_info_list, uint32_t next_record) { diff --git a/components/services/bat_ledger/bat_ledger_client_mojo_proxy.h b/components/services/bat_ledger/bat_ledger_client_mojo_proxy.h index 47bb64818e26..885863b193a4 100644 --- a/components/services/bat_ledger/bat_ledger_client_mojo_proxy.h +++ b/components/services/bat_ledger/bat_ledger_client_mojo_proxy.h @@ -79,6 +79,9 @@ class BatLedgerClientMojoProxy : public ledger::LedgerClient, const uint32_t date, const std::string& publisher_key, const ledger::REWARDS_CATEGORY category) override; + void SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) override; void GetRecurringTips(ledger::PublisherInfoListCallback callback) override; void GetOneTimeTips(ledger::PublisherInfoListCallback callback) override; std::unique_ptr Log(const char* file, diff --git a/components/services/bat_ledger/bat_ledger_impl.cc b/components/services/bat_ledger/bat_ledger_impl.cc index ed054e99e367..6e0710cd4a8e 100644 --- a/components/services/bat_ledger/bat_ledger_impl.cc +++ b/components/services/bat_ledger/bat_ledger_impl.cc @@ -476,6 +476,27 @@ void BatLedgerImpl::GetRewardsInternalsInfo( std::bind(BatLedgerImpl::OnGetRewardsInternalsInfo, holder, _1)); } +// static +void BatLedgerImpl::OnSaveRecurringTip( + CallbackHolder* holder, + const ledger::Result result) { + if (holder->is_valid()) + std::move(holder->get()).Run(result); + + delete holder; +} + +void BatLedgerImpl::SaveRecurringTip( + ledger::ContributionInfoPtr info, + SaveRecurringTipCallback callback) { + // deleted in OnSaveRecurringTip + auto* holder = new CallbackHolder( + AsWeakPtr(), std::move(callback)); + + ledger_->SaveRecurringTip(std::move(info), std::bind( + BatLedgerImpl::OnSaveRecurringTip, holder, _1)); +} + // static void BatLedgerImpl::OnGetRecurringTips( CallbackHolder* holder, diff --git a/components/services/bat_ledger/bat_ledger_impl.h b/components/services/bat_ledger/bat_ledger_impl.h index 3459cc5a9595..fec6251b2b05 100644 --- a/components/services/bat_ledger/bat_ledger_impl.h +++ b/components/services/bat_ledger/bat_ledger_impl.h @@ -136,6 +136,9 @@ class BatLedgerImpl : public mojom::BatLedger, RefreshPublisherCallback callback) override; void StartMonthlyContribution() override; + void SaveRecurringTip( + ledger::ContributionInfoPtr info, + SaveRecurringTipCallback callback) override; void GetRecurringTips(GetRecurringTipsCallback callback) override; void GetOneTimeTips(GetOneTimeTipsCallback callback) override; @@ -254,6 +257,10 @@ class BatLedgerImpl : public mojom::BatLedger, CallbackHolder* holder, ledger::RewardsInternalsInfoPtr info); + static void OnSaveRecurringTip( + CallbackHolder* holder, + ledger::Result result); + static void OnGetRecurringTips( CallbackHolder* holder, ledger::PublisherInfoList list, diff --git a/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.cc b/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.cc index 51f17775d151..36aabd81fcda 100644 --- a/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.cc +++ b/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.cc @@ -360,6 +360,28 @@ void LedgerClientMojoProxy::FetchFavIcon(const std::string& url, std::bind(LedgerClientMojoProxy::OnFetchFavIcon, holder, _1, _2)); } +// static +void LedgerClientMojoProxy::OnSaveRecurringTip( + CallbackHolder* holder, + const ledger::Result result) { + if (holder->is_valid()) + std::move(holder->get()).Run(result); + delete holder; +} + +void LedgerClientMojoProxy::SaveRecurringTip( + ledger::ContributionInfoPtr info, + SaveRecurringTipCallback callback) { + // deleted in OnSaveRecurringTip + auto* holder = new CallbackHolder( + AsWeakPtr(), std::move(callback)); + ledger_client_->SaveRecurringTip( + std::move(info), + std::bind(LedgerClientMojoProxy::OnSaveRecurringTip, + holder, + _1)); +} + // static void LedgerClientMojoProxy::OnGetRecurringTips( CallbackHolder* holder, diff --git a/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.h b/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.h index a46692daf813..0ae780d5377f 100644 --- a/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.h +++ b/components/services/bat_ledger/public/cpp/ledger_client_mojo_proxy.h @@ -64,6 +64,9 @@ class LedgerClientMojoProxy : public mojom::BatLedgerClient, void FetchFavIcon(const std::string& url, const std::string& favicon_key, FetchFavIconCallback callback) override; + void SaveRecurringTip( + ledger::ContributionInfoPtr info, + SaveRecurringTipCallback callback) override; void GetRecurringTips(GetRecurringTipsCallback callback) override; void GetOneTimeTips(GetOneTimeTipsCallback callback) override; @@ -245,6 +248,10 @@ class LedgerClientMojoProxy : public mojom::BatLedgerClient, bool success, const std::string& favicon_url); + static void OnSaveRecurringTip( + CallbackHolder* holder, + const ledger::Result result); + static void OnGetRecurringTips( CallbackHolder* holder, ledger::PublisherInfoList publisher_info_list, diff --git a/components/services/bat_ledger/public/interfaces/bat_ledger.mojom b/components/services/bat_ledger/public/interfaces/bat_ledger.mojom index f1457f444804..3ee6738ad1be 100644 --- a/components/services/bat_ledger/public/interfaces/bat_ledger.mojom +++ b/components/services/bat_ledger/public/interfaces/bat_ledger.mojom @@ -110,6 +110,7 @@ interface BatLedger { GetTransactionHistory() => (string transactions); GetRewardsInternalsInfo() => (ledger.mojom.RewardsInternalsInfo info); + SaveRecurringTip(ledger.mojom.ContributionInfo info) => (ledger.mojom.Result result); GetRecurringTips() => (array list); GetOneTimeTips() => (array list); @@ -183,6 +184,7 @@ interface BatLedgerClient { uint64 window_id); FetchFavIcon(string url, string favicon_key) => (bool success, string favicon_url); + SaveRecurringTip(ledger.mojom.ContributionInfo info) => (ledger.mojom.Result result); GetRecurringTips() => ( array publisher_info_list, uint32 next_record); diff --git a/vendor/bat-native-confirmations/src/bat/confirmations/internal/confirmations_client_mock.h b/vendor/bat-native-confirmations/src/bat/confirmations/internal/confirmations_client_mock.h index 9aa690cd69d2..cbb99e0a9962 100644 --- a/vendor/bat-native-confirmations/src/bat/confirmations/internal/confirmations_client_mock.h +++ b/vendor/bat-native-confirmations/src/bat/confirmations/internal/confirmations_client_mock.h @@ -171,6 +171,10 @@ class MockConfirmationsClient : public ConfirmationsClient { const std::string& publisher_key, const ledger::REWARDS_CATEGORY category)); + MOCK_METHOD2(SaveRecurringTip, void( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback)); + MOCK_METHOD1(GetRecurringTips, void( ledger::PublisherInfoListCallback callback)); diff --git a/vendor/bat-native-ledger/include/bat/ledger/ledger.h b/vendor/bat-native-ledger/include/bat/ledger/ledger.h index 724d298fcf36..9041216aecb2 100644 --- a/vendor/bat-native-ledger/include/bat/ledger/ledger.h +++ b/vendor/bat-native-ledger/include/bat/ledger/ledger.h @@ -242,6 +242,9 @@ class LEDGER_EXPORT Ledger { virtual void GetRewardsInternalsInfo( ledger::RewardsInternalsInfoCallback callback) = 0; + virtual void SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) = 0; virtual void GetRecurringTips(ledger::PublisherInfoListCallback callback) = 0; virtual void GetOneTimeTips(ledger::PublisherInfoListCallback callback) = 0; diff --git a/vendor/bat-native-ledger/include/bat/ledger/ledger_client.h b/vendor/bat-native-ledger/include/bat/ledger/ledger_client.h index 6084199ba207..38034aa84ec1 100644 --- a/vendor/bat-native-ledger/include/bat/ledger/ledger_client.h +++ b/vendor/bat-native-ledger/include/bat/ledger/ledger_client.h @@ -77,6 +77,7 @@ using GetExternalWalletsCallback = using ShowNotificationCallback = std::function; using SavePendingContributionCallback = std::function; using DeleteActivityInfoCallback = std::function; +using SaveRecurringTipCallback = std::function; class LEDGER_EXPORT LedgerClient { public: @@ -161,6 +162,10 @@ class LEDGER_EXPORT LedgerClient { const std::string& publisher_key, const ledger::REWARDS_CATEGORY category) = 0; + virtual void SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) = 0; + virtual void GetRecurringTips( ledger::PublisherInfoListCallback callback) = 0; diff --git a/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc b/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc index b2e7d6dbdca7..34b8763aeb5b 100644 --- a/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc +++ b/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.cc @@ -887,6 +887,13 @@ void LedgerImpl::OnTimer(uint32_t timer_id) { bat_contribution_->OnTimer(timer_id); } +void LedgerImpl::SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) { + ledger_client_->SaveRecurringTip(std::move(info), + callback); +} + void LedgerImpl::GetRecurringTips( ledger::PublisherInfoListCallback callback) { ledger_client_->GetRecurringTips( diff --git a/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.h b/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.h index 051e3a3c88c3..ee7083b76fda 100644 --- a/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.h +++ b/vendor/bat-native-ledger/src/bat/ledger/internal/ledger_impl.h @@ -295,6 +295,10 @@ class LedgerImpl : public ledger::Ledger, const int year, const uint32_t date) override; + void SaveRecurringTip( + ledger::ContributionInfoPtr info, + ledger::SaveRecurringTipCallback callback) override; + void GetRecurringTips(ledger::PublisherInfoListCallback callback) override; void GetOneTimeTips(ledger::PublisherInfoListCallback callback) override; diff --git a/vendor/brave-ios/Ledger/BATBraveLedger.h b/vendor/brave-ios/Ledger/BATBraveLedger.h index 1c63e7cfd3d8..3d682420e89d 100644 --- a/vendor/brave-ios/Ledger/BATBraveLedger.h +++ b/vendor/brave-ios/Ledger/BATBraveLedger.h @@ -150,7 +150,8 @@ NS_SWIFT_NAME(BraveLedger) - (void)listRecurringTips:(void (NS_NOESCAPE ^)(NSArray *))completion; - (void)addRecurringTipToPublisherWithId:(NSString *)publisherId - amount:(double)amount NS_SWIFT_NAME(addRecurringTip(publisherId:amount:)); + amount:(double)amount + completion:(void (^)(BOOL success))completion NS_SWIFT_NAME(addRecurringTip(publisherId:amount:completion:)); - (void)removeRecurringTipForPublisherWithId:(NSString *)publisherId NS_SWIFT_NAME(removeRecurringTip(publisherId:)); diff --git a/vendor/brave-ios/Ledger/BATBraveLedger.mm b/vendor/brave-ios/Ledger/BATBraveLedger.mm index 8ff08c7d75c3..6667bd362940 100644 --- a/vendor/brave-ios/Ledger/BATBraveLedger.mm +++ b/vendor/brave-ios/Ledger/BATBraveLedger.mm @@ -453,21 +453,23 @@ - (void)listRecurringTips:(void (NS_NOESCAPE ^)(NSArray *))c }); } -- (void)addRecurringTipToPublisherWithId:(NSString *)publisherId amount:(double)amount -{ - [BATLedgerDatabase insertOrUpdateRecurringTipWithPublisherID:publisherId - amount:amount - dateAdded:[[NSDate date] timeIntervalSince1970] - completion:^(BOOL success) { - if (!success) { - return; - } - for (BATBraveLedgerObserver *observer in self.observers) { - if (observer.recurringTipAdded) { - observer.recurringTipAdded(publisherId); - } - } - }]; +- (void)addRecurringTipToPublisherWithId:(NSString *)publisherId amount:(double)amount completion:(void (^)(BOOL success))completion +{ + ledger::ContributionInfoPtr info = ledger::ContributionInfo::New(); + info->publisher = publisherId.UTF8String; + info->value = amount; + info->date = [[NSDate date] timeIntervalSince1970]; + ledger->SaveRecurringTip(std::move(info), ^(ledger::Result result){ + const auto success = (result == ledger::Result::LEDGER_OK); + if (success) { + for (BATBraveLedgerObserver *observer in self.observers) { + if (observer.recurringTipAdded) { + observer.recurringTipAdded(publisherId); + } + } + } + completion(success); + }); } - (void)removeRecurringTipForPublisherWithId:(NSString *)publisherId @@ -1379,6 +1381,20 @@ - (void)getOneTimeTips:(ledger::PublisherInfoListCallback)callback [self handlePublisherListing:publishers start:0 limit:0 callback:callback]; } +- (void)saveRecurringTip:(ledger::ContributionInfoPtr)info callback:(ledger::SaveRecurringTipCallback)callback +{ + [BATLedgerDatabase insertOrUpdateRecurringTipWithPublisherID:[NSString stringWithUTF8String:info->publisher.c_str()] + amount:info->value + dateAdded:info->date + completion:^(BOOL success) { + if (!success) { + callback(ledger::Result::LEDGER_ERROR); + return; + } + callback(ledger::Result::LEDGER_OK); + }]; +} + - (void)getRecurringTips:(ledger::PublisherInfoListCallback)callback { const auto publishers = [BATLedgerDatabase recurringTips]; diff --git a/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.h b/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.h index 1e4561d12b4c..fb277e7dc7f2 100644 --- a/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.h +++ b/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.h @@ -22,6 +22,7 @@ class NativeLedgerClient : public ledger::LedgerClient { void GetOneTimeTips(ledger::PublisherInfoListCallback callback) override; void GetPendingContributions(const ledger::PendingContributionInfoListCallback & callback) override; void GetPendingContributionsTotal(const ledger::PendingContributionsTotalCallback & callback) override; + void SaveRecurringTip(ledger::ContributionInfoPtr info, ledger::SaveRecurringTipCallback callback) override; void GetRecurringTips(ledger::PublisherInfoListCallback callback) override; void KillTimer(const uint32_t timer_id) override; void LoadActivityInfo(ledger::ActivityInfoFilterPtr filter, ledger::PublisherInfoCallback callback) override; diff --git a/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.mm b/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.mm index 7d03fdc9953f..69495b3c01d6 100644 --- a/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.mm +++ b/vendor/brave-ios/Ledger/Generated/NativeLedgerClient.mm @@ -32,6 +32,9 @@ void NativeLedgerClient::GetPendingContributionsTotal(const ledger::PendingContributionsTotalCallback & callback) { [bridge_ getPendingContributionsTotal:callback]; } +void NativeLedgerClient::SaveRecurringTip(ledger::ContributionInfoPtr info, ledger::SaveRecurringTipCallback callback) { + [bridge_ saveRecurringTip:std::move(info) callback:callback]; +} void NativeLedgerClient::GetRecurringTips(ledger::PublisherInfoListCallback callback) { [bridge_ getRecurringTips:callback]; } diff --git a/vendor/brave-ios/Ledger/Generated/NativeLedgerClientBridge.h b/vendor/brave-ios/Ledger/Generated/NativeLedgerClientBridge.h index 63fdfbdcad74..0e5734cde30f 100644 --- a/vendor/brave-ios/Ledger/Generated/NativeLedgerClientBridge.h +++ b/vendor/brave-ios/Ledger/Generated/NativeLedgerClientBridge.h @@ -15,6 +15,7 @@ - (void)getOneTimeTips:(ledger::PublisherInfoListCallback)callback; - (void)getPendingContributions:(const ledger::PendingContributionInfoListCallback &)callback; - (void)getPendingContributionsTotal:(const ledger::PendingContributionsTotalCallback &)callback; +- (void)saveRecurringTip:(ledger::ContributionInfoPtr)info callback:(ledger::SaveRecurringTipCallback)callback; - (void)getRecurringTips:(ledger::PublisherInfoListCallback)callback; - (void)killTimer:(const uint32_t)timer_id; - (void)loadActivityInfo:(ledger::ActivityInfoFilterPtr)filter callback:(ledger::PublisherInfoCallback)callback;