[pull] main from MetaMask:main#357
Merged
Merged
Conversation
<!-- 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** File changes: - Moved Sites outside of Trending folder since it should be its own screen - Flattened out index files to continue with the pattern we have been following until now Improvements: - Updated **prediction** market single and multiple components to handle correct navigation and allow removing prediction navigation from the Trending stack - Made Sites screen full-screen like the rest of screens - Made a reusable footer component for sites to be reused in Trending to avoid duplication - Moved BrowserWrapper from of the Trending navigation to the main navigation for full-screen support - Removed shadow from bottom browser - Stop using explorerSearchBar in browser and instead use the correct header bar Bug fixes: - When opening a site from the sites full view and clicking on the back button it takes users to the main trending screen. Expected to go one step back <!-- 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: improvements for trending feature ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1837 ## **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** https://github.com/user-attachments/assets/b936b347-4c25-4187-82e4-9a2b8ff9d619 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Extracts Sites into a new full-screen flow with reusable list/search, moves the Trending browser to main navigation, updates Predict navigation, and removes bottom bar shadow. > > - **Navigation/Routes**: > - Add `TrendingBrowser` screen in main navigator using `BrowserWrapper` for full-screen browser and back behavior. > - Replace `Routes.SITES_LIST_VIEW` with `Routes.SITES_FULL_VIEW`; wire up stack transition in `MainNavigator`. > - Simplify `TrendingView` stack to `TrendingFeed` and `ExploreSearch` only; remove in-stack browser and Predict screens. > > - **Sites (extracted from Trending)**: > - New full-screen `SitesFullView` with header search, pull-to-refresh, filtering, and footer actions. > - New reusable components: `SitesList` (FlashList), `SiteRowItem`, `SiteRowItemWrapper`, `SiteSkeleton`, and `SitesSearchFooter`. > - New `useSitesData` hook path (`UI/Sites/...`) and API fetch with limit param; update references across app and search. > - Update Trending sections config to use new Sites components and `viewAll` to `SITES_FULL_VIEW`. > > - **Search**: > - Reuse `SitesSearchFooter` in Explore search results; footer only when query present. > > - **Predict**: > - Update `PredictMarketSingle`/`Multiple` to navigate via `Routes.PREDICT.ROOT` nested screens. > > - **Browser UI**: > - Replace `ElevatedView` with `View` in `BrowserBottomBar` (remove shadow) and adjust snapshots. > > - **Removals/cleanup**: > - Delete legacy `TrendingView/SitesListView` and related indices/exports; update tests and imports accordingly. > > - **Tests**: > - Add comprehensive tests for new Sites views/components and update snapshots for navigation and browser bottom bar. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 45fc7bb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ad of height (#23313) <!-- 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** Updated the Account List transition animation from bottom-top (vertical slide) to right-left (horizontal slide) to align with the new design system patterns. The change affects the full-page account list view when the `fullPageAccountList` feature flag is enabled. **What is the reason for the change?** - The design system has been updated to use right-left transitions for full-page modals instead of the previous bottom-top pattern - This change ensures consistency with the new design system guidelines **What is the improvement/solution?** - Changed animation from `translateY` (vertical) to `translateX` (horizontal) - Updated initial animation value from `screenHeight` to `screenWidth` - Updated backdrop opacity interpolation to work with horizontal translation - Maintained the same spring animation configuration for smooth transitions ## **Changelog** CHANGELOG entry: Updated Account List transition animation to slide in from the right instead of from the bottom (behind feature flag) ## **Related issues** Fixes: [TMCU-223](https://consensyssoftware.atlassian.net/browse/TMCU-223) ## **Manual testing steps** ```gherkin Feature: Account List Transition Animation Scenario: user opens account list with full-page feature flag enabled Given the app is running with the `fullPageAccountList` feature flag enabled And the user is on the wallet/home screen When user taps on the account selector/account name Then the account list should slide in from the right (left-to-right animation) And the backdrop should fade in smoothly And when user selects an account or taps back, the list should slide out to the right ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/fcc87382-b920-4a12-94a1-2caf3e6e7f7d <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/494ccf12-2648-4a40-b8cd-4ecc151aff12 <!-- [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** - [ ] 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. [TMCU-223]: https://consensyssoftware.atlassian.net/browse/TMCU-223?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switches full-page AccountSelector transition from vertical (height/translateY) to horizontal (width/translateX), updating animations and backdrop interpolation accordingly. > > - **AccountSelector (`app/components/Views/AccountSelector/AccountSelector.tsx`)**: > - Replace vertical animation with horizontal: > - Use `screenWidth` instead of `screenHeight` and `translateX` instead of `translateY`. > - Update enter/exit animations to spring/timing on `translateX`. > - Adjust backdrop opacity interpolation to `[screenWidth, 0]` on `translateX`. > - Update animated styles to transform with `translateX`. > - Applies only when `fullPageAccountList` feature flag is enabled. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 7028f65. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…cy) cp-7.60.0 (#23310) ## **Description** Bumping `@metamask/eth-snap-keyring` to enable `notify:accountCreated` idempotency which is required by the Bitcoin Snap. This will reduce the number of "misaligned" warnings we had with Bitcoin. Similar to: - MetaMask/metamask-extension#38292 ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: - #23324 ## **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** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Upgrade `@metamask/eth-snap-keyring` to ^18.0.2 and refresh related keyring dependencies in `yarn.lock`. > > - **Dependencies**: > - Bump `@metamask/eth-snap-keyring` from `^18.0.0` to `^18.0.2` in `package.json`. > - Update lockfile to resolve to `18.0.2` and align transitive deps: > - `@metamask/keyring-api` -> `^21.2.0` > - `@metamask/keyring-internal-api` -> `9.1.1` > - `@metamask/keyring-internal-snap-client` -> `8.0.1` > - `@metamask/keyring-snap-client` -> `8.1.1` > - `@metamask/keyring-snap-sdk` -> `7.1.1` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 02bd3bf. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** This PR tracks when users complete the RPC update flow initiated from the network connection banner, matching the implementation in metamask-extension MetaMask/metamask-extension#37751. **Context**: Currently we track when users click "Update RPC" from the network connection banner (`NetworkConnectionBannerUpdateRpcClicked`), but we don't track whether they actually complete the update by saving changes in the network settings form. **Solution**: Added the `NetworkConnectionBannerRpcUpdated` MetaMetrics event that fires when: 1. User clicks "Update RPC" from the network connection banner (sets `trackRpcUpdateFromBanner: true` in navigation params) 2. User modifies the RPC endpoint in the NetworkSettings form 3. User saves the changes This provides complete funnel tracking for the network banner → RPC update flow. <!-- 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 (Internal analytics tracking - not user-facing) ## **Related issues** Fixes: [ttps://consensyssoftware.atlassian.net/browse/WPC-172](https://consensyssoftware.atlassian.net/browse/WPC-172) ## **Manual testing steps** Feature: Track RPC update from network connection banner Scenario: user completes RPC update from network connection banner Given user has a network with degraded or unavailable status And network connection banner is shown When user clicks "Update RPC" button in the banner And user changes the RPC endpoint in the network settings form And user saves the network settings Then NetworkConnectionBannerRpcUpdated event is tracked And event includes chain_id_caip, from_rpc_domain, and to_rpc_domain properties Scenario: user saves network settings without banner tracking flag Given user is in network settings form And trackRpcUpdateFromBanner is not set When user modifies RPC endpoint And user saves the network settings Then NetworkConnectionBannerRpcUpdated event is not tracked ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Tracks a new "Network Connection Banner RPC Updated" event when a banner-initiated RPC change is saved, with sanitized domains and CAIP chain IDs, and wires the tracking flag through navigation with comprehensive tests. > > - **Analytics** > - Add `MetaMetricsEvents.NetworkConnectionBannerRpcUpdated` and expose in events map. > - **Settings › NetworkSettings** > - On save, when `trackRpcUpdateFromBanner` is true, emit `NetworkConnectionBannerRpcUpdated` with `chain_id_caip`, `from_rpc_domain`, `to_rpc_domain`. > - Sanitize endpoints via `isPublicEndpointUrl`/`onlyKeepHost`; compute CAIP chain ID with `hexToNumber`. > - **Hooks** > - `useNetworkConnectionBanner.updateRpc` now navigates to `Routes.EDIT_NETWORK` with `trackRpcUpdateFromBanner: true`. > - **Tests** > - Add/extend tests for event emission, non-emission, URL sanitization (`custom`), `unknown` fallback, and navigation param propagation. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 5f125ba. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description**
When basic functionality toggle is on, user should only be able to
search within sites.
## **Changelog**
CHANGELOG entry: User should be prompted to enable BFT when its off
## **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**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/15c342bb-40a0-4e77-8dff-5f33c88c5bbe
## **Pre-merge author checklist**
- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] 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.
## **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_SUMMARY -->
---
> [!NOTE]
> Explore now respects the basic functionality toggle: hides content
when off, shows an enable-CTA empty state, and limits search UI to
sites.
>
> - **Trending/Explore**:
> - **Toggle support**: Use `selectBasicFunctionalityEnabled` to control
Explore rendering and search behavior.
> - When off:
> - Show `BasicFunctionalityEmptyState` with CTA navigating to
`Routes.SHEET.BASIC_FUNCTIONALITY`.
> - Hide Explore home sections (`HOME_SECTIONS_ARRAY`).
> - In search results (`ExploreSearchResults`), filter out all sections.
> - In search bar (`ExploreSearchBar`), switch placeholder to
`strings('trending.search_sites')`.
> - When on: existing Explore content and multi-section search remain.
> - **i18n**: Add `trending.enable_basic_functionality`,
`trending.basic_functionality_disabled_title`, and
`trending.basic_functionality_disabled_description`.
> - **Tests**: Expand unit tests for toggle behavior across
`TrendingView`, `ExploreSearchBar`, and `ExploreSearchResults`; add
tests for new empty state component and navigation.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2998dd5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
## **Description** Fixed token/fiat toggle background ## **Changelog** CHANGELOG entry: Fixed token/fiat toggle background ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MDP-254 ## **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** `~` ### **Before** <img width="500" alt="Simulator Screenshot - iPhone 16 Pro Max - 2025-11-24 at 17 10 00" src="https://github.com/user-attachments/assets/ab62b6ba-623b-4e9b-a62f-3c055da2e8c4" /> ### **After** <img width="500" alt="Simulator Screenshot - iPhone 16 Pro Max - 2025-11-24 at 17 10 20" src="https://github.com/user-attachments/assets/dca102f9-d485-42d9-a326-5f65e07d8c59" /> ## **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] > Switches `currencyTag` background to `theme.colors.background.section` to correct the token/fiat toggle appearance. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 08a15a0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- 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** Updates bitcoin to 1.7.0, which adds signRewardsMessage method. <!-- 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: Add `signRewardsMessage` method ([#566](MetaMask/snap-bitcoin-wallet#566)) ## **Related issues** Fixes: Add `signRewardsMessage` method. ## **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** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Bumps @metamask/bitcoin-wallet-snap from ^1.6.0 to ^1.7.0. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2405f60. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!--
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**
<!--
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?
-->
Introduces token screening on incoming tokens received in transactions.
This comes in the form of two different alerts (yellow and red).
## **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: Added an alert if an incoming token is malicious or
suspicious.
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Token screening on incoming tokens in transactions
Scenario: user initiates a transaction where they receive malicious tokens
Given the user is on the `Transaction request` screen
And they are receiving tokens that is flagged as malicious
When user views the screen
Then they will see a red alert on `You receive`
And a red `Review alert` button
Scenario: user initiates a transaction where they receive suspicious tokens
Given the user is on the `Transaction request` screen
And they are receiving tokens that is flagged as suspicious
When user views the screen
Then they will see a yellow alert on `You receive`
```
- For a malicious token, you can swap for
`0x69e8b9528cabda89fe846c67675b5d73d463a916` on a swap website.
- For a suspicious token, you can swap for
`0xd0cd466b34a24fcb2f87676278af2005ca8a78c4` on a swap website.
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
**1. No yellow alert**
<img width="402" height="853" alt="Screenshot 2025-11-18 at 12 00 50 PM"
src="https://github.com/user-attachments/assets/c176193c-26ff-44eb-9b10-160381da3356"
/>
**2. No red alert**
<img width="398" height="843" alt="Screenshot 2025-11-18 at 12 01 34 PM"
src="https://github.com/user-attachments/assets/148f9c4e-6f5c-4d79-b0d2-11932c39dbfb"
/>
### **After**
<!-- [screenshots/recordings] -->
**1. Yellow alert**
<img width="386" height="841" alt="Screenshot 2025-11-18 at 11 41 51 AM"
src="https://github.com/user-attachments/assets/4028a106-357a-42fd-a7e9-2b60301b1185"
/>
**2. Red alert**
<img width="383" height="618" alt="Screenshot 2025-11-19 at 9 15 25 AM"
src="https://github.com/user-attachments/assets/01e04dfe-5abc-42fa-84f6-dca1bf05477c"
/>
**When you click the inline alert**
<img width="403" height="667" alt="Screenshot 2025-11-19 at 9 15 40 AM"
src="https://github.com/user-attachments/assets/1ddeed60-64e7-4c2e-8305-3fecca11e715"
/>
**When you click the 'Review alert' button**
<img width="389" height="641" alt="Screenshot 2025-11-19 at 9 17 41 AM"
src="https://github.com/user-attachments/assets/9c305ec1-534e-49a6-bc8c-6ea39a4d28cc"
/>
## **Pre-merge author checklist**
- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] 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.
## **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_SUMMARY -->
---
> [!NOTE]
> Adds malicious/suspicious token screening to transaction confirmations
with inline alerts, selectors, strings, and tests.
>
> - **Confirmations UI/UX**:
> - Show `AlertRow` on `BalanceChangeRow` label when `hasIncomingTokens`
is true, with style override in `alert-row.styles`.
> - Compute `hasIncomingTokens` in `BalanceChangeList` and pass to rows.
> - **Alerts System**:
> - New `useTokenTrustSignalAlerts` hook to derive alerts from token
scan results; integrated into `useConfirmationAlerts`.
> - Added `RowAlertKey.IncomingTokens` and new alert keys
`TokenTrustSignalMalicious`/`TokenTrustSignalWarning` with metrics
mappings.
> - **State Selectors**:
> - New `selectMultipleTokenScanResults` to read
`PhishingController.tokenScanCache` for multiple tokens.
> - **Localization**:
> - English strings for malicious/suspicious token alerts.
> - **Dependencies**:
> - Upgrade `@metamask/phishing-controller` to `^16.1.0`.
> - **Tests**:
> - Unit tests for `BalanceChangeRow`, `AlertRow`,
`useTokenTrustSignalAlerts`, `useConfirmationAlerts`, and phishing
selectors.
> - **Test fixtures**:
> - Update initial background state to include `addressScanCache` and
`tokenScanCache`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ff7ae25. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: sethkfman <setk.kaufman@consensys.net>
<!-- 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** Fix Non-EVM accounts not found Fixes part of this MetaMask/metamask-extension#38104 <!-- 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: fix: non-evm accounts not found ## **Related issues** Fixes: MetaMask/metamask-extension#38104 ## **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** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Updates Solana and Tron wallet snap dependencies to newer minor versions. > > - **Dependencies**: > - Bump `@metamask/solana-wallet-snap` from `^2.4.7` to `^2.5.0` in `package.json`. > - Bump `@metamask/tron-wallet-snap` from `^1.12.1` to `^1.13.0` in `package.json`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 628c91e. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…rt few new-ish markets (#23077) <!-- 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** - Resolves an issue wherein a given date would be repeated on the x-axis when selecting `MAX` for the date range on the market details chart, if the market is less than a month old. It also resulting in very sparse data points being retrieved / plotted. <!-- 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: NA ## **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** <img width="420" alt="image" src="https://github.com/user-attachments/assets/feb04270-77bd-4a3b-9f7c-a10c05b82e4a" /> <!-- [screenshots/recordings] --> ### **After** <img width="420" alt="image" src="https://github.com/user-attachments/assets/416c79eb-7f31-48c7-81af-e1f6875f89c3" /> ## **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** - [ ] 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_SUMMARY --> --- > [!NOTE] > Deduplicates x-axis labels and adapts MAX timeframe label formatting and data fidelity based on actual time span, with supporting timestamp utilities and tests. > > - **PredictDetailsChart (`PredictDetailsChart.tsx`)**: > - Compute chart time range via `getTimestampInMs` and pass to `formatPriceHistoryLabel` for adaptive labels. > - Deduplicate consecutive x-axis labels; update axis label generation and keys. > - **PredictMarketDetails (`PredictMarketDetails.tsx`)**: > - Add adaptive fidelity for `MAX` interval: use higher fidelity (`~240`) when history span < `30` days, default to `1440` otherwise. > - Compute history span using `getTimestampInMs`; manage `maxIntervalAdaptiveFidelity` state. > - **Utils (`utils.ts`)**: > - Add `MS_IN_SECOND`, `DAY_IN_MS`, `getTimestampInMs`. > - Extend `formatPriceHistoryLabel` to accept `{ timeRangeMs }` and adjust `MAX` formatting (month/day for <30 days; time for <1 day). > - **Tests**: > - Add axis label deduplication test in `PredictDetailsChart.test.tsx`. > - Add adaptive `MAX` formatting tests and export of `DAY_IN_MS` in `utils.test.ts`. > - Add fidelity adjustment tests for short vs long `MAX` spans in `PredictMarketDetails.test.tsx`; minor test name tweak. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fa847f0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ts (#23322) <!-- 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** Adds `rpc_domain` property to custom RPC UX analytics events while retaining the existing `rpc_endpoint_url` property. ## Changes - Added `rpc_domain` property to RPC analytics events: - `RPC_SERVICE_UNAVAILABLE` - `RPC_SERVICE_DEGRADED` - `NETWORK_CONNECTION_BANNER_SHOWN` - `NETWORK_CONNECTION_BANNER_UPDATE_RPC_CLICKED` - Both `rpc_domain` and `rpc_endpoint_url` now track the same value: - `'custom'` for custom RPC endpoints - Domain host for public endpoints (e.g., `'mainnet.infura.io'`) - Marked `rpc_endpoint_url` as deprecated for future removal - Updated unit tests to assert both properties ## Files Changed - `app/core/Engine/controllers/network-controller/messenger-action-handlers.ts` - `app/components/hooks/useNetworkConnectionBanner/useNetworkConnectionBanner.ts` - Corresponding test files --- <!-- 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: https://consensyssoftware.atlassian.net/browse/WPC-133 ## **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** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] 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). - [ ] I've completed the PR template to the best of my ability - [ ] 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. ## **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_SUMMARY --> --- > [!NOTE] > Add rpc_domain to RPC analytics events (mirroring deprecated rpc_endpoint_url) and update hook/controller logic and tests to use sanitized domain values. > > - **Analytics**: > - Add `rpc_domain` to RPC telemetry and align with deprecated `rpc_endpoint_url` (same value: host for public endpoints, `custom` for non-public). > - Apply to `RPC_SERVICE_UNAVAILABLE`, `RPC_SERVICE_DEGRADED`, `NETWORK_CONNECTION_BANNER_SHOWN`, and `NETWORK_CONNECTION_BANNER_UPDATE_RPC_CLICKED`. > - Centralize domain sanitization (via `sanitizeRpcUrl`/`onlyKeepHost`); continue capturing `http_status` when present. > - **Hook (`useNetworkConnectionBanner`)**: > - Compute `sanitizedUrl` once; include `rpc_domain` and deprecated `rpc_endpoint_url` in tracked properties. > - **Controller (`messenger-action-handlers`)**: > - Derive `rpcDomain` once; add `rpc_domain` and keep deprecated `rpc_endpoint_url`. > - **Tests**: > - Update assertions to include `rpc_domain` across scenarios (public/custom, degraded/unavailable, with/without `http_status`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3414c3a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description**
This PR implements a comprehensive redesign of the Perps Asset Details
screen (v2) with enhanced position management capabilities. When users
have an open position, the screen now provides intuitive actions for
position management including closing, modifying exposure, flipping
direction, and adjusting margin.
**Key improvements:**
1. **Dynamic button layout**: Replaces static Long/Short buttons with
context-aware Close/Modify/Share buttons when position is open
2. **Position modification modal**: New bottom sheet with 6 position
management options (Increase/Reduce exposure, Flip, Add TP/SL,
Add/Remove margin)
3. **Margin adjustment views**: New screens for adding and removing
margin with real-time impact visualization
4. **Position flipping**: One-tap position reversal while maintaining
size and leverage
5. **Improved scrollability**: Full asset page is now scrollable to
access all information
**Related Jira Tickets:**
- TAT-1910: Replace Long/Short buttons with Close/Modify/Share when
position is open
- TAT-2046: Enable scrolling through asset page for all relevant
information
- TAT-1541: Add or remove margin from open positions
- TAT-1690: Flip position functionality
## **Changelog**
CHANGELOG entry: Added enhanced position management UI with
Close/Modify/Share buttons, margin adjustment, and position flipping
capabilities for Perps trading
## **Related issues**
Fixes: TAT-1910, TAT-2046, TAT-1541, TAT-1690
## **Manual testing steps**
```gherkin
Feature: Enhanced Position Management on Asset Details Screen
Scenario: User views asset screen without open position
Given user is on Perps asset details screen
And user has no open position
When user views the screen
Then user sees Long and Short buttons
And user does not see Close/Modify/Share buttons
Scenario: User views asset screen with open position
Given user is on Perps asset details screen
And user has an open position
When user views the screen
Then user sees Close, Modify, and Share buttons
And user sees "Add Stop loss / Take profit" button below position card
And user does not see Long and Short buttons
Scenario: User closes position
Given user has an open position
And user is on asset details screen
When user taps Close button
Then close position screen opens
Scenario: User modifies position via bottom sheet
Given user has an open position
When user taps Modify button
Then bottom sheet opens with 6 options:
| Option |
| Increase exposure |
| Reduce exposure |
| Flip |
| Add TP/SL |
| Add margin |
| Remove margin |
Scenario: User increases exposure with existing TP/SL
Given user has position with TP/SL configured
When user selects "Increase exposure"
Then trade screen opens in same direction as current position
And TP/SL from position is pre-filled
And user can modify TP/SL for this specific trade
Scenario: User flips position
Given user has a LONG position of 2.5 ETH with 10x leverage
When user selects "Flip" from Modify menu
Then trade screen opens for SHORT direction
And position size remains 2.5 ETH
And leverage remains 10x
And user can use available margin + margin from closed position
And TP/SL are cancelled
Scenario: User adds margin to position
Given user has open position with $500 margin
And user has $300 available to add
When user selects "Add margin"
Then margin adjustment screen opens
And screen shows current margin: $500
And screen shows available to add: $300
And screen shows current liquidation price
And user can use slider or keyboard input
And user sees real-time impact on liquidation price and leverage
Scenario: User removes margin from position
Given user has open position with $500 margin
And user has $200 available to withdraw
When user selects "Remove margin"
Then margin adjustment screen opens
And screen shows current margin: $500
And screen shows available to withdraw: $200
And user can use slider or keyboard input
And user sees real-time impact on liquidation price
Scenario: User scrolls through asset page
Given user is on asset details screen
When user scrolls down
Then user can access all sections:
| Section |
| Price chart |
| Position card (if exists)|
| Market statistics |
| Order details |
```
## **Screenshots/Recordings**
### **Before**
Original asset screen with static Long/Short buttons
### **After**
**HIP-2 Markets (regular crypto):**

**HIP-3 - No Positions:**

**HIP-3 - With Active Positions:**

**With TP/SL and Limit Order:**

**Close Position Flow:**

**Flip Position Flow:**

**Add Margin Flow:**

## **Pre-merge author checklist**
- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] 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)).
## **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.
---
## **Technical Notes**
### Architecture Changes:
- **PerpsMarketDetailsView**: Refactored to conditionally render button
sets based on position state
- **PerpsPositionCard**: Now uses callback pattern (`onAutoClosePress`,
`onFlipPress`, `onMarginPress`, `onSharePress`) instead of internal
navigation
- **New Views**:
- `PerpsAdjustMarginView` - For adding/removing margin
- `PerpsOrderDetailsView` - For viewing order details
- **New Components**:
- `PerpsFlipPositionConfirmSheet` - Confirmation sheet for position
flipping
### Test Updates:
- Fixed failing tests after merge with main branch
- Updated PerpsPositionCard tests to use testID pattern (removed 35
obsolete tests)
- Added 10 missing locale keys for new UI elements
- Added testIDs for PNL, ROE, Size, and Margin values
### Navigation Flow:
```
PerpsMarketDetailsView (with position)
|-- Close Button -> PerpsClosePositionView
|-- Modify Button -> Bottom Sheet
| |-- Increase exposure -> PerpsTradeView (same direction)
| |-- Reduce exposure -> PerpsClosePositionView
| |-- Flip -> PerpsFlipPositionConfirmSheet -> PerpsTradeView (opposite)
| |-- Add TP/SL -> PerpsTpSlView
| |-- Add margin -> PerpsAdjustMarginView (mode: add)
| `-- Remove margin -> PerpsAdjustMarginView (mode: remove)
`-- Share Button -> PerpsPnlHeroCard
```
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Redesigns the perps asset screen with full position
management—Modify/Close/Share, margin add/remove, and flip—plus new
order details, hooks, services, routes, and tests.
>
> - **UI/Views**:
> - **Asset Details (MarketDetailsView)**: Reworked layout; shows
Modify/Close when a position exists; adds Position card, compact open
orders list, updated statistics (incl. oracle price), tooltips, and
scrollable sections; integrates bottom sheets for modify, adjust margin,
and flip confirm.
> - **New Screens**: `PerpsAdjustMarginView` (add/remove margin with
live impact), `PerpsOrderDetailsView` (view/cancel), selection sheets:
`PerpsSelectModifyActionView`, `PerpsSelectAdjustMarginActionView`,
`PerpsSelectOrderTypeView`.
> - **Components**: New `PerpsFlipPositionConfirmSheet`,
`PerpsAdjustMarginActionSheet`, `PerpsModifyActionSheet`,
`PerpsCompactOrderRow`; redesigned `PerpsPositionCard`; enhanced
`PerpsMarketStatisticsCard`; styling updates to trades/activity lists
and badges.
> - **Hooks/Logic**:
> - Added `usePerpsMarginAdjustment`, `usePerpsFlipPosition`,
`usePositionManagement`; extended `usePerpsTrading` and navigation
helpers.
> - New margin utilities: `calculateMaxRemovableMargin`,
`calculateNewLiquidationPrice`, `assessMarginRemovalRisk`.
> - **Controller/Provider**:
> - PerpsController/TradingService: new `updateMargin` and
`flipPosition`; HyperLiquidProvider implements `updateMargin`.
> - Config: `MARGIN_ADJUSTMENT_CONFIG`; new traces for adjust
margin/order details/flip.
> - **Navigation/Routes**: Added routes for adjust margin, order
details, and selection sheets.
> - **Toasts/i18n**: Margin adjustment toasts; new strings.
> - **Tests/Docs**: Extensive unit/e2e updates; new tests for
views/hooks/services; docs updated for new screens.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a207786. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Nick Gambino <35090461+gambinish@users.noreply.github.com>
Co-authored-by: Salim TOUBAL <salim.toubal@outlook.com>
Co-authored-by: George Gkasdrogkas <georgegkas@gmail.com>
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
Co-authored-by: MetaMask Bot <37885440+metamaskbot@users.noreply.github.com>
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Michal Szorad <michal.szorad@consensys.net>
Co-authored-by: Patryk Łucka <5708018+PatrykLucka@users.noreply.github.com>
Co-authored-by: VGR <VanGulckRik@gmail.com>
Co-authored-by: sahar-fehri <sahar.fehri@consensys.net>
Co-authored-by: OGPoyraz <omergoktugpoyraz@gmail.com>
Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com>
Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
Co-authored-by: Corey Janssen <107953793+coreyjanssen@users.noreply.github.com>
Co-authored-by: Bernardo Garces Chapero <bernardo.chapero@consensys.net>
Co-authored-by: António Regadas <antonio.regadas@consensys.net>
Co-authored-by: Alejandro Garcia <alejandro.garcia@consensys.net>
Co-authored-by: Nicholas Smith <nick.smith@consensys.net>
Co-authored-by: Juanmi <95381763+juanmigdr@users.noreply.github.com>
Co-authored-by: Andre Pimenta <andrepimenta7@gmail.com>
Co-authored-by: Vince Howard <vincenguyenhoward@gmail.com>
Co-authored-by: Curtis David <Curtis.David7@gmail.com>
Co-authored-by: Brian August Nguyen <brianacnguyen@gmail.com>
Co-authored-by: Kylan Hurt <6249205+smilingkylan@users.noreply.github.com>
…BasicInfo form (#23299) ## **Description** Fixed error handling in BasicInfo component to correctly access error codes from Axios error responses. The code was previously trying to access `error.error.errorCode` but Axios errors have the structure `error.response.data.error.errorCode`, which prevented error code 2020 (phone already registered) from being detected correctly. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: #23302 ## **Manual testing steps** ```gherkin Feature: BasicInfo form error handling Scenario: user submits form with already registered phone number Given I am on the BasicInfo screen with valid form data When I submit the form with a phone number that is already registered Then I should see an error message indicating the phone is already registered And I should see a "Log in with email" button And clicking the logout button should navigate to the email entry screen ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="333" height="720" alt="image" src="https://github.com/user-attachments/assets/0a01a7be-e4bb-496c-8396-e77d5785b668" /> ### **After** https://github.com/user-attachments/assets/e8acba92-1032-4f49-a5bd-84a605bda71f ## **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** - [ ] 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_SUMMARY --> --- > [!NOTE] > Fixes BasicInfo to read Axios error response for code 2020, format the email-based message, and expose a logout-to-email flow; updates tests to use AxiosError and cover these behaviors. > > - **UI (Deposit BasicInfo)**: > - Parse Axios errors via `response.data.error` to detect Transak `errorCode` `2020` and set `isPhoneRegisteredError`. > - Extract email from error message to show localized `phone_already_registered` banner text. > - Show "Log in with email" action on the error banner and navigate to `Routes.DEPOSIT.ENTER_EMAIL`; gracefully handle logout failures. > - Minor: add `AxiosError` typing and default fallback message. > - **Tests** (`BasicInfo.test.tsx`): > - Replace custom errors with `AxiosError` shaped responses; add/import Axios types. > - Verify formatted message, presence/absence of logout button by error type, navigation on logout, and error handling when logout fails. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0961bb6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- 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** <!-- 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? --> Update logic to include all non-evm chains when parsing deep link urls. ## **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: Update logic for deeplink parsing to take into account all non-EVM chains ## **Related issues** Fixes: #23314 ## **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** <!-- [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 - [ ] I’ve included tests if applicable - [ ] 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** - [ ] 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_SUMMARY --> --- > [!NOTE] > Generalizes asset metadata handling from Solana-only to all non-EVM chains using `isNonEvmChainId`. > > - **Bridge asset metadata utils (`app/components/UI/Bridge/hooks/useAssetMetadata/utils.ts`)**: > - Replace Solana-specific check with generic `isNonEvmChainId` for non-EVM asset handling in `fetchAssetMetadata`. > - Import `isNonEvmChainId` from `@metamask/bridge-controller` to support all non-EVM chains. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2019411. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
<!-- 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** https://consensyssoftware.atlassian.net/browse/RWDS-844 Create a new way render unknown activity types based on data from the backend. <!-- 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** <!-- [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] > Adds support to render unknown activity events using backend-provided season activity types and templated descriptions, wiring activityTypes through controller, state, selectors, and UI. > > - **Rewards UI/UX**: > - Activity rows and details now consume `activityTypes` from Redux (`selectSeasonActivityTypes`) and pass them to `getEventDetails`/`openActivityDetailsSheet` to render titles/icons and a templated "Description" row. > - `ActivityEventRow` improves network icon extraction (typed payloads, safer parsing) and passes `confirmAction`. > - **Utils**: > - `getEventDetails(event, activityTypes, accountName)` supports custom types using `getIconName` and `resolveTemplate` for descriptions; adds per-event extra description in details sheet. > - New `resolveTemplate` helper; locale adds `rewards.events.description`. > - **State/Selectors**: > - Introduces `SeasonActivityTypeDto`; adds `seasonActivityTypes` to `SeasonDto/SeasonDtoState/SeasonStatusDto`, Redux state, rehydration, and selectors. > - **Engine/Data**: > - Rewards controller and data service fetch/persist `activityTypes`; state conversion and caching updated; ensure array defaulting. > - **Tests**: > - Extensive updates/coverage across components, utils, reducers, selectors, and controller to reflect new `activityTypes`, templating, and network parsing behavior. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3f6fadb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…ponent level (#22067) ## **Description** This is the a PR to remove the rest of the `MM_REMOVE_GLOBAL_NETWORK_SELECTOR` feature flag on a component level Previous PRs: [chore: remove MM_REMOVE_GLOBAL_NETWORK_SELECTOR from hooks, lists, and control bars](#22574) [chore: remove global network selector feature flag from selectors and polling](#22463) There will be one more PR to review the feature flag from Github workflows and E2E tests ## **Changelog** CHANGELOG entry:null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1132 ## **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** `~` ### **Before** `~` ### **After** `~` ## **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] > Eliminates MM_REMOVE_GLOBAL_NETWORK_SELECTOR flag and defaults Network Manager behaviors across UI, logic, tests, and CI. > > - **Network Manager defaulted (flag removed)**: > - Remove `isRemoveGlobalNetworkSelectorEnabled` usage; always call `selectNetwork`/enable networks (e.g., `SwitchChainApproval`, `NetworkModal`, `Swaps`, `QuotesView`, `SendFlow`). > - Always show network pickers (e.g., `ContextualNetworkPicker`, `PickerNetwork`). > - Always set token network filter on actions (e.g., add/update network, switch RPC). > - **Transactions & Filtering**: > - `TransactionsView` and `UnifiedTransactionsView` filter by enabled EVM chains; simplify block explorer logic to single selected EVM chain. > - `TransactionElement` multichain logic no longer gated by the flag. > - **Address Book / Send flow**: > - `AddressList` shows contacts across chains when rendering address book; network badges shown on entries. > - `ContactForm`: address immutable in edit mode; always shows network selector. > - `AddressElement`: network badge controlled solely by `displayNetworkBadge` prop. > - **Tests**: > - Update/removal of feature-flag branches and expectations across unit tests (Approvals, NetworkModal, PaymentRequest, Swaps, Transactions, UnifiedTransactions, RPC modal, Contacts, Send flow, Network Settings). > - **CI/Config**: > - Remove `MM_REMOVE_GLOBAL_NETWORK_SELECTOR` env from Bitrise and Jest; delete flag export from `util/networks`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ee65b6a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )