chore(rewards): stats page#28734
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. |
…tures CampaignLeaderboardState was missing minDeposit in its tier entries, causing a type mismatch with CampaignLeaderboardDto in RewardsController cache reads. Updated all test fixtures to include minDeposit and campaignId as required. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Gate tierMinDeposit on isCampaignActive in OndoCampaignStatsView to match OndoCampaignDetailsView, preventing the "You're qualified" card from rendering after a campaign has ended. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…string Update regex patterns from "ET" to "EST" to match the actual text rendered by the component. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…board return Market value comes from portfolioSummary.totalCurrentValue — a different data source from leaderboardPosition.rateOfReturn. When leaderboardPosition was null, rateOfReturn defaulted to 0 which forced market value into success-green even if the actual portfolio was down. Co-authored-by: VGR-GIT <vangulckrik@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
| /> | ||
| <Box twClassName="flex-1" /> | ||
| </Box> | ||
| )} |
There was a problem hiding this comment.
Market value color uses wrong data source
Medium Severity
In OndoCampaignStatsView, the market value's color is determined by isNegativeReturn, which is derived from leaderboardPosition.rateOfReturn. However, the market value itself comes from portfolioData.summary.totalCurrentValue. The sibling component CampaignStatsSummary correctly derives market value color from portfolioSummary.portfolioPnl instead. These are different data sources that can disagree — e.g., portfolio PnL could be positive while leaderboard rate of return is negative — leading to an inconsistent color for the market value cell.
Reviewed by Cursor Bugbot for commit 5fbe21d. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ 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 a7be45e. Configure here.
| })); | ||
|
|
||
| jest.mock('../utils/formatUtils', () => ({ | ||
| formatPercentChange: (value: number) => `${(value * 100).toFixed(2)}%`, |
There was a problem hiding this comment.
Test mock omits sign prefix from formatPercentChange
Low Severity
The formatPercentChange mock returns values without a + prefix for positive numbers (e.g., 15.00%), while the real implementation returns +15.00%. This means tests asserting getByText('15.00%') pass against the mock but would fail against the real function, masking potential rendering issues.
Reviewed by Cursor Bugbot for commit a7be45e. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key findings:
SmokeWalletPlatform is selected because:
No other tags are warranted as the changes are isolated to the Rewards/Ondo campaign feature area and don't touch confirmations, accounts, identity, networks, trade, or other feature areas. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
New: Campaign Stats Screen
A dedicated screen showing the user's personal performance in the campaign — their current return (positive in green, negative in red), total portfolio value, rank, tier (Bronze, Silver, Platinum), net deposit amount, days held, and whether they're Qualified or Pending.
New: Tier-based Leaderboard
The leaderboard now lets users filter by tier (Bronze, Silver, Platinum). Each entry shows rank, referral code, and return percentage. Users see their own position highlighted, plus a count of total participants in that tier.
New: "Qualify for this rank" & "You're qualified" cards
New: After-Hours Trading popup
When a user tries to swap an asset outside market hours, a popup appears explaining that trading is closed, shows a countdown to when markets reopen, and warns about wider price spreads.
New: Eligibility warning popup
If there aren't enough days left in the campaign to meet the holding requirement, a warning popup tells the user their new position won't count toward the campaign, with options to cancel or proceed anyway.
New: "Entries closed" state
If the campaign has ended and the user never opted in, the join button is locked and shows "Entries closed." Tapping it shows a message explaining they missed the opt-in window.
Updated: Portfolio section
Now shows each deposited asset with its current value, shares owned, and profit/loss percentage. Users can tap a position to swap it for a different asset, or tap a link to view their full activity history.
Updated: Prize pool display
Shows the current prize pool size and how much additional volume is needed to unlock the next reward tier.
Changelog
CHANGELOG entry: ondo campaign rewards - stats page
Screenshots/Recordings
Active Campaign
Opted in
Negative return but qualified
Positive return but pending
Leaderboard top 5 (in others its 18th position)
Prize pool variants
Leaderboard page (positive return pending)
Stats page positive but pending
Stats page positive & qualified
Stats page but negative return and cashed out
Open position or swap position but outside of market hours
Open position but can't qualify for tier treshold anymore
Note
Medium Risk
Adds new rewards navigation routes, screens, and bottom sheets with updated Ondo campaign eligibility/pending logic and new
minDepositdata plumbing; mistakes could impact campaign UX and leaderboard/stats rendering but do not touch security-critical flows.Overview
Introduces a dedicated Ondo campaign Stats screen (
RewardsOndoCampaignStats) and wires it into the rewards navigator, including navigation from the campaign details stats header.Adds new bottom sheets for Pending (
RewardsOndoPendingSheet), After-hours trading (OndoAfterHoursSheet), and Not eligible (OndoNotEligibleSheet), and updates campaign details/portfolio/CTA flows to gate swaps/position actions when the user can no longer meet theONDO_GM_REQUIRED_QUALIFIED_DAYSrequirement.Extends Ondo leaderboard tier data with
minDepositand updatesOndoLeaderboard/CampaignStatsSummaryto show qualify messaging, open the pending sheet from pending tags/cards, unify stats error handling, and tweak prize pool/max-tier copy and various UI text/icon styles (including ET→EST strings).Reviewed by Cursor Bugbot for commit a7be45e. Bugbot is set up for automated code reviews on this repo. Configure here.