Commit a8d18ab
feat: Ondo campaign activity view (#28360)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
Add Ondo campaign activity view, align existing components more closely
with design
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: my feature name
Scenario: user [verb for user action]
Given [describe expected initial app state]
When user [verb for user action]
Then [describe expected outcome]
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 08 55"
src="https://github.com/user-attachments/assets/6476ce48-2b7b-471e-adb0-7f3aee68aa39"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 09 00"
src="https://github.com/user-attachments/assets/87d6f68b-0e6b-4a99-b6d8-6b12558f31ea"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 19 46"
src="https://github.com/user-attachments/assets/36c12855-e879-4493-aebf-c5e37b68e630"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 19 51"
src="https://github.com/user-attachments/assets/ff0026cf-115f-4690-be3e-6402fa368e9d"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 09 07"
src="https://github.com/user-attachments/assets/ddd830b8-e045-4ba2-b9be-940e8bff7954"
/>
<img width="1179" height="2556" alt="Simulator Screenshot - E2E Test -
2026-04-06 at 15 09 12"
src="https://github.com/user-attachments/assets/27f7e195-e693-475d-b5b9-f4a634defd94"
/>
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Adds a new rewards activity fetching/caching path (controller + data
service + Redux) and a new navigation destination, which can impact data
freshness and UI state if pagination/caching edge cases are missed.
>
> **Overview**
> Adds a new `OndoCampaignPortfolioView` (reachable from campaign
details) that shows the user’s Ondo GM portfolio plus a paginated
activity feed with pull-to-refresh, loading/empty/error states.
>
> Updates the Ondo campaign details bottom action to a unified
`CampaignCTA` with multiple states (join, entries-closed disabled w/
toast, open position, swap assets) and adjusts section gating/UX to
align with the new portfolio navigation.
>
> Introduces a new rewards controller/data-service API for
`getOndoCampaignActivity` (including 1-minute first-page caching +
last-updated change detection), wires it through a new
`useGetOndoCampaignActivity` hook and `ondoCampaignActivity` Redux
storage, and refactors shared formatting helpers into
`utils/formatUtils` (percent/timestamp/CAIP parsing) used by
leaderboard/portfolio/activity components.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9bec37b. 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: VGR <VanGulckRik@gmail.com>1 parent e259aee commit a8d18ab
44 files changed
Lines changed: 3370 additions & 670 deletions
File tree
- app
- components/UI/Rewards
- Views
- components
- Campaigns
- Onboarding/__tests__
- hooks
- utils
- core/Engine
- controllers/rewards-controller
- services
- messengers/rewards-controller-messenger
- images/rewards
- reducers/rewards
- util
- logs/__snapshots__
- test
- locales/languages
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| |||
Lines changed: 55 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
181 | 193 | | |
182 | 194 | | |
183 | 195 | | |
| |||
257 | 269 | | |
258 | 270 | | |
259 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
260 | 277 | | |
261 | 278 | | |
262 | 279 | | |
| |||
539 | 556 | | |
540 | 557 | | |
541 | 558 | | |
542 | | - | |
| 559 | + | |
543 | 560 | | |
544 | 561 | | |
545 | 562 | | |
| |||
554 | 571 | | |
555 | 572 | | |
556 | 573 | | |
557 | | - | |
| 574 | + | |
558 | 575 | | |
559 | 576 | | |
560 | | - | |
| 577 | + | |
561 | 578 | | |
562 | 579 | | |
563 | 580 | | |
| |||
568 | 585 | | |
569 | 586 | | |
570 | 587 | | |
571 | | - | |
572 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
573 | 614 | | |
574 | 615 | | |
575 | 616 | | |
| |||
584 | 625 | | |
585 | 626 | | |
586 | 627 | | |
587 | | - | |
| 628 | + | |
588 | 629 | | |
589 | 630 | | |
590 | 631 | | |
591 | 632 | | |
592 | | - | |
| 633 | + | |
593 | 634 | | |
594 | 635 | | |
595 | 636 | | |
| |||
598 | 639 | | |
599 | 640 | | |
600 | 641 | | |
601 | | - | |
| 642 | + | |
602 | 643 | | |
603 | 644 | | |
604 | 645 | | |
| |||
621 | 662 | | |
622 | 663 | | |
623 | 664 | | |
624 | | - | |
| 665 | + | |
625 | 666 | | |
626 | 667 | | |
627 | 668 | | |
| |||
633 | 674 | | |
634 | 675 | | |
635 | 676 | | |
636 | | - | |
637 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
638 | 680 | | |
639 | 681 | | |
640 | 682 | | |
| |||
653 | 695 | | |
654 | 696 | | |
655 | 697 | | |
656 | | - | |
| 698 | + | |
657 | 699 | | |
658 | 700 | | |
659 | 701 | | |
| |||
Lines changed: 43 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 99 | | |
109 | 100 | | |
110 | 101 | | |
| |||
158 | 149 | | |
159 | 150 | | |
160 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
| |||
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
| 167 | + | |
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 188 | + | |
194 | 189 | | |
195 | 190 | | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
199 | 194 | | |
200 | | - | |
201 | 195 | | |
202 | 196 | | |
203 | 197 | | |
| |||
266 | 260 | | |
267 | 261 | | |
268 | 262 | | |
269 | | - | |
270 | 263 | | |
271 | 264 | | |
272 | 265 | | |
| |||
363 | 356 | | |
364 | 357 | | |
365 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
366 | 380 | | |
367 | 381 | | |
368 | 382 | | |
| |||
422 | 436 | | |
423 | 437 | | |
424 | 438 | | |
425 | | - | |
| 439 | + | |
426 | 440 | | |
427 | 441 | | |
428 | 442 | | |
429 | 443 | | |
430 | 444 | | |
| 445 | + | |
431 | 446 | | |
432 | 447 | | |
433 | 448 | | |
| |||
0 commit comments