fix(bridge): show swap quote skeleton during refetch#29975
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. |
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 01a4e88. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
No other tags are warranted as the changes are scoped to swap/bridge functionality. Performance Test Selection: |
|




Description
Fixes a swap display gap during slippage-triggered quote refetches. When the BridgeController temporarily clears
activeQuotebefore the next quote is available,BridgeViewcould fall through to quote mode even thoughQuoteDetailsCardandBridgeViewFooterhad nothing usable to render. That produced the blank state seen in the ticket: no footer and no loading skeleton.This keeps
needsNewQuotescoped to its original expired-quote retry purpose, and moves the transient empty-quote handling intoBridgeViewcontent mode selection. For a non-zero input with no active quote, no retry state, and no terminal quote error/no-quotes state, the view now renders the existing quote skeleton until a refreshed quote is available. That keeps the loading state visible without adding hook-level quote history or reusing quote state across token pair changes.The swap action smoke test custom slippage path and matching analytics expectation are restored now that the slippage refetch gap has a visible loading state.
Changelog
CHANGELOG entry: Fixed a bug that could leave the swap quote area blank during slippage refresh
Related issues
Fixes: #29615
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
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
Tweaks swap/bridge UI state selection during quote refetches, which can affect whether users see actionable quote/confirm UI vs a loading skeleton. Also re-enables custom slippage in smoke tests, so failures could block CI if the new loading-state assumptions are wrong.
Overview
Prevents a blank swap/bridge quote area during slippage-triggered refetches by treating the transient state of
sourceAmount > 0with noactiveQuote(and no terminal error/no-quotes state) asloading, showing the existing quote skeleton until a refreshed quote arrives.Keeps
needsNewQuotefocused on expired-quote retry behavior inuseBridgeQuoteData, and adds/updates tests to cover the non-zero/no-active-quote loading case.Restores the swap action smoke test custom slippage path and updates analytics expectations to require the
slippageINPUT_CHANGEDevent (and the total count) again.Reviewed by Cursor Bugbot for commit a8f917d. Bugbot is set up for automated code reviews on this repo. Configure here.