refactor: handle multiple quotes in a swap batch transaction#8886
Open
micaelae wants to merge 14 commits into
Open
refactor: handle multiple quotes in a swap batch transaction#8886micaelae wants to merge 14 commits into
micaelae wants to merge 14 commits into
Conversation
43d1fca to
f48d8e0
Compare
840cd5d to
dbe1e17
Compare
micaelae
commented
May 21, 2026
Comment on lines
+1712
to
+1715
| txFee: { | ||
| maxFeePerGas: '50000000000000000', | ||
| maxPriorityFeePerGas: '50000000000000000', | ||
| }, |
Member
Author
There was a problem hiding this comment.
Fixed this mock data to match an actual quote
micaelae
commented
May 21, 2026
Comment on lines
+1878
to
+1879
| "maxFeePerGas": "0xb1a2bc2ec50000", | ||
| "maxPriorityFeePerGas": "0xb1a2bc2ec50000", |
Member
Author
There was a problem hiding this comment.
This is the txFee provided by the quote
dbe1e17 to
81afbff
Compare
81afbff to
effa5f4
Compare
fix: delegated account + gasIncluded7702=false
effa5f4 to
eae8297
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c2854f9. Configure here.
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 doesn't include any BatchSell submission functionality yet. Just refactoring the transaction utils to enable processing multiple quotes within a batch. See cursor comment and changelog for more details
References
Checklist
Note
Medium Risk
Changes how swap/bridge gas is estimated and removes a breaking GasFeeController messenger dependency; batch and 7702 submission paths were heavily reworked though behavior is covered by updated tests.
Overview
This PR refactors bridge-status-controller EVM batch submission around a
QuoteAndTxMetadatalist built bytoQuoteAndTxMetadata, so reset approval, approval, and trade steps share one path and can later support multiple quotes in one batch (BatchSell groundwork).Gas handling is centralized in
toTransactionParams: when the bridge API suppliestxFee, those limits are used; otherwise fees come fromTransactionController:estimateGasFeeonly. The unusedGasFeeController:getStatemessenger action is removed (breaking for consumers that wired it).#handleEvmTransactionBatchnow takes the full quote, setsatomic: true, and applies explicit 7702 / gas-included / delegated-account flags when building batch params.Post-batch matching uses
findAllTransactionsInBatchandupdateTransactionsInBatchinstead of the oldtxDataByTypemap. Single-tx submission reuses the same param builder. Failed-event tracking no longer bails onfeatureIdat the handler level; a new test covers failure metrics when history was wiped buttxMetaremains.Tests and snapshots reflect fewer messenger calls, hex gas values, default
location, and new coverage for delegated batch paths.Reviewed by Cursor Bugbot for commit c2854f9. Bugbot is set up for automated code reviews on this repo. Configure here.