-
-
Notifications
You must be signed in to change notification settings - Fork 261
fix: Fix get1559CompatibilityWithNetworkClientId
#7532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+48
−2
Conversation
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
This function assumed that metadata for a given network client would be `undefined` if an EIP-1559 compatibility check was needed. This used to be the case prior to `@metamask/[email protected]`, but as of that version we began regularly updating metadata without checking for EIP-1559 compatibility. The function `get1559CompatibilityWithNetworkClientI` now checks for whether EIP-1559 compatibility metadata is present, not just whether metadata is defined at all.d
Member
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
mcmire
approved these changes
Dec 17, 2025
Contributor
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Gudahtt
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0).
7 tasks
joaoloureirop
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0).
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
…ion (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. 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
Dec 18, 2025
…ion (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. 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
Dec 18, 2025
…ion (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
runway-github bot
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
… version (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
runway-github bot
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
… version (#24166) ## **Description** The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). ## **Changelog** CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances ## **Related issues** Related core issue: MetaMask/core#7533 ## **Manual testing steps** - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted ## **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). - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Gudahtt
added a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Dec 18, 2025
…ion (#24166) The package `@metamask/network-controller` has been updated from v27.0 to v27.1, which is the latest version. The primary motivation for the update is this bug fix: MetaMask/core#7532 (included in v27.1.0). CHANGELOG entry: Fix bug where EIP-1559 compatibility check was skipped in some circumstances Related core issue: MetaMask/core#7533 - do a fresh install of 7.61.0 - submit a transaction (see that it was a type 0.. no gas fee properties included) - try to submit a type 4 transaction (upgrade/downgrade doesn't matter.. see that the transaction fails locally) - update to the build from your PR - re-do the previous actions and they all should succeed - type 2 transaction submitted - type 4 transaction submitted <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> <!-- [screenshots/recordings] --> <!-- [screenshots/recordings] --> - [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). - [ ] 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. - [ ] 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] > Update `@metamask/network-controller` to `^27.1.0` and refresh lockfile with related dependency bumps. > > - **Dependencies**: > - Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` in `package.json` and `yarn.lock`. > - Lockfile updates for transitive deps: > - `@metamask/controller-utils` → `11.17.0`. > - `@metamask/eth-json-rpc-middleware` → `22.0.1`. > - Corresponding `yarn.lock` resolutions and checksums updated. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit aea2716. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Explanation
This function assumed that metadata for a given network client would be
undefinedif an EIP-1559 compatibility check was needed. This used to be the case prior to@metamask/[email protected], but as of that version we began regularly updating metadata without checking for EIP-1559 compatibility.The function
get1559CompatibilityWithNetworkClientInow checks for whether EIP-1559 compatibility metadata is present, not just whether metadata is defined at all.References
Fixes #7533
Checklist
Note
Updates EIP-1559 compatibility check to refetch network metadata when the
EIPS[1559]value is missing and adds tests plus changelog entry.get1559CompatibilityWithNetworkClientIdto calllookupNetworkwhennetworksMetadata[networkClientId].EIPS[1559]isundefined, not only when metadata is absent, then returnEIPS[1559].packages/network-controller/tests/NetworkController.test.ts):packages/network-controller/CHANGELOG.md):Written by Cursor Bugbot for commit 396375e. This will update automatically on new commits. Configure here.