fix(transaction-pay-controller): ignore synthetic across gas legs#8527
Draft
pedronfigueiredo wants to merge 4 commits intomainfrom
Draft
fix(transaction-pay-controller): ignore synthetic across gas legs#8527pedronfigueiredo wants to merge 4 commits intomainfrom
pedronfigueiredo wants to merge 4 commits intomainfrom
Conversation
343d279 to
52950da
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.
Problem observed in testing
The perps direct deposit flow could include a synthetic gas-funding leg, generated internally for native ETH on Arbitrum, with targetAmountMinimum: '0'. That leg was optional and not the real asset the user was trying to deposit, but the Across strategy support check still evaluated it as if it were a required quote leg. As a result, a valid perps deposit request could be marked unsupported before quote resolution, because the optional gas leg made the whole request set fail strategy validation.
The fix was to make Across treat those zero-minimum synthetic gas legs consistently everywhere. A shared helper was introduced to identify “real” Across quote requests, and both quote fetching and strategy support now filter out requests where targetAmountMinimum === '0' unless it is a max-amount flow. In practice, that means the real deposit leg can proceed while the optional gas top-up leg no longer disqualifies the route. The turn also added a regression test covering exactly that case: one real perps deposit leg plus one synthetic native-token gas leg, and the strategy now correctly returns supported.
Summary
Testing