fix(bridge): support disabled networks in swap deeplinks#28670
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR introduces several interconnected changes:
Tag selection rationale:
Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 b3efc14. Configure here.
app/core/DeeplinkManager/handlers/legacy/__tests__/handleSwapUrl.test.ts
Show resolved
Hide resolved
|
|
✅ E2E Fixture Validation — Schema is up to date |




Description
This fixes SWAPS-4336, where swap deeplinks targeting supported but disabled networks could fall back to the default Bridge pair and show an unexpected network-added toast. The deeplink flow now checks swap support first, enables already-known networks in the background, auto-adds supported missing EVM networks from
PopularList, and consumes one-shot toast suppression correctly so deeplink and Bridge token-selector adds stay silent while normal manual add/remove toasts still behave as expected.Changelog
CHANGELOG entry: Fixed swap deeplinks on supported disabled networks so the requested chain opens without an extra network-added toast.
Related issues
Refs: SWAPS-4336
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Changes deeplink-driven network enablement and auto-add behavior for Bridge/Swaps, which can affect navigation, network configuration state, and user-facing toasts. Risk is moderated by added unit tests, but failures could still cause incorrect chain selection or missing/extra notifications.
Overview
Fixes swap deeplinks so supported-but-disabled (or missing) source/dest chains are made available before
BridgeViewmounts, instead of falling back to default params.Adds one-shot suppression for network-added toasts via
networkToastSuppression, wiresMain's add/remove network toast logic throughshouldShowNetworkListToast, and uses the suppression when Bridge token selection or swap deeplinks auto-add EVM networks fromPopularList(clearing suppression on failures).Extends
handleSwapUrlto verify swap support (ALLOWED_BRIDGE_CHAIN_IDS), best-effort enable known chains, auto-add supported missing EVM networks, and drop unsupported/unavailable dest tokens; expands tests to cover these scenarios.Reviewed by Cursor Bugbot for commit b3efc14. Bugbot is set up for automated code reviews on this repo. Configure here.