diff --git a/BraveRewards/BraveRewards.framework/BraveRewards b/BraveRewards/BraveRewards.framework/BraveRewards index 0ef718ffa80..6ef0c039bd3 100755 Binary files a/BraveRewards/BraveRewards.framework/BraveRewards and b/BraveRewards/BraveRewards.framework/BraveRewards differ diff --git a/BraveRewards/BraveRewards.framework/Headers/BATBraveAds.h b/BraveRewards/BraveRewards.framework/Headers/BATBraveAds.h index 4a21c64dead..89ae497963e 100644 --- a/BraveRewards/BraveRewards.framework/Headers/BATBraveAds.h +++ b/BraveRewards/BraveRewards.framework/Headers/BATBraveAds.h @@ -103,8 +103,9 @@ NS_SWIFT_NAME(BraveAds) #pragma mark - Reporting -/// Report that a page has loaded in the current browser tab, and the HTML is available for analysis -- (void)reportLoadedPageWithURL:(NSURL *)url html:(NSString *)html; +/// Report that a page has loaded in the current browser tab, and the inner text +/// within the page loaded for classification +- (void)reportLoadedPageWithURL:(NSURL *)url innerText:(NSString *)text; /// Report that media has started on a tab with a given id - (void)reportMediaStartedWithTabId:(NSInteger)tabId NS_SWIFT_NAME(reportMediaStarted(tabId:)); diff --git a/BraveRewards/BraveRewards.framework/Headers/BATBraveLedger.h b/BraveRewards/BraveRewards.framework/Headers/BATBraveLedger.h index 6f386c6eacf..1963a7cb50e 100644 --- a/BraveRewards/BraveRewards.framework/Headers/BATBraveLedger.h +++ b/BraveRewards/BraveRewards.framework/Headers/BATBraveLedger.h @@ -162,7 +162,7 @@ NS_SWIFT_NAME(BraveLedger) - (void)listOneTimeTips:(void (NS_NOESCAPE ^)(NSArray *))completion; - (void)tipPublisherDirectly:(BATPublisherInfo *)publisher - amount:(int)amount + amount:(double)amount currency:(NSString *)currency completion:(void (^)(BATResult result))completion; diff --git a/BraveRewards/BraveRewards.framework/Headers/BATBraveRewards.h b/BraveRewards/BraveRewards.framework/Headers/BATBraveRewards.h index 0fcb90de251..a782ce1fee3 100644 --- a/BraveRewards/BraveRewards.framework/Headers/BATBraveRewards.h +++ b/BraveRewards/BraveRewards.framework/Headers/BATBraveRewards.h @@ -93,14 +93,14 @@ NS_SWIFT_NAME(BraveRewards) isPrivate:(BOOL)isPrivate; /// Report that a page has loaded in the current browser tab, and the HTML is available for analysis /// -/// @note Send false for `shouldClassifyForAds` if the load happened due to tabs restoring +/// @note Send nil for `adsInnerText` if the load happened due to tabs restoring /// after app launch or if response header for the page load contains /// "cache-control: no-store" - (void)reportLoadedPageWithURL:(NSURL *)url faviconURL:(nullable NSURL *)faviconURL tabId:(UInt32)tabId html:(NSString *)html - shouldClassifyForAds:(BOOL)shouldClassify NS_SWIFT_NAME(reportLoadedPage(url:faviconUrl:tabId:html:shouldClassifyForAds:)); + adsInnerText:(nullable NSString *)adsInnerText NS_SWIFT_NAME(reportLoadedPage(url:faviconUrl:tabId:html:adsInnerText:)); /// Report any XHR load happening in the page - (void)reportXHRLoad:(NSURL *)url tabId:(UInt32)tabId diff --git a/BraveRewardsUI/README.md b/BraveRewardsUI/README.md index 883263bd872..8569218f59b 100644 --- a/BraveRewardsUI/README.md +++ b/BraveRewardsUI/README.md @@ -6,5 +6,5 @@ The latest BraveRewards.framework was built on: ``` brave-browser/c9404a71bb301d1303df1fcd2c24f7f614174fe9 -brave-core/888b808f99981e008bbac6c58123440eba64f230 +brave-core/be26e03107bebecb17e120f81998915d28129de2 ``` diff --git a/BraveRewardsUI/Tipping/TippingViewController.swift b/BraveRewardsUI/Tipping/TippingViewController.swift index 8298db89363..e3e3e94bf7e 100644 --- a/BraveRewardsUI/Tipping/TippingViewController.swift +++ b/BraveRewardsUI/Tipping/TippingViewController.swift @@ -175,7 +175,7 @@ class TippingViewController: UIViewController, UIViewControllerTransitioningDele // TODO: Handle started tip process } } else { - self.state.ledger.tipPublisherDirectly(self.publisherInfo, amount: Int32(amount), currency: "BAT") { _ in + self.state.ledger.tipPublisherDirectly(self.publisherInfo, amount: Double(amount), currency: "BAT") { _ in // TODO: Handle started tip process } } diff --git a/BraveShared/Extensions/StringExtensions.swift b/BraveShared/Extensions/StringExtensions.swift index 0823c43bd98..5001cad1e86 100644 --- a/BraveShared/Extensions/StringExtensions.swift +++ b/BraveShared/Extensions/StringExtensions.swift @@ -14,4 +14,18 @@ extension String { } return nil } + + /// Obtain a list of words in a given string + public var words: [String] { + var words: [String] = [] + enumerateSubstrings( + in: startIndex..