Skip to content

Fix cryptoLocked url param#1083

Merged
Sharqiewicz merged 2 commits into
stagingfrom
fix/cryptoLocked-url-param
Feb 23, 2026
Merged

Fix cryptoLocked url param#1083
Sharqiewicz merged 2 commits into
stagingfrom
fix/cryptoLocked-url-param

Conversation

@Sharqiewicz
Copy link
Copy Markdown
Member

The Problem

When a user lands on a URL with a non-default EVM token (e.g. ?cryptoLocked=AAVE&network=base),
two things go wrong during the 1-2s it takes SquidRouter to load token configs:

  • Race condition - URL gets overwritten with the wrong token useSyncFormToUrl runs immediately on mount.
    The Zustand store still holds the default token (USDC), so it writes cryptoLocked=USDC into the URL

  • Token button flashes the wrong(default) token name
    Even after the URL fix, the store still holds USDC during that loading window, so AssetButton renders "USDC" for 1–2s before switching to the intended token

Solution

  • findOnChainToken now returns undefined on EVM networks until evmTokensLoaded is true
  • useSyncFormToUrl now preserves the URL's existing cryptoLocked value during the loading window instead of overwriting it with the store default (navigate({ search: prev => ...}))
  • added loading skeleton styles for the asset buttons during fetching dynamic tokens

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 23, 2026

Deploy Preview for vortexfi ready!

Name Link
🔨 Latest commit d1d01df
🔍 Latest deploy log https://app.netlify.com/projects/vortexfi/deploys/699c55a819e0b400087be0ec
😎 Deploy Preview https://deploy-preview-1083--vortexfi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 23, 2026

Deploy Preview for vortex-sandbox ready!

Name Link
🔨 Latest commit d1d01df
🔍 Latest deploy log https://app.netlify.com/projects/vortex-sandbox/deploys/699c55a82e595e000833fc6d
😎 Deploy Preview https://deploy-preview-1083--vortex-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Sharqiewicz Sharqiewicz merged commit 38ef6a5 into staging Feb 23, 2026
5 checks passed
@ebma ebma deleted the fix/cryptoLocked-url-param branch February 23, 2026 16:21
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.

3 participants