Skip to content

fix(ads): grant rewards only after rewarded ad success - #249

Open
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:codex/rewarded-ad-gate
Open

fix(ads): grant rewards only after rewarded ad success#249
evan188199-tech wants to merge 1 commit into
Snouzy:mainfrom
evan188199-tech:codex/rewarded-ad-gate

Conversation

@evan188199-tech

Copy link
Copy Markdown

Summary

  • Grant a rewarded-ad reward only after the SDK reports both successful status and reward.
  • Treat a missing/blocked SDK, failed callback, or 30-second timeout as an error.
  • Keep the dialog open on failure and offer retry; late success callbacks after a timeout cannot grant the reward.
  • Add a focused reducer test covering idle, loading, success, failure, blocked, timeout, late callbacks, and retry.

Closes #242

Notes

Premium entitlement, purchase, and subscription behavior is unchanged.

Tests

  • pnpm install --frozen-lockfile
  • pnpm test
  • pnpm exec tsc --noEmit
  • Targeted ESLint check
  • git diff --check

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Workoutcool Team Team on Vercel.

A member of the Team first needs to authorize it.

@evan188199-tech
evan188199-tech marked this pull request as ready for review August 19, 2026 13:40

Copy link
Copy Markdown
Author

@Snouzy Could you please approve the fork workflow run and take a look when you have a chance? The branch is rebased on the latest main, and local pnpm test, pnpm exec tsc --noEmit, targeted ESLint, and git diff --check all pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behavior question: RewardedAdGate grants the reward even when the ad fails to load / is blocked

1 participant