MetaMask / MetaMask/metamask-extension
[Bug]: Perps modal incorrectly shown when navigating back from Market Details page instead of on banner tap
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
After onboarding with an existing SRP, when the user clicks a **Perps banner** on the homepage, the Market Details page is displayed as expected. However, when the user clicks the **back arrow** to return to the homepage, the **Perps modal is triggered** — this modal should only appear when the user clicks the banner, not when closing the Market Details page.
### Expected behavior
The Perps modal should be displayed **when the user clicks the Perps banner** on the homepage. Navigating back from the Market Details page should return the user cleanly to the homepage without showing any modal.
### Screenshots/Recordings
https://www.loom.com/share/f67d36a688a64c4ba9d0d45083039059
### Steps to reproduce
1. Onboard using an **existing SRP**
2. On the homepage, click a **Perps banner**
3. The **Market Details page** is displayed
4. Click the **back arrow** to return to the homepage
5. Observe that the **Perps modal appears** unexpectedly
### Error messages or log output
_No error message displayed._
### Where was this bug found?
Internal release testing
### Version
13.36.0
### Build type
_No response_
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
_No response_
### Additional context
- Onboarding method: existing SRP import
- The Perps modal is triggered on back navigation from Market Details instead of on banner click
- This suggests the modal display logic is tied to the navigation stack dismissal rather than the banner click action
- Team: Social
### Severity
_To be filled by internal support / PM_
Contributor guide
Research direction
Reproduce the flow in Chrome using an existing SRP: tap the Perps banner on the homepage, open Market Details, then use the back arrow. Trace the homepage banner, Market Details navigation, and Perps modal handling; done means the modal appears on banner tap but not when returning from Market Details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100