Skip to content

fix: override SLIP-44 for HyperEVM (chain 999) to 2457#7975

Merged
salimtb merged 2 commits intomainfrom
fix/hyperevm-slip44-override
Feb 18, 2026
Merged

fix: override SLIP-44 for HyperEVM (chain 999) to 2457#7975
salimtb merged 2 commits intomainfrom
fix/hyperevm-slip44-override

Conversation

@salimtb
Copy link
Contributor

@salimtb salimtb commented Feb 18, 2026

PR Description

Explanation

What is the current state of things and why does it need to change?

NetworkEnablementController builds native asset identifiers in the form eip155:{chainId}/slip44:{coinType} (e.g. eip155:1/slip44:60 for Ethereum). For EVM networks it gets the SLIP-44 coin type from Slip44Service.getEvmSlip44(chainId), which uses chainid.network's chains.json. For HyperEVM (chain ID 999), that dataset returns slip44: 1, so we end up with eip155:999/slip44:1 instead of the correct eip155:999/slip44:2457. That wrong identifier can break balance/account mapping and other features that key off the native asset.

What is a chain collision?

A chain collision here means: for a given EVM chainId, the external source (e.g. chainid.network) associates that ID with the wrong chain's metadata. That can happen when:

  • The same numeric chain ID is (or was) used by more than one chain (e.g. testnets, rebrands, or legacy data), or
  • The dataset maps one chain's ID to another chain's slip44 (e.g. Wanchain's slip44 is 1; HyperEVM's is 2457, but the source returns 1 for chainId 999).

So "collision" = one chainId in the data corresponds to the wrong chain's SLIP-44, and we must not use that value for HyperEVM.

What is the solution and how does it work?

We treat HyperEVM as a special case in Slip44Service: a small override map maps chain ID 999 → SLIP-44 2457. getEvmSlip44(chainId) checks this map before fetching or using chainid.network. For 999 it always returns 2457, so the native asset identifier is always eip155:999/slip44:2457. Other chains are unchanged. The override is easy to extend if we discover more collisions later.

Any non-obvious changes?

  • Only Slip44Service and its tests were changed; no API or breaking changes.
  • The existing test that used chainId 999 as "unknown chain" was updated to use a different chainId (e.g. 12345) so it still tests the default (60) path.

References

  • Fixes the incorrect native asset identifier for HyperEVM (chain ID 999) built by NetworkEnablementController.
  • chainid.network chains.json — source of chainId → slip44 that can have collisions.
  • SLIP-44 — coin type registry (e.g. 2457 for HyperEVM).

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Small, targeted change gated to a single chain ID with added test coverage; minimal impact to other networks aside from changing HyperEVM’s slip44 value.

Overview
Ensures HyperEVM’s native asset identifier is stable by overriding the SLIP-44 coin type for EVM chainId 999 to 2457, avoiding incorrect chainid.network data caused by a chain ID collision.

Slip44Service.getEvmSlip44 now checks a small EVM_SLIP44_OVERRIDES map before fetching/caching chainid.network results, and tests were updated/added to cover the override behavior (including skipping the network fetch) plus the “unknown chain defaults to 60” case. Changelog updated under Fixed.

Written by Cursor Bugbot for commit 6ea6b9f. This will update automatically on new commits. Configure here.

@salimtb salimtb marked this pull request as ready for review February 18, 2026 09:52
@salimtb salimtb requested review from a team as code owners February 18, 2026 09:52
@salimtb salimtb marked this pull request as draft February 18, 2026 11:06
@salimtb salimtb marked this pull request as ready for review February 18, 2026 11:51
@salimtb salimtb added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit 0267e2b Feb 18, 2026
306 checks passed
@salimtb salimtb deleted the fix/hyperevm-slip44-override branch February 18, 2026 11:57
github-merge-queue bot pushed a commit that referenced this pull request Feb 18, 2026
## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

Bumping Network Enablement Controller to reflect changes made in
#7975

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Primarily version/lockfile and dependency bumps; no functional code
changes in this PR beyond consuming the already-released
`network-enablement-controller` fix.
> 
> **Overview**
> Bumps the monorepo version to `822.0.0` and releases
`@metamask/network-enablement-controller` `4.1.1`.
> 
> Updates `@metamask/assets-controller` and
`@metamask/assets-controllers` to depend on
`@metamask/network-enablement-controller@^4.1.1`, and refreshes related
changelogs/lockfile entries to reflect the new dependency and the
included SLIP-44 override fix for HyperEVM.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8e0cd64. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
khanti42 pushed a commit that referenced this pull request Feb 20, 2026
# PR Description

## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

**What is the current state of things and why does it need to change?**

`NetworkEnablementController` builds native asset identifiers in the
form `eip155:{chainId}/slip44:{coinType}` (e.g. `eip155:1/slip44:60` for
Ethereum). For EVM networks it gets the SLIP-44 coin type from
`Slip44Service.getEvmSlip44(chainId)`, which uses [chainid.network's
chains.json](https://chainid.network/chains.json). For **HyperEVM (chain
ID 999)**, that dataset returns `slip44: 1`, so we end up with
`eip155:999/slip44:1` instead of the correct `eip155:999/slip44:2457`.
That wrong identifier can break balance/account mapping and other
features that key off the native asset.

**What is a chain collision?**

A **chain collision** here means: for a given EVM `chainId`, the
external source (e.g. chainid.network) associates that ID with the
**wrong** chain's metadata. That can happen when:

- The same numeric chain ID is (or was) used by more than one chain
(e.g. testnets, rebrands, or legacy data), or
- The dataset maps one chain's ID to another chain's `slip44` (e.g.
Wanchain's slip44 is 1; HyperEVM's is 2457, but the source returns 1 for
chainId 999).

So "collision" = one chainId in the data corresponds to the wrong
chain's SLIP-44, and we must not use that value for HyperEVM.

**What is the solution and how does it work?**

We treat HyperEVM as a special case in `Slip44Service`: a small
**override map** maps chain ID `999` → SLIP-44 `2457`.
`getEvmSlip44(chainId)` checks this map **before** fetching or using
chainid.network. For 999 it always returns 2457, so the native asset
identifier is always `eip155:999/slip44:2457`. Other chains are
unchanged. The override is easy to extend if we discover more collisions
later.

**Any non-obvious changes?**

- Only `Slip44Service` and its tests were changed; no API or breaking
changes.
- The existing test that used chainId 999 as "unknown chain" was updated
to use a different chainId (e.g. 12345) so it still tests the default
(60) path.

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

- Fixes the incorrect native asset identifier for HyperEVM (chain ID
999) built by `NetworkEnablementController`.
- [chainid.network chains.json](https://chainid.network/chains.json) —
source of chainId → slip44 that can have collisions.
-
[SLIP-44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)
— coin type registry (e.g. 2457 for HyperEVM).

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Small, targeted change gated to a single chain ID with added test
coverage; minimal impact to other networks aside from changing
HyperEVM’s slip44 value.
> 
> **Overview**
> Ensures HyperEVM’s native asset identifier is stable by overriding the
SLIP-44 coin type for EVM `chainId` 999 to `2457`, avoiding incorrect
`chainid.network` data caused by a chain ID collision.
> 
> `Slip44Service.getEvmSlip44` now checks a small `EVM_SLIP44_OVERRIDES`
map before fetching/caching chainid.network results, and tests were
updated/added to cover the override behavior (including skipping the
network fetch) plus the “unknown chain defaults to 60” case. Changelog
updated under *Fixed*.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6ea6b9f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
khanti42 pushed a commit that referenced this pull request Feb 20, 2026
## Explanation

<!--
Thanks for your contribution! Take a moment to answer these questions so
that reviewers have the information they need to properly understand
your changes:

* What is the current state of things and why does it need to change?
* What is the solution your changes offer and how does it work?
* Are there any changes whose purpose might not obvious to those
unfamiliar with the domain?
* If your primary goal was to update one package but you found you had
to update another one along the way, why did you do so?
* If you had to upgrade a dependency, why did you do so?
-->

Bumping Network Enablement Controller to reflect changes made in
#7975

## References

<!--
Are there any issues that this pull request is tied to?
Are there other links that reviewers should consult to understand these
changes better?
Are there client or consumer pull requests to adopt any breaking
changes?

For example:

* Fixes #12345
* Related to #67890
-->

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Primarily version/lockfile and dependency bumps; no functional code
changes in this PR beyond consuming the already-released
`network-enablement-controller` fix.
> 
> **Overview**
> Bumps the monorepo version to `822.0.0` and releases
`@metamask/network-enablement-controller` `4.1.1`.
> 
> Updates `@metamask/assets-controller` and
`@metamask/assets-controllers` to depend on
`@metamask/network-enablement-controller@^4.1.1`, and refreshes related
changelogs/lockfile entries to reflect the new dependency and the
included SLIP-44 override fix for HyperEVM.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
8e0cd64. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Feb 23, 2026
<!--
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?
-->

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in NetworkEnablementController.nativeAssetIdentifiers
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **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]
> **Medium Risk**
> Touches persisted migration logic and mutates controller state
in-place for affected users, so a bug could impact stored network asset
identifiers. Scope is narrowly targeted to one key/value and is covered
by focused unit tests and defensive guards.
> 
> **Overview**
> Adds **migration `121`** to correct the persisted
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
to `eip155:999/slip44:2457` *only when the key exists and is set
incorrectly*; invalid/missing controller shapes are detected and
reported via `captureException` without mutating state.
> 
> Introduces `121_utils.ts` for type-guard/validation logic (with Sentry
reporting) and adds Jest coverage for the main success path and all
early-return/error conditions. Registers the new migration in
`migrations/index.ts` and bumps
`@metamask/network-enablement-controller` from `^4.1.0` to `^4.1.1`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5969ed6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Feb 23, 2026
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/40206?quickstart=1)

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in _NetworkEnablementController.nativeAssetIdentifiers_
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

<img width="200" alt="image"
src="https://github.com/user-attachments/assets/1237ba32-2c36-4b76-a47f-c9bea0fb0799"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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]
> **Low Risk**
> Migration is narrowly scoped to a single stored key and is guarded by
shape checks and “only-if-present” logic; main risk is incorrect
assumptions about persisted state shapes, mitigated by early exits and
Sentry logging.
> 
> **Overview**
> Adds state migration `196` to fix an incorrect
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
by overwriting it with `eip155:999/slip44:2457` **only when the key
already exists and is not already correct**, and records
`NetworkEnablementController` as changed.
> 
> Introduces a small `196_utils` validator that Sentry-logs
unexpected/missing controller state shapes, adds comprehensive unit
coverage for these edge cases, wires the migration into the main
migrations list, and bumps e2e fixture migration versions accordingly.
Also updates `@metamask/network-enablement-controller` (and related
lockfile/policy entries) to the newer patch release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4bb4c11. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
github-merge-queue bot pushed a commit to MetaMask/metamask-extension that referenced this pull request Feb 23, 2026
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/40206?quickstart=1)

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in _NetworkEnablementController.nativeAssetIdentifiers_
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

<img width="200" alt="image"
src="https://github.com/user-attachments/assets/1237ba32-2c36-4b76-a47f-c9bea0fb0799"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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]
> **Low Risk**
> Migration is narrowly scoped to a single stored key and is guarded by
shape checks and “only-if-present” logic; main risk is incorrect
assumptions about persisted state shapes, mitigated by early exits and
Sentry logging.
> 
> **Overview**
> Adds state migration `196` to fix an incorrect
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
by overwriting it with `eip155:999/slip44:2457` **only when the key
already exists and is not already correct**, and records
`NetworkEnablementController` as changed.
> 
> Introduces a small `196_utils` validator that Sentry-logs
unexpected/missing controller state shapes, adds comprehensive unit
coverage for these edge cases, wires the migration into the main
migrations list, and bumps e2e fixture migration versions accordingly.
Also updates `@metamask/network-enablement-controller` (and related
lockfile/policy entries) to the newer patch release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4bb4c11. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Feb 24, 2026
<!--
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?
-->

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in NetworkEnablementController.nativeAssetIdentifiers
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **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]
> **Medium Risk**
> Touches persisted migration logic and mutates controller state
in-place for affected users, so a bug could impact stored network asset
identifiers. Scope is narrowly targeted to one key/value and is covered
by focused unit tests and defensive guards.
> 
> **Overview**
> Adds **migration `121`** to correct the persisted
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
to `eip155:999/slip44:2457` *only when the key exists and is set
incorrectly*; invalid/missing controller shapes are detected and
reported via `captureException` without mutating state.
> 
> Introduces `121_utils.ts` for type-guard/validation logic (with Sentry
reporting) and adds Jest coverage for the main success path and all
early-return/error conditions. Registers the new migration in
`migrations/index.ts` and bumps
`@metamask/network-enablement-controller` from `^4.1.0` to `^4.1.1`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5969ed6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Feb 24, 2026
<!--
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?
-->

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in NetworkEnablementController.nativeAssetIdentifiers
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **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]
> **Medium Risk**
> Touches persisted migration logic and mutates controller state
in-place for affected users, so a bug could impact stored network asset
identifiers. Scope is narrowly targeted to one key/value and is covered
by focused unit tests and defensive guards.
> 
> **Overview**
> Adds **migration `121`** to correct the persisted
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
to `eip155:999/slip44:2457` *only when the key exists and is set
incorrectly*; invalid/missing controller shapes are detected and
reported via `captureException` without mutating state.
> 
> Introduces `121_utils.ts` for type-guard/validation logic (with Sentry
reporting) and adds Jest coverage for the main success path and all
early-return/error conditions. Registers the new migration in
`migrations/index.ts` and bumps
`@metamask/network-enablement-controller` from `^4.1.0` to `^4.1.1`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5969ed6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Unik0rnMaggie pushed a commit to MetaMask/metamask-extension that referenced this pull request Feb 24, 2026
<!--
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?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/40206?quickstart=1)

Context: HYPE token (`eip155:999/slip44:2457`) was incorrectly set to
`eip155:999/slip44:1` (`1` instead of `2457`)
for some users in _NetworkEnablementController.nativeAssetIdentifiers_
state.
This is because https://chainid.network/chains.json is fetched to
populate this state,
and that chainId "999" references a "WanChain testnet" instead of
HyperEVM.
PR MetaMask/core#7975 addresses future
population by forcing an
override at fetch-time.
However such fetching is not always triggered if an user had already
added the network,
hence the need for this migration that - ontop of the PR above - will
migrate the incorrect
entry ('eip155:999/slip44:1') to the correct one
('eip155:999/slip44:2457').

This migration will operate only if an entry already exists AND is not
'eip155:999/slip44:2457'.

## **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: migrates
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` to
value `eip155:999/slip44:2457` if applicable.

## **Related issues**

Fixes: https://consensyssoftware.atlassian.net/browse/NEB-574

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

<img width="200" alt="image"
src="https://github.com/user-attachments/assets/1237ba32-2c36-4b76-a47f-c9bea0fb0799"
/>


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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]
> **Low Risk**
> Migration is narrowly scoped to a single stored key and is guarded by
shape checks and “only-if-present” logic; main risk is incorrect
assumptions about persisted state shapes, mitigated by early exits and
Sentry logging.
> 
> **Overview**
> Adds state migration `196` to fix an incorrect
`NetworkEnablementController.nativeAssetIdentifiers['eip155:999']` value
by overwriting it with `eip155:999/slip44:2457` **only when the key
already exists and is not already correct**, and records
`NetworkEnablementController` as changed.
> 
> Introduces a small `196_utils` validator that Sentry-logs
unexpected/missing controller state shapes, adds comprehensive unit
coverage for these edge cases, wires the migration into the main
migrations list, and bumps e2e fixture migration versions accordingly.
Also updates `@metamask/network-enablement-controller` (and related
lockfile/policy entries) to the newer patch release.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4bb4c11. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants