feat: swaps batch sell slippage modal and remove tokens#30040
feat: swaps batch sell slippage modal and remove tokens#30040infiniteflower wants to merge 10 commits into
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
7e9ad0c to
d05d956
Compare
187da1e to
490850e
Compare
d05d956 to
219c754
Compare
57e28f5 to
8c0a345
Compare
1364451 to
10cc80f
Compare
8c0a345 to
61e5d8a
Compare
e97f7d8 to
554f2ae
Compare
554f2ae to
13c94fd
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 d709db8. Configure here.
6182d23 to
b54c57f
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeSwap: Directly affected - the swap/bridge flow uses slippage modals, and the route names have changed. The SmokeConfirmations: Per tag description, when selecting SmokeSwap, also select SmokeConfirmations as swap flows involve transaction confirmations. No other tags are warranted - the changes are isolated to the Bridge/Swap UI components and don't affect accounts, identity, network management, browser, snaps, or other areas. Performance Test Selection: |
|




Description
Adds per-token slippage configuration for Batch Sell by reusing the existing Unified Swaps slippage modal UI with explicit Swap and Batch Sell adapter routes.
The Batch Sell review token row now opens a token-scoped slippage modal from the existing customize action. Selected slippage values are stored in Redux by
CaipAssetType, kept in sync with the selected token set when users remove tokens, and preserve the distinction between an unset token value and an explicit Auto selection. The existing Swap slippage modals now use explicitSwapDefaultSlippageModalandSwapCustomSlippageModalroutes while Batch Sell uses separateBatchSellDefaultSlippageModalandBatchSellCustomSlippageModalroutes.This PR stores the Batch Sell slippage values for each token; quote request wiring will use these values when Batch Sell quote fetching is connected.
Changelog
CHANGELOG entry: Added per-token slippage settings and remove feature for Batch Sell tokens
Related issues
Refs: SWAPS-4439
Manual testing steps
Screenshots/Recordings
Before
N/A
After
Screen.Recording.2026-05-12.at.3.48.14.PM.mov
Screen.Recording.2026-05-13.at.3.43.52.PM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Adds new Batch Sell state and navigation flows (per-token slippage + token removal) that can affect swap/bridge UX if routing or Redux syncing is incorrect, but does not touch signing/auth or funds movement logic directly.
Overview
Adds per-token slippage configuration for Batch Sell by introducing
BatchSellDefaultSlippageModal/BatchSellCustomSlippageModalroutes that reuse the existing slippage UI and persist values in Redux asbatchSellSlippageskeyed byCaipAssetType(including preserving explicit Auto vs unset).Updates Batch Sell Review to open the token-scoped slippage modal from the customize action, allow removing source tokens down to a 2-token minimum, and keep the slippage map synced with the currently selected tokens; both Batch Sell selection and review now
resetBridgeState()on unmount.Renames the existing swap slippage modal routes to explicit
SWAP_*routes and updates callers/tests/types accordingly.Reviewed by Cursor Bugbot for commit b54c57f. Bugbot is set up for automated code reviews on this repo. Configure here.