Skip to content

[pull] main from MetaMask:main#343

Merged
pull[bot] merged 10 commits into
Reality2byte:mainfrom
MetaMask:main
Nov 20, 2025
Merged

[pull] main from MetaMask:main#343
pull[bot] merged 10 commits into
Reality2byte:mainfrom
MetaMask:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Nov 20, 2025

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 : )

matthewwalsh0 and others added 10 commits November 20, 2025 17:31
## **Description**

Support EIP-7702 gas station when depositing with MetaMask Pay.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Fixes:
[#6150](MetaMask/MetaMask-planning#6150)

## **Manual testing steps**

## **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**

- [ ] 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 gas fee token awareness to insufficient balance alerts,
simplifies available token selection logic, delegates getGasFeeTokens,
and upgrades transaction-pay-controller to v10.
> 
> - **Confirmations / Alerts**:
> - Consider `fees.isSourceGasFeeToken` in fee/amount calculations and
source network checks within `useInsufficientPayTokenBalanceAlert`.
> - Add tests covering gas fee token scenarios and adjust mocks
accordingly.
> - **Utils (`transaction-pay`)**:
> - Simplify `getAvailableTokens`: remove "no native gas" disablement
and related i18n; return tokens based on balance/selection/required
status only.
>   - Update tests to drop disabled-message case.
> - **Engine / Messenger**:
> - Delegate `TransactionController:getGasFeeTokens` to the Transaction
Pay controller messenger.
> - **Dependencies**:
> - Bump `@metamask/transaction-pay-controller` to `^10.0.0` (lockfile
updated).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5a0d198. 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**

This commit fixes a bug on Android where pasting a valid RPC URL into
the network settings would incorrectly trigger an "Invalid RPC URL"
error.

The bug was caused by the validation logic being tied to the `onBlur`
event, which was not firing correctly after a paste. The fix moves the
validation to the `onChangeText` event, ensuring that it is triggered
immediately after the text is pasted.

As part of this fix, the RPC URL input field and its validation logic
have been refactored into a new, isolated component called
`RpcUrlInput`. This improves the testability of the component and the
overall code quality. A new test suite has been added for the
`RpcUrlInput` component, and the old, now-obsolete tests have been
removed. The new files have been created in TypeScript, and PropTypes
have been replaced with TypeScript types.

The form has also been cleaned up to remove old feature flags which led
to very complex conditional logic.

## **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: invalid RPC URL error on paste

## **Related issues**

Fixes: #17161
https://consensyssoftware.atlassian.net/browse/ASSETS-1176

## **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://www.loom.com/share/c415ef5d1d6b497ea9775ece3b041608

https://www.loom.com/share/78d8c8c6b10542389ddccdf748c2b0b8

<!-- [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]
> Fixes invalid RPC URL error on paste by validating onChange via new
RpcUrlInput component and simplifies NetworkSettings by removing legacy
UI flag paths.
> 
> - **Networks Settings UI**
> - **New `RpcUrlInput` component**: Extracts RPC URL field with inline
validation on `onChangeText`, warning display, and success callback.
> - **Integration**: Uses `RpcUrlInput` in the Add RPC modal; updates
state via `onValidationChange` and triggers `validateRpcAndChainId` on
success.
> - **Validation changes**: RPC URL validation no longer tied to
`onBlur`; chain ID validation paths simplified; removed
`isNetworkUiRedesignEnabled` conditionals across rendering and logic.
> - **UI cleanup**: Consolidates buttons, warning banners, and dropdown
usage for RPC and block explorer selectors.
> - **Tests**
> - Adds unit tests for `RpcUrlInput` (valid paste,
invalid/duplicate/existing cases).
> - Updates `NetworkSettings` tests and snapshots; removes obsolete
tests tied to the old validation flow and feature flag.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
af5e9ba. 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?
-->

As a part of the deprecation process of `@metamask/swaps-controller`,
this PR removes constants that are imported from
`@metamask/swaps-controller`.

## **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:

## **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**

- [ ] 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]
> Migrates usages of swaps constants to `constants/bridge` and
`CHAIN_IDS`, updating swaps UI/utils, slippage logic/tests, gas fee
init, and send flow.
> 
> - **Constants**:
> - Add `constants/bridge.ts` with `NATIVE_SWAPS_TOKEN_ADDRESS` and
`SWAPS_TESTNET_CHAIN_ID`; expand allowed chain/name maps using
`CHAIN_IDS`.
> - **Swaps UI/Utils**:
> - Update `app/components/UI/Swaps/index.js`, `utils/index.js`,
`isSwapsNativeAsset` to use `NATIVE_SWAPS_TOKEN_ADDRESS`,
`SWAPS_TESTNET_CHAIN_ID`, and `CHAIN_IDS`.
>   - Adjust tests in `utils/index.test.js` accordingly.
> - **Stablecoin slippage**:
> - Refactor `useStablecoinsDefaultSlippage.ts` and its tests to use
`CHAIN_IDS` (remove `swapsUtils` chain IDs).
> - **Asset/Send flows**:
> - Use `NATIVE_SWAPS_TOKEN_ADDRESS` in `AssetOverview.tsx` and send
amount view for swap navigation.
> - **Gas fee controller**:
> - Switch legacy gas API compatibility checks to
`CHAIN_IDS.BSC`/`CHAIN_IDS.POLYGON`; update related tests.
> - **Engine constants**:
> - Replace swaps-supported chain IDs with `CHAIN_IDS` and
`SWAPS_TESTNET_CHAIN_ID`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
767c106. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
…2966)

<!--
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**

The underlying sendflow uses `selectChainId` which should be marked as
deprecated.
- This selected does not return the correct chain ID when you are using
"Popular Networks" view as you can have multiple chainIDs selected now!!

This has unearthed a very large scope at this selector underpins many
areas in mobile and extension 💀
Ideally all flows and features should move away from this selector and
handle multiple selected chainIDs.


## **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: correct nft images available during send flow

## **Related issues**

Fixes: #20982

## **Manual testing steps**

1. Select Popular Networks Tab
2. Go through NFT send flow - Select NFT from (e.g.) Linea (not
ethereum)
3. Expected: On review page, should see NFT and can select NFT image
without crashing app

## **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://www.loom.com/share/683675a4c01b47b0a99f6ff5e9dfa30a

## **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]
> Fetch NFTs by the correct hex chainId via a new selector in the send
flow, refine HeroNft placeholder/interaction, and add selector tests
with deprecation notes for legacy selectors.
> 
> - **State/Selectors**:
> - **New** `reducers/collectibles/selectAllCollectiblesByChain`:
returns collectibles for selected address and given `Hex` chainId;
includes unit tests.
> - **Deprecate** `collectiblesSelector` and `selectChainId` (comments
only).
> - **Hooks**:
> - Update `useNft` to use `selectAllCollectiblesByChain` and hexified
`chainId`; derive NFT by `tokenId`.
> - **UI**:
> - `HeroNft` placeholder: remove "Show" text, only show `#tokenId` when
available; block navigation when no NFT.
> - Tests updated and expanded (placeholder interaction, image from
`collection.imageUrl`, assertions).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0247941. 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?
-->

fixes array mutation in ramp routing hook

## **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**

- [ ] 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]
> Sort a copy of `completedOrders` to derive the last completed order
without mutating the original array in `useRampsSmartRouting`.
> 
> - **Ramp smart routing
(`app/components/UI/Ramp/hooks/useRampsSmartRouting.ts`)**:
> - Avoids mutating `completedOrders` by sorting a copied array
(`[...completedOrders].sort`) before selecting the latest order for
routing decision.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3c440f0. 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**

We are updating the Tron snap to the latest [version
1.9.1](https://github.com/MetaMask/snap-tron-wallet/releases/tag/v1.9.1)

## **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**

- [ ] 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 `@metamask/tron-wallet-snap` from `^1.8.0` to `^1.9.1`.
> 
> - **Dependencies**:
> - Bump `@metamask/tron-wallet-snap` to `^1.9.1` in `package.json` and
`yarn.lock`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
85018bb. 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**
Add OTA update metadata to Sentry logs and state logs 

<!--
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: Added sentry logs for OTA updates

## **Related issues**

Fixes:
[#21825](#21825)


## **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**
Sentry logs:
<img width="707" height="281" alt="Screenshot 2025-11-18 at 4 32 15 PM"
src="https://github.com/user-attachments/assets/4964cb0e-6194-4c41-a0ac-17379da18500"
/>

State logs:
<img width="649" height="408" alt="Screenshot 2025-11-18 at 4 56 40 PM"
src="https://github.com/user-attachments/assets/a85f68a8-2fe2-4498-aa79-3c1cea71f2fe"
/>

<!-- [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]
> Add Sentry EAS update metadata and OTA/runtime logging, enable Expo
Updates code signing, and bump app to 7.61.99/3092 with related
build/test updates.
> 
> - **Telemetry & Diagnostics**
> - Added `setEASUpdateContext` in `app/util/sentry/utils.ts` to tag
Sentry events with Expo Updates metadata (`expo-update-id`,
`expo-is-embedded-update`, `expo-ota-version`, `expo-runtime-version`,
debug URL). Updated tests and mocks (`app/util/sentry/utils.test.ts`,
`app/util/test/testSetup.js`).
> - Included `otaVersion` and `runtimeVersion` in exported state logs;
wired `OTA_VERSION`/`RUNTIME_VERSION` via `app/util/logs/index.ts` and
added tests in `app/util/logs/index.test.ts`.
> - Centralized OTA constants: moved `OTA_VERSION` to
`app/constants/ota.ts` (hardcoded `'v0'`), kept
`RUNTIME_VERSION/PROJECT_ID/UPDATE_URL` in `ota.config.js` (removed
`OTA_VERSION`).
> 
> - **Expo Updates & Code Signing**
> - Enabled EAS Updates code signing in `app.config.js` and
`scripts/update-expo-channel.js` (inject
`EXUpdatesCodeSigningCertificate`, `EXUpdatesCodeSigningMetadata`,
`EXPO_*` keys, `fallbackToCacheTimeout`).
> - Added `certs/certificate.pem` and ownership in `.github/CODEOWNERS`.
> 
> - **Build & Versions**
> - Bumped app version to `7.61.99` (Android `versionCode` 3092, iOS
`MARKETING_VERSION` 7.61.99 / `CURRENT_PROJECT_VERSION` 3092); updated
`package.json` and `bitrise.yml` accordingly.
>   - Added `eas-cli` dev dependency and `"eas"` npm script.
> 
> - **Misc**
> - Numerous test and lockfile updates (`yarn.lock`) to support new
tooling.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
661a485. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: Aslau Mario-Daniel <marioaslau@gmail.com>
Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com>
…state (#22838)

## **Description**

Removes Global Network Selector (GNS) behavior from network selection
logic and migrates to using `NetworkEnablementController` state
exclusively. This change addresses issues with incorrect network state
and crashes caused by reliance on GNS patterns.

### Motivation

A [recent PR](#21461)
re-introduced GNS behavior to fix an issue where switching networks does
not affect the selected network on the "Import Tokens" screen. The
downstream effect of this is when users select a custom network and
remove said network it causes the app to crash due to the globally
selected network being removed. While a quick fix was available
(updating the globally selected network), this would have perpetuated
GNS anti-patterns that the codebase is actively moving away from.
Instead, this PR addresses the root cause by using the enabled network
state to properly track and manage enabled networks within the import
tokens screen, doing this also fixes the app crash when deleting the
selected custom network

## **Changelog**

CHANGELOG entry: Fixed issue where removing a recently added custom
network causes the app to crash

## **Related issues**

Fixes: 

This PR fixes two issues.
Import token screen not in sync with network manager:
#20927
App crash on custom network delete:
https://consensyssoftware.atlassian.net/browse/ASSETS-1167


## **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**

Importing tokens now use enabled networks by namespace instead of the
global network selector


https://github.com/user-attachments/assets/2ddfd883-34bb-4002-97ec-cd778720f2a3

Deleting a selected custom network no longer crashes 


https://github.com/user-attachments/assets/7283602d-2fb3-437a-b4c1-c558198a715d


### **Before**


https://github.com/user-attachments/assets/890c5af7-6fa4-47dd-be8e-63aa4a38428f


### **After**


https://github.com/user-attachments/assets/7283602d-2fb3-437a-b4c1-c558198a715d

## **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]
> Replaces GNS-based selection with NetworkEnablement state across
UI/hooks, updates AddAsset/NetworkManager flows, and filters EVM tokens
by enabled networks, with comprehensive test updates.
> 
> - **UI**:
> - `app/components/UI/NetworkManager/index.tsx`: On delete, removes
network then enables an alternative via `enableNetwork`; integrates
`useNetworksToUse`; tab default derives from enabled networks.
> - `app/components/Views/AddAsset/AddAsset.tsx`: Initializes selected
network from `enabledNetworksForAllNamespaces`; removes dependency on
global chain; keys tabs by `selectedNetwork`.
> - **Hooks**:
> - `useNetworkEnablement`: exposes `enabledNetworksForAllNamespaces`
(flattened map).
> - `useNetworkSelection`: removes
`MultichainNetworkController.setActiveNetwork` logic; all selections use
`enableNetwork`/`enableAllPopularNetworks` only.
> - **Selectors**:
> - `selectEvmTokens`: filters tokens by `EnabledNetworksByNamespace`
(EIP-155) instead of legacy token-network filter/current network logic;
simplifies categorization.
> - **Tests**:
> - Broad updates/additions across `NetworkManager`,
`NetworkMultiSelector`, `AddAsset`, `useNetworkEnablement`,
`useNetworkSelection`, `useNetworksByNamespace`, and EVM selectors to
validate enabled-network-driven behavior and new flows.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0210a20. 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**

Implements automatic 2-second refresh interval for optimistic positions
in
PredictPosition and PredictPositionDetail components. Positions
automatically
update in real-time and stop refreshing when resolved.

- Add auto-refresh effect that triggers every 2 seconds for optimistic
positions
- Track currentPosition state to display latest values from API
- Clear interval automatically when position becomes non-optimistic
- Clean up interval on component unmount to prevent memory leaks
- Add comprehensive test coverage for auto-refresh behavior
- Test refresh start, stop, cleanup, and position updates

<!--
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/PRED-322?atlOrigin=eyJpIjoiODc3OGE2YzIxNWFiNGZhNzllNTY4YzI4N2Q4YTdkNmUiLCJwIjoiaiJ9

## **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]
> Introduce a polling hook to auto-refresh optimistic positions and wire
it into PredictPosition and PredictPositionDetail with updated
UI/behavior and comprehensive tests.
> 
> - **Core**:
> - Add `usePredictOptimisticPositionRefresh` hook to sequentially poll
`usePredictPositions` (default 2s), update position by
`marketId`/`outcomeId`, and clean up on unmount or when no longer
optimistic.
> - **Components**:
> - `PredictPosition` and `PredictPositionDetail` now consume the hook
and render using `currentPosition` (show skeletons while optimistic).
> - Pass updated `currentPosition` to `onPress` and navigate with
refreshed data.
>   - Disable cash out button when position is optimistic.
> - **Navigation**:
>   - Use `Routes.PREDICT.MODALS.SELL_PREVIEW` for cash-out navigation.
> - **Tests**:
> - Add extensive tests for the hook and update component tests to cover
immediate start, interval polling, stop on resolve, unmount cleanup, UI
updates, and error/slow-network handling.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
db0b529. 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**

Update withdrawal toast messages to be clearer and more user-friendly:
- Simplify pending withdrawal title from "Withdrawing {amount} USDC" to
"Withdrawal in progress"
- Change pending subtitle to "Available in about 1 minute" for clearer
expectation
- Update completed message from "Withdrawal completed" to "Withdrawal
complete"
- Revise completed subtitle to "{amount} USDC moved to your wallet" for
clarity
- Format withdrawal amounts using formatPrice utility for consistent
display

<!--
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/PRED-312?atlOrigin=eyJpIjoiYjZjMTlkNjRjYzEwNDY5OGE1ODczMjI4MGRlNGEwYzkiLCJwIjoiaiJ9

## **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]
> Simplifies Predict withdrawal toasts and locales, removing dynamic
placeholders and formatting amounts with `formatPrice`.
> 
> - **Predict UI**:
>   - `app/components/UI/Predict/hooks/usePredictWithdrawToasts.ts`:
>     - Format confirmed withdrawal amounts with `formatPrice`.
> - Pending toast no longer passes `amount`/`time`; uses static
`withdrawing`/`withdrawing_subtitle` strings.
>     - Updated pending/confirmed toast configs to match new copy.
> - **Locales**:
>   - `locales/languages/en.json`:
> - Simplified `predict.withdraw` strings (static pending
title/subtitle; refined completed title/subtitle).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
eaaea2d. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@pull pull Bot locked and limited conversation to collaborators Nov 20, 2025
@pull pull Bot added the ⤵️ pull label Nov 20, 2025
@pull pull Bot merged commit 10b85d3 into Reality2byte:main Nov 20, 2025
3 of 13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants