Skip to content

fix(across): fix wrong output token and amount for BRIDGEABLE_TO_ANY …#53

Merged
qiuchenghui merged 1 commit into
mainfrom
fix_across
Jun 3, 2026
Merged

fix(across): fix wrong output token and amount for BRIDGEABLE_TO_ANY …#53
qiuchenghui merged 1 commit into
mainfrom
fix_across

Conversation

@qiuchenghui
Copy link
Copy Markdown
Contributor

…routes

When bridging to a chain where Across performs a swap on the destination (crossSwapType = BRIDGEABLE_TO_ANY), quote.steps.bridge.tokenOut is the intermediate bridge token (e.g. WETH), not the final received token.

Previously getQuoteOutputToken always read bridge.tokenOut, causing the 'to' field to display WETH instead of the user-selected token (e.g. POL) and making the output amount look incorrect.

Fix: only override the displayed token with bridge.tokenOut for pure bridge routes (BRIDGEABLE_TO_BRIDGE / no crossSwapType). For all other swap types, keep the user-selected toToken so the displayed amount matches the final output reported in quote.expectedOutputAmount.

…routes

When bridging to a chain where Across performs a swap on the destination
(crossSwapType = BRIDGEABLE_TO_ANY), quote.steps.bridge.tokenOut is the
intermediate bridge token (e.g. WETH), not the final received token.

Previously getQuoteOutputToken always read bridge.tokenOut, causing the
'to' field to display WETH instead of the user-selected token (e.g. POL)
and making the output amount look incorrect.

Fix: only override the displayed token with bridge.tokenOut for pure bridge
routes (BRIDGEABLE_TO_BRIDGE / no crossSwapType). For all other swap types,
keep the user-selected toToken so the displayed amount matches the final
output reported in quote.expectedOutputAmount.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ringwallet-testring Ready Ready Preview, Comment Jun 3, 2026 4:26am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ringwallet Ignored Ignored Jun 3, 2026 4:26am

Request Review

@qiuchenghui qiuchenghui merged commit ab6108f into main Jun 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant