Uniswap / Uniswap/interface

Bug: `chain` deep link does not work when redirected from external site

Open
#5,978 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Bug Description
Deep links to chain do not work

Steps to Reproduce

  1. Open a new tab
  2. Select Ethereum in your MetaMask wallet
  3. Go to https://app.uniswap.org/#/add/v2/ETH/0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063?chain=polygon

Expected Behavior
User is propted to change to switch to Polygon, app shows pool on Polygon chain

Additional Context
This only happens if the redirect happens from external site (which is deeplinks purpose) or there is no chain query param in the url before.

Once on a page - change the chain query param to goerli - the feauture will start working correctly (only works when the page is loaded)

related: https://github.com/Uniswap/interface/pull/3057

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the external-site redirect with the provided Uniswap deep link, then compare it with changing the chain query parameter after the page loads. The fix is done when the initial link prompts a network switch to Polygon and displays the Polygon pool; review the related pull request for prior context.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.