fix: cp-7.65.0 totals in MUSD conversion using max button#26029
Merged
joaoloureirop merged 1 commit intorelease/7.65.0from Feb 12, 2026
Merged
fix: cp-7.65.0 totals in MUSD conversion using max button#26029joaoloureirop merged 1 commit intorelease/7.65.0from
joaoloureirop merged 1 commit intorelease/7.65.0from
Conversation
…nd stablecoins Cherry-pick changes from fix/metamask-pay-max-totals: - Expand stablecoin list for fiat rate calculations - Update setIsMaxAmount to setTransactionConfig API - Remove TokenListController from pay controller messenger Apply yarn patch for @metamask/transaction-pay-controller@12.1.0: - Add subsidized fee to target amount for EXACT_INPUT trades - Narrow targetAmount from Amount to FiatValue type - Use amountFormatted as USD value for stablecoin target amounts - Centralize and expand STABLECOINS map (core commit: 44ebd35472f63196fbb79d9f4df4fe045ca7e02d)
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.65.0) All E2E tests pre-selected. |
|
joaoloureirop
approved these changes
Feb 12, 2026
Collaborator
|
No release label on PR. Adding release label release-7.65.0 on PR, as PR was added to branch 7.65.0 when release was cut. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Cherry-pick #26015 into
7.65.0release.Applies a Yarn patch to
@metamask/transaction-pay-controllerinstead of bumping controller version to avoid unrelated changes.Changelog
CHANGELOG entry: null
Related issues
Fixes: #25972
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches transaction-pay quoting/totals and stablecoin detection, which can affect displayed costs and max-amount behavior across networks; mitigated by being a targeted patch and limited app-side changes.
Overview
Fixes transaction pay quote/total calculations by patching
@metamask/transaction-pay-controller12.1.0 rather than bumping the dependency.The patch centralizes a multi-chain
STABLECOINSlist, treats stablecoins as $1 in token fiat-rate logic, and changestargetAmountacross quotes/totals to be aFiatValuesummed viasumFiat(avoiding incorrect max/totals math). Relay quote normalization now accounts forfees.subsidizedby zeroing provider fees when subsidized and optionally including the subsidized amount in the computed target fiat value; Bridge normalization alignstargetAmountto fiat-only as well.On the mobile side,
useTokenFiatRatesnow uses a stablecoin allowlist (Mainnet/Arbitrum/Linea/Polygon) to return a fixed USD rate of1, and the related unit test is generalized accordingly. The Transaction Pay controller messenger drops the unusedTokenListController:getStateaction, andpackage.json/yarn.lockare updated to consume the patched controller via Yarn’spatch:protocol.Written by Cursor Bugbot for commit 61d257e. This will update automatically on new commits. Configure here.