feat: fetch gasless transactions for BatchSell quotes#8805
Merged
Conversation
812aa2e to
c01f799
Compare
GeorgeGkas
previously approved these changes
May 15, 2026
GeorgeGkas
previously approved these changes
May 18, 2026
infiniteflower
previously approved these changes
May 18, 2026
matthewwalsh0
previously approved these changes
May 19, 2026
de47eb4
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 de47eb4. Configure here.
GeorgeGkas
approved these changes
May 19, 2026
matthewwalsh0
approved these changes
May 19, 2026
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
Implements the
updateBatchSellTradeshandler which calls theobtainGaslessBatchto estimate network fees for BatchSell quotes. Clients will need to call the handler whenever the selectBatchQuotes selector's recommended quotes changeA new selector
selectBatchSellTradeshas also been added, which returns whether a batch is submittable, and thetotalNetworkFeeprovided by theobtainGaslessBatchendpoint and its converted valuesReferences
Fixes https://consensyssoftware.atlassian.net/browse/SWAPS-4444
Checklist
Note
Medium Risk
Adds a new network call and state flow for BatchSell fee/transaction batch fetching, including abort/error handling and breaking selector output changes. Risk is moderate due to new API integration and fee display/submittability gating logic.
Overview
BatchSell quotes now have a separate fetch path for gasless transaction batches and fees.
BridgeControlleraddsupdateBatchSellTrades, stores results in new state fields (batchSellTrades,batchSellTradesLoadingStatus), and aborts in-flight requests on new quote requests/resets to avoid stale fee data.Selectors and API/types were updated to support this flow.
selectBatchSellQuotesno longer returnstotalNetworkFee(breaking); newselectBatchSellTradesderivestotalNetworkFeefrom theobtainGaslessBatchresponse (with exchange-rate conversion) and reports whether the batch is submittable based on fetched transactions.Validation/test coverage expanded. Adds request/response formatting + strict validators for batch responses and gasless fee fields, updates snapshots, and removes unnecessary
Hextype assertions in bridge transaction construction.Reviewed by Cursor Bugbot for commit de47eb4. Bugbot is set up for automated code reviews on this repo. Configure here.