Uniswap / Uniswap/interface

gas estimation errors during liquidity addition aren't surfaced to the UI.

Open
#1,358 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug Description
When adding/removing liquidity or creating a pool, any errors with gas estimation (e.g., contract failures) will result in the user just getting a button that doesn't seem to work.

Steps to Reproduce

  1. Create and deploy a token that reverts on transfer.
    1. Try to add liquidity to Uniswap for that token.

Expected Behavior
Useful error message in the UI.

Additional Context
While the root cause of this is bugs in tokens, a large amount of time is spent troubleshooting that could be saved if the UI just surfaced the revert reason to the user.

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

The issue names no files or tests. Start by locating the UI flows for adding and removing liquidity and creating pools, then reproduce the failure with a token that reverts on transfer. Done means gas-estimation or contract-revert errors are surfaced as useful messages in the UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.