feat(transaction-controller): support saved gas fee levels#8993
Open
pedronfigueiredo wants to merge 1 commit into
Open
feat(transaction-controller): support saved gas fee levels#8993pedronfigueiredo wants to merge 1 commit into
pedronfigueiredo wants to merge 1 commit into
Conversation
83cc6ba to
ba63c2b
Compare
7 tasks
vinistevam
previously approved these changes
Jun 9, 2026
ba63c2b to
b620f8f
Compare
Contributor
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. |
b620f8f to
a8ca11c
Compare
Contributor
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. |
a8ca11c to
1a8241c
Compare
Contributor
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. |
1a8241c to
69d8cef
Compare
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
This expands transaction-controller saved gas fee handling so clients can resolve saved preferences with full transaction metadata instead of only a chain ID. That lets consumers key saved gas settings by both chain and account while keeping the controller API responsible for applying saved fees.
The saved gas payload now supports gas fee estimate levels (
low,medium,high) and legacy customgasPricevalues in addition to EIP-1559 custom fee values. Saved estimate levels reuse the current gas fee flow estimate for the saved level; custom values override only the specific saved fields.Transactions that already include gas fee params continue to use those initial params, so dapp-proposed fees keep precedence over saved preferences. Swap transaction types continue to skip saved gas fees.
References
Related PRs:
Checklist
Note
Medium Risk
Breaking change to
getSavedGasFeesrequires client updates; gas fee defaults affect every new send path but precedence rules limit impact when dapp or initial params are set.Overview
BREAKING:
getSavedGasFeesnow receives fullTransactionMetainstead of chain ID, andSavedGasFeessupports optionallevel(low/medium/highor custom), optional EIP-1559 fields, and legacygasPrice.Gas fee application in
updateGasFeesskips saved preferences when the tx already has gas params or is a swap; saved estimate levels pick the matching tier from the gas fee flow, while custom saved fields still override specific fee values.userFeeLevelfollowssavedGasFees.levelwhen present.The changelog also documents incoming-transaction backwards compatibility: ignored
incomingTransactionsconstructor options and no-opstartIncomingTransactionPolling/stopIncomingTransactionPolling, with tests added.TransactionControllergains additionalAllowedEventstypes for account activity and WebSocket connection (imports only in this diff).Reviewed by Cursor Bugbot for commit 69d8cef. Bugbot is set up for automated code reviews on this repo. Configure here.