feat(ads): ad reward tracking support - #1890
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9991b36. Configure here.
| resolve:(RCTPromiseResolveBlock)resolve | ||
| reject:(RCTPromiseRejectBlock)reject) { | ||
| [RCCommonFunctionality pollRewardVerificationWithClientTransactionId:clientTransactionId | ||
| trackingMetadata:trackingMetadata |
There was a problem hiding this comment.
Missing NSNull mapping for metadata
Medium Severity
trackingMetadata is forwarded to RCCommonFunctionality without mappingNSNullToNil. That parameter is optional, and the TypeScript layer passes undefined when it is omitted, so the bridge can deliver NSNull instead of nil. Elsewhere in this file, nullable dictionaries and strings are mapped before reaching purchases-hybrid-common; without that, omitted metadata may be treated as a real dictionary or nested null fields like networkName / placement may remain as NSNull.
Reviewed by Cursor Bugbot for commit 9991b36. Configure here.



This change exposes the ad reward tracking functionality - which is just a new parameter for the polling function.
Do not merge until android and ios sdks are released with the feature.
Note
Medium Risk
Additive beta API on rewarded-ad verification with a native bridge contract that depends on matching iOS/Android SDK releases; existing single-argument call sites remain valid.
Overview
Adds an optional
RewardedAdTrackingMetadataargument toPurchases.pollRewardVerification, so callers can attach rewarded-ad context (mediator, format, unit id, impression id, etc.) and have the native SDK automatically track reward-verification events during the poll. Omitting the parameter keeps the existing poll-only behavior.The new type is exported from the public TS API, wired through Android and iOS bridges into hybrid
CommonKt/RCCommonFunctionality, and the web stub signature is updated to accept the extra argument. API testers cover the new overload.Reviewed by Cursor Bugbot for commit 9991b36. Bugbot is set up for automated code reviews on this repo. Configure here.