Uniswap / Uniswap/interface

First click won't work on Preview button

Open
#4,175 0 comments 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

First click won't work on Preview button.

Steps to Reproduce

  1. Make sure you connect to uniswap app site first
  2. Open https://app.uniswap.org/#/add/ETH/usdc/3000?chain=mainnet&minPrice=779.782250&maxPrice=3119.129000
  3. CleanShot 2022-07-23 at 18 36 31@2x
  4. CleanShot 2022-07-23 at 18 37 14@2x
  5. Now click the Preview button, it won't open the modal to add liquidity
  6. Now click the Preview button second time, it will open the modal now

Expected Behavior
Clicking Preview button the first time should open a modal.

Additional Context

Here's a related issue I found on React https://github.com/facebook/react/issues/4210, according to that issue, this bug seems to caused by onBlur here https://github.com/Uniswap/interface/blob/62550a4a1f5136654088f5b3f26ad42931bfcbbe/src/components/InputStepCounter/InputStepCounter.tsx#L114

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

Reproduce the issue at the linked Uniswap add-liquidity URL after connecting to the app. Start at src/components/InputStepCounter/InputStepCounter.tsx around line 114 and inspect the onBlur behavior in relation to the Preview button. Done means the first Preview click opens the add-liquidity modal.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.