fix(rewards): perps trading campaign dtos and ineligible state#30907
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. |
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 ee34616. Configure here.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30907 +/- ##
=======================================
Coverage 82.70% 82.71%
=======================================
Files 5561 5562 +1
Lines 143081 143114 +33
Branches 33051 33065 +14
=======================================
+ Hits 118336 118373 +37
+ Misses 16863 16855 -8
- Partials 7882 7886 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ba11e24 to
a32a028
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No existing E2E tests directly test the leaderboard/campaign stats views, so the risk of breaking existing tests is low. The changes are well-contained within the Perps rewards subsystem. Performance Test Selection: |
|
@sophieqgu heads-up: I rebased this branch off the latest |
|
Hey @sophieqgu 👋 — heads-up from the backend side on this one. Since #30907 migrates the perps-trading leaderboard client OFF the old field names and onto
These are purely additive/back-compat — no behavior change for new clients, which keep using Also FYI: |

Description
PerpsTradingCampaignLeaderboardDto,PerpsTradingCampaignLeaderboardEntryandPerpsTradingCampaignLeaderboardPositionDtoChangelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches rewards API mapping and broad campaign UI eligibility gating; behavior changes for users below volume threshold but no auth or payment paths.
Overview
Aligns the perps trading campaign with updated leaderboard API shapes and eligibility rules end to end.
Data layer: Leaderboard and position types/cache now use
volumeandeligibleinstead ofnotionalVolumeandqualified, addminVolumeForEligibilityandtotalParticipants, and allowrankto be null when the user has not met the volume threshold.UI behavior: Stats summary and leaderboard stats header show only when the user has finite, positive
volume(not merely a rank). Pending/qualify flows use APIminVolumeForEligibility(with a constant fallback) for the remaining volume message. Copy is updated from “Qualify for this rank” to “Qualify for the leaderboard” across locales.Tests: View and component tests cover zero/invalid volume, completed campaigns, and non-finite stat fallbacks.
Reviewed by Cursor Bugbot for commit a32a028. Bugbot is set up for automated code reviews on this repo. Configure here.