feat(rewards): ondo campaign winner page#29158
Conversation
|
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. |
- Add useOndoCampaignWinnerCode hook (subscription-scoped, returns claim
code + loading state) replacing direct useSelector calls in the winning view
- Remove misleading prizeDisplay (currentUsdValue is portfolio value, not
a prize amount); winning view now shows: You won → rank → rate of return
- Fix mailto subject to include the claim code:
"Ondo campaign prize claim - {code}"
- useMaybeShowCampaignEndToast: winner path no longer dispatches
markCampaignEndToastShown so the campaignWon toast re-appears on every
app open (session-only dismissal); loser path unchanged (persisted)
- OndoCampaignDetailsView: add useFocusEffect auto-navigation to
OndoCampaignWinningView for winners on every campaign page session open
- Fix test mocks for OndoCampaignWinningView and useMaybeShowCampaignEndToast
to break transitive Engine import chains that prevented tests from running
Co-authored-by: VGR-GIT <vangulckrik@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
7f38e78 to
a6d2247
Compare
AI PR Analysis✅ Merge safe: true | 🟢 Risk: low
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: All changes are self-contained within the Rewards/Ondo campaign feature area. The RewardsController changes are purely additive (new method only, no modification of existing methods). The Routes.ts change adds a new constant without modifying existing ones. SmokeWalletPlatform is selected because the Rewards feature (Ondo campaigns, campaign stats, campaign details views) is part of the Trending/wallet platform area. The tag description explicitly covers Trending subsections and wallet platform features. No other tags are warranted:
No performance tests needed: Changes are additive UI features (new screen, new banner component) within the Rewards flow. No list rendering performance, no account/network selectors, no startup/initialization code affected. Performance Test Selection: |
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 470485c. Configure here.
|
|
✅ E2E Fixture Validation — Schema is up to date |




Context
Builds on top of #29017 (
feat(rewards): Add ondo campaign winning toast). Makes it so the scope of the piece of work for this & the targeting pr branch is only about the winning view that can be navigated to from a card/banner shown in stats section on details page OR on dedicated stats page.Changelog
CHANGELOG entry: null
Screenshots
Winning page, auto opened when qualified and user visits detail page. Skip for now or X at top right closes/navigates back to detail page.
Primary CTA opens mail and has the winning code in subject
Details page showing banner that you won; tapping it navigates back to winning page
Stats page also showing the winning banner. If user skips or taps the x at top right it closes/navigates back to stats page
If for some reason the position isn't available and not loading
If for some reason the position isn't available and we are loading it
If for some reason the winning code isn't available and we had an error fetching it
If for some reason the winning code isn't available and we're loading it
Note there's a animated border effect on the winning banner just like in the figma design. It loops in an interval.
Note
Medium Risk
Adds a new authenticated rewards endpoint and client auto-navigation to a new winner flow; issues could mis-route users or surface incorrect winner/claim state if winner detection or API handling is wrong.
Overview
Adds a new
RewardsOndoCampaignWinningflow for completed Ondo campaigns, including a dedicated winning screen that displays rank/return, fetches a per-user winner code, supports copy-to-clipboard, and launches a prefilledmailto:claim email (with retry/error/loading states).Updates Ondo campaign details and stats screens to detect top-5 qualified winners (
isOndoCampaignWinner), show a tappable animated winner banner, and auto-navigate to the winning screen once per session on screen focus; also threadscampaignNamethrough stats navigation and adds route fallback behavior whencampaignIdis missing. Backend wiring includes newRewardsController:getOndoCampaignWinnerCode+ data-service endpoint (/ondo-gm/:campaignId/winner-code/me) and supporting tests/i18n/assets.Reviewed by Cursor Bugbot for commit 470485c. Bugbot is set up for automated code reviews on this repo. Configure here.