You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Polygon native POL can enter the bridge/swaps flow from token details with Polygon's native token alias address (0x0000000000000000000000000000000000001010). Bridge state expects native EVM assets to use the swaps native zero address, so the alias can break downstream balance, gas, and quote matching behavior.
This change normalizes source and destination bridge tokens as they are stored in the bridge Redux slice. That keeps bridge state canonical for all callers of setSourceToken and setDestToken, including the POL token details swap entry point.
Changelog
CHANGELOG entry: Fixed a bug that prevented quotes when swapping from POL token details
Feature: POL swap quotes from token detailsScenario: User starts a swap from the POL asset details screenGiven the user has POL on Polygon Mainnet
And the user opens POL from the wallet token list
When the user taps Swap from the POL token details screen
And the user enters a valid POL amount
Then the swap flow fetches and displays available quotes
I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Selected Performance tags: None (no tests recommended)
Risk Level: medium
AI Confidence: 90%
click to see 🤖 AI reasoning details
E2E Test Selection:
The changes are focused on the bridge Redux slice (app/core/redux/slices/bridge/index.ts), specifically adding a normalizeBridgeToken helper that normalizes Polygon's native token address (0x0000...1010 → 0x0000...0000) when setting source/destination tokens. This is a targeted bug fix for Polygon native token handling in bridge flows.
SmokeTrade is selected because:
The bridge slice directly powers the cross-chain bridging feature tested by SmokeTrade
The fix affects setSourceToken and setDestToken reducers which are core to the bridge/swap flow
Bridge flows between networks (e.g., Ethereum mainnet to Base, or involving Polygon) are covered by SmokeTrade
SmokeConfirmations is selected because:
Per SmokeTrade tag description: "When selecting SmokeTrade for swap or bridge flows, also select SmokeConfirmations (transaction confirmations are part of the flow)"
Bridge transactions go through the confirmation flow
No other tags are needed as:
The change is isolated to the bridge Redux slice
No shared navigation, modal, or account management components are affected
No network permission or multi-chain API changes
The normalizeTokenAddress utility already existed and was used in other bridge hooks; this just applies it at the Redux slice level for consistency
Performance Test Selection:
The changes are a targeted bug fix for Polygon native token address normalization in the bridge Redux slice. This is a simple address string normalization that adds negligible overhead and does not impact rendering performance, data loading, UI components, or any performance-sensitive paths. No performance tests are warranted.
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
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.
Description
Polygon native POL can enter the bridge/swaps flow from token details with Polygon's native token alias address (
0x0000000000000000000000000000000000001010). Bridge state expects native EVM assets to use the swaps native zero address, so the alias can break downstream balance, gas, and quote matching behavior.This change normalizes source and destination bridge tokens as they are stored in the bridge Redux slice. That keeps bridge state canonical for all callers of
setSourceTokenandsetDestToken, including the POL token details swap entry point.Changelog
CHANGELOG entry: Fixed a bug that prevented quotes when swapping from POL token details
Related issues
Issue: #29231
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