Commit 88b007a
fix: route DeFi empty-state CTA to Explore sites (#29552)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## **Description**
This change updates the DeFi empty-state `Explore DeFi` CTA behavior so
it no longer opens the external MetaMask Portfolio explore tokens URL in
the in-app browser.
Instead, pressing the CTA now navigates users to the in-app Explore flow
and opens the Explore **Sites** section (`TrendingView ->
SitesFullView`), matching the requested product direction and avoiding
the blank page issue.
## **Changelog**
CHANGELOG entry: Fixed the DeFi empty-state Explore button to open the
in-app Explore sites screen instead of an external portfolio page.
## **Related issues**
Fixes: #29471
https://consensyssoftware.atlassian.net/browse/ASSETS-3133
## **Manual testing steps**
```gherkin
Feature: DeFi empty-state Explore CTA navigation
Scenario: user opens Explore from empty DeFi tab
Given the user is on the DeFi tab with no open positions
When user taps the "Explore DeFi" button
Then the app navigates to the Explore Sites screen
And the app does not open portfolio.metamask.io/explore/tokens
```
## **Screenshots/Recordings**
### **Before**
N/A
### **After**
https://www.loom.com/share/04b68f115a2c44a190bd7049b5ee323e
https://www.loom.com/share/88e42d07ee06480a90abde1d4771add2
## **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
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- [ ] I've tested with a power user scenario
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] 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_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-9cac285f-d4ce-4156-a35e-004942245eb2"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-9cac285f-d4ce-4156-a35e-004942245eb2"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Prithpal Sooriya <prithpal@example.com>1 parent 6902301 commit 88b007a
2 files changed
Lines changed: 8 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 32 | + | |
| 33 | + | |
39 | 34 | | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
32 | 27 | | |
| 28 | + | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
| |||
0 commit comments