feat(rewards): add Ondo campaign participant outcome support#29267
Conversation
Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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 6c8bc6a. Configure here.
- Add useOndoCampaignParticipantOutcome.test.ts (new file, 100% coverage) - Remove stale getOndoCampaignWinnerCode test blocks from RewardsController.test.ts and rewards-data-service.test.ts (method no longer exists) - Add branch-coverage tests to OndoCampaignStatsView and OndoCampaignWinningView (routeCampaignName fallback, null winningCode paths) - New code coverage: 100% (64/64 changed lines) Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
AI PR Analysis🚫 Merge safe: false | 🟠 Risk: high
AI analysis did not complete. Manual review recommended. |
| "a11y": "Open winner details" | ||
| }, | ||
| "participant_pending": { | ||
| "title": "Contest has ended.", |
| }, | ||
| "participant_pending": { | ||
| "title": "Contest has ended.", | ||
| "description": "We're determining the contest winners. Check back soon." |
There was a problem hiding this comment.
"We're determining the results. Check back soon."
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Why no E2E tags are needed:
The changes are well-contained within the rewards feature domain and are covered by unit tests (RewardsController.test.ts, rewards-data-service.test.ts, and component tests). Running E2E tests would not provide additional validation for these specific changes. Performance Test Selection: |
|




Description
Implement mechanics around Ondo GM participant outcome
Changelog
CHANGELOG entry: null
Screenshots/Recordings
Note that we're no longer showing the banners that were shown in this section when the competition was active. (i.e. qualified, not eligible, ...)
The bannner on the details page/stats page for these kind of users:
Note
Medium Risk
Introduces a new authenticated/cached API flow (
getOndoCampaignParticipantOutcome) and rewires winner navigation/banners across multiple Ondo screens, which could impact post-campaign UX and routing. Data contract changes (new DTO/status) and removed retry/error UI increase the chance of edge-case regressions if the endpoint returns unexpected/null values.Overview
Adds end-of-campaign participant outcome support for Ondo GM, replacing the old “winner code”/leaderboard-based winner detection.
The UI now fetches
useOndoCampaignParticipantOutcomewhen a campaign is complete and the user is opted in, shows new outcome banners (pending/finalized, winner vs non-winner), and auto-navigates to the winning screen only when the outcome ispendingand awinnerVerificationCodeexists. The winning screen now derives the code from the outcome, disables copy when absent, and redirects back to details if the user has no winner code.On the backend, replaces
getOndoCampaignWinnerCodewithgetOndoCampaignParticipantOutcomeend-to-end (controller action + data service endpoint/ondo-gm/:id/outcome/me), adds a new outcome DTO/status type, and caches non-null outcomes with a TTL.Reviewed by Cursor Bugbot for commit 81c6f9a. Bugbot is set up for automated code reviews on this repo. Configure here.