Fix Across Predict withdraw gas payment edges#8762
Open
pedronfigueiredo wants to merge 1 commit into
Open
Conversation
aeb6df5 to
b942291
Compare
This was referenced May 11, 2026
0e2bce3 to
013d596
Compare
b942291 to
84b56cb
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.
Summary
This is PR 4 of 4 in the core stack for Predict withdraws over Across.
Stack
Validation
yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/strategy/across/across-quotes.test.ts src/strategy/across/across-submit.test.ts src/strategy/across/AcrossStrategy.test.tsyarn workspace @metamask/transaction-controller run jest --no-coverage src/utils/gas-fee-tokens.test.tsyarn changelog:validateyarn workspace @metamask/transaction-pay-controller run testyarn workspace @metamask/transaction-controller run testNote
Medium Risk
Adjusts gas-fee-token selection and Across quote fee calculation logic, which can affect whether transactions proceed and how much gas is reserved/charged. Changes are well-covered by new tests but touch transaction publishing and fee estimation paths.
Overview
Fixes
TransactionControllerpre-publish gas-fee-token handling soexcludeNativeTokenForFeeforces the external-sign/gas-fee-token path (skipping native-balance checks) and clears nonce when preparing to publish with a selected gas token.Improves Across post-quote Predict-withdraw fee handling by (1) preferring source gas-fee-token pricing even if native balance is available (with a guard when the account can’t use 7702), (2) adding a fiat-rate-based fallback when the gas station can’t price the source token, and (3) capping inflated prefunded 7702 batch gas estimates to the configured Across fallback and falling back to relaxed per-transaction estimates when batch estimation fails.
Adds extensive unit tests for these edge cases and updates changelogs for both
transaction-controllerandtransaction-pay-controller.Reviewed by Cursor Bugbot for commit 84b56cb. Bugbot is set up for automated code reviews on this repo. Configure here.