fix(transaction-pay-controller): resolve correct networkClientId for source chain in relay execute#8492
Merged
matthewwalsh0 merged 1 commit intomainfrom Apr 16, 2026
Conversation
e9897b9 to
523339e
Compare
…source chain in relay execute The sourceCallTransaction in submitViaRelayExecute inherited networkClientId from the original transaction, which references the target chain. This caused getNonceLock to query the wrong chain, producing an incorrect nonce in the EIP-7702 authorization list during cross-chain pay flows. Resolve the correct networkClientId for the source chain via findNetworkClientIdByChainId before building the source call transaction.
523339e to
71e1067
Compare
Member
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
pedronfigueiredo
approved these changes
Apr 16, 2026
geositta
added a commit
that referenced
this pull request
Apr 16, 2026
…sition-live-price-sync * origin/main: fix(transaction-pay-controller): resolve correct networkClientId for source chain in relay execute (#8492) Release/920.0.0 (#8494) chore: bump `accounts` deps (#8464) feat: adds auth to social controllers (#8485) Release/919.0.0 (#8482) feat(seedless-onboarding-controller): generic encryptor result type aligned with KeyringController TO-686 (#8411) Release/918.0.0 (#8478) chore: add periodic check for spl tokens (#8400)
5 tasks
github-merge-queue bot
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Apr 17, 2026
…2.1 (#28978) ## **Description** Bumps `@metamask/transaction-pay-controller` from `^19.1.1` to `^19.2.1`. ### Changes included (since 19.1.1) **19.2.1** - Fix: Resolve correct `networkClientId` for source chain in Relay execute flow ([#8492](MetaMask/core#8492)) - Fix: Stop double-counting subsidized fees in Relay quote target amounts ([#8488](MetaMask/core#8488)) **19.2.0** - Bump `@metamask/ramps-controller` from `^13.1.0` to `^13.2.0` - Bump `@metamask/transaction-controller` from `^64.2.0` to `^64.3.0` **19.1.3** - Bump `@metamask/assets-controller` from `^5.0.1` to `^6.0.0` - Bump `@metamask/bridge-controller` from `^70.1.0` to `^70.1.1` - Fix: Resolve the effective transaction type from `nestedTransactions` when the parent is a batch transaction **19.1.2** - Bump `@metamask/base-controller` from `^9.0.1` to `^9.1.0` - Bump `@metamask/assets-controller` from `^5.0.0` to `^5.0.1` - Bump `@metamask/assets-controllers` from `^103.1.1` to `^104.0.0` - Bump `@metamask/bridge-controller` from `^70.0.1` to `^70.1.0` ## **Changelog** CHANGELOG entry: null ## **Related issues** ## **Manual testing steps** ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Dependency bumps touch transaction/bridge/payment controller logic, which can affect critical send/relay flows. There is also a likely compile/runtime issue from removing `NETWORK_CHAIN_ID.MANTLE` while it’s still referenced in the image mapping. > > **Overview** > Updates MetaMask core transaction dependencies, bumping `@metamask/transaction-pay-controller` to `^19.2.1` and aligning related controllers in `yarn.lock` (notably `@metamask/transaction-controller` to `64.3.0`, plus newer `assets`/`bridge`/`ramps` controller versions). > > Removes the `MANTLE` entry from `NETWORK_CHAIN_ID` in `customNetworks.tsx` while leaving `CustomNetworkImgMapping` referencing `NETWORK_CHAIN_ID.MANTLE`, which may break builds/type-checking or runtime mapping for Mantle. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 78d9b57. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
vinnyhoward
pushed a commit
to MetaMask/metamask-mobile
that referenced
this pull request
Apr 17, 2026
…2.1 (#28978) ## **Description** Bumps `@metamask/transaction-pay-controller` from `^19.1.1` to `^19.2.1`. ### Changes included (since 19.1.1) **19.2.1** - Fix: Resolve correct `networkClientId` for source chain in Relay execute flow ([#8492](MetaMask/core#8492)) - Fix: Stop double-counting subsidized fees in Relay quote target amounts ([#8488](MetaMask/core#8488)) **19.2.0** - Bump `@metamask/ramps-controller` from `^13.1.0` to `^13.2.0` - Bump `@metamask/transaction-controller` from `^64.2.0` to `^64.3.0` **19.1.3** - Bump `@metamask/assets-controller` from `^5.0.1` to `^6.0.0` - Bump `@metamask/bridge-controller` from `^70.1.0` to `^70.1.1` - Fix: Resolve the effective transaction type from `nestedTransactions` when the parent is a batch transaction **19.1.2** - Bump `@metamask/base-controller` from `^9.0.1` to `^9.1.0` - Bump `@metamask/assets-controller` from `^5.0.0` to `^5.0.1` - Bump `@metamask/assets-controllers` from `^103.1.1` to `^104.0.0` - Bump `@metamask/bridge-controller` from `^70.0.1` to `^70.1.0` ## **Changelog** CHANGELOG entry: null ## **Related issues** ## **Manual testing steps** ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Dependency bumps touch transaction/bridge/payment controller logic, which can affect critical send/relay flows. There is also a likely compile/runtime issue from removing `NETWORK_CHAIN_ID.MANTLE` while it’s still referenced in the image mapping. > > **Overview** > Updates MetaMask core transaction dependencies, bumping `@metamask/transaction-pay-controller` to `^19.2.1` and aligning related controllers in `yarn.lock` (notably `@metamask/transaction-controller` to `64.3.0`, plus newer `assets`/`bridge`/`ramps` controller versions). > > Removes the `MANTLE` entry from `NETWORK_CHAIN_ID` in `customNetworks.tsx` while leaving `CustomNetworkImgMapping` referencing `NETWORK_CHAIN_ID.MANTLE`, which may break builds/type-checking or runtime mapping for Mantle. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 78d9b57. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to 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
During cross-chain MetaMask Pay flows, the delegation transaction receives the wrong
networkClientId— it gets the target chain's instead of the source chain's. This causes the EIP-7702 authorization nonce to be looked up on the wrong chain, breaking the gasless execute flow.Resolves the correct
networkClientIdfor the source chain before passing it togetDelegationTransaction, matching the pattern already used insubmitViaTransactionController.References
Checklist
Note
Medium Risk
Touches Relay execute submission logic used in gasless cross-chain Pay flows; a wrong
networkClientIdcould break nonce/authorization handling, but the change is small and covered by targeted tests.Overview
Fixes the Relay
/execute(EIP-7702) submission path to resolvenetworkClientIdfromsourceChainIdviaNetworkController:findNetworkClientIdByChainIdbefore callingTransactionPayController:getDelegationTransaction, instead of implicitly inheriting the original transaction’s network context.Updates Relay submit tests to assert
networkClientIdis passed on the delegation transaction and that the source-chain lookup is performed, and records the change in the package changelog.Reviewed by Cursor Bugbot for commit 71e1067. Bugbot is set up for automated code reviews on this repo. Configure here.