Commit 90322ac
chore(rewards): perps campaign remove margin stat (#29911)
## **Description**
Removes the margin requirement from the Perps Trading Campaign rewards
qualification UI to match the latest design. Qualification is now driven
solely by notional volume (≥ $25k); the `marginDeployed` field is
dropped from DTOs, cached state, controller cache read/write, locale
keys, and tests. On the stats screen PnL and Volume now share one row,
and the summary card replaces the margin StatCell with a spacer so
Volume stays left-aligned.
## **Changelog**
CHANGELOG entry: null
## **Screenshots/Recordings**
- Active campaign, have positions
<img width="305" height="176" alt="image"
src="https://github.com/user-attachments/assets/9738b8f3-9ef1-4c33-8a92-9b3a94e2e940"
/>
<img width="313" height="280" alt="image"
src="https://github.com/user-attachments/assets/7b151b6f-4b79-4be7-b9a4-24bf13cfc3a5"
/>
- Completed campaign, have positions
<img width="313" height="280" alt="image"
src="https://github.com/user-attachments/assets/c50271b7-6592-45b2-842f-45adb3155f02"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Medium risk because it removes the `marginDeployed` field from Perps
leaderboard position DTO/state and updates controller caching logic,
which could break consumers expecting that data or older cached shapes.
>
> **Overview**
> Updates the Perps Trading Campaign flow to **drop the margin-deployed
metric and requirement**, making qualification driven solely by notional
volume.
>
> This removes `marginDeployed` from the Perps leaderboard position DTO
and cached state, updates `RewardsController` cache read/write
accordingly, and simplifies the stats/summary UI to no longer render a
margin StatCell (using a spacer to preserve layout). Tests and locale
strings are updated to match the new three-stat display and revised
qualification semantics.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
855c01b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent e8c8963 commit 90322ac
28 files changed
Lines changed: 11 additions & 88 deletions
File tree
- app
- components/UI/Rewards
- Views
- components/Campaigns
- hooks
- core/Engine/controllers/rewards-controller
- services
- reducers/rewards
- locales/languages
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
| |||
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | 290 | | |
295 | 291 | | |
296 | 292 | | |
| |||
327 | 323 | | |
328 | 324 | | |
329 | 325 | | |
330 | | - | |
| 326 | + | |
331 | 327 | | |
332 | 328 | | |
333 | 329 | | |
| |||
346 | 342 | | |
347 | 343 | | |
348 | 344 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | 345 | | |
353 | 346 | | |
354 | 347 | | |
| |||
384 | 377 | | |
385 | 378 | | |
386 | 379 | | |
387 | | - | |
388 | 380 | | |
389 | 381 | | |
390 | 382 | | |
| |||
Lines changed: 5 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| |||
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 177 | + | |
184 | 178 | | |
185 | 179 | | |
186 | 180 | | |
187 | 181 | | |
188 | 182 | | |
189 | 183 | | |
190 | 184 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
200 | 189 | | |
201 | 190 | | |
202 | 191 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 89 | | |
94 | 90 | | |
95 | 91 | | |
| |||
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
126 | | - | |
| 122 | + | |
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
| |||
186 | 182 | | |
187 | 183 | | |
188 | 184 | | |
189 | | - | |
| 185 | + | |
190 | 186 | | |
191 | 187 | | |
192 | 188 | | |
| |||
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
200 | | - | |
201 | 196 | | |
202 | 197 | | |
203 | 198 | | |
| |||
219 | 214 | | |
220 | 215 | | |
221 | 216 | | |
222 | | - | |
223 | 217 | | |
224 | 218 | | |
225 | 219 | | |
| |||
236 | 230 | | |
237 | 231 | | |
238 | 232 | | |
239 | | - | |
240 | 233 | | |
241 | 234 | | |
242 | 235 | | |
| |||
Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
| |||
140 | 135 | | |
141 | 136 | | |
142 | 137 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 138 | + | |
148 | 139 | | |
149 | 140 | | |
150 | 141 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4603 | 4603 | | |
4604 | 4604 | | |
4605 | 4605 | | |
4606 | | - | |
4607 | 4606 | | |
4608 | 4607 | | |
4609 | 4608 | | |
| |||
4636 | 4635 | | |
4637 | 4636 | | |
4638 | 4637 | | |
4639 | | - | |
4640 | 4638 | | |
4641 | 4639 | | |
4642 | 4640 | | |
| |||
0 commit comments