Uniswap / Uniswap/interface

Show a UI error message when estimateGas fails

Open
#3,757 2 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
Sealance has built a wrapped token that's permissioned. If someone has a wrapped token or tries to buy a wrapped token (and isn't allowed to per their rules), estimateGas silently fails and metamask never pops up.

I can imagine this could happen in other scenarios as well because we are simulating the txn on a node but never showing why it fails.

Expected Behavior
When estimateGas fails, we need to show a message in the UX. The reasons could vary so not sure what message we could give or could pass through to the user. Would be cool if there is a link to the simulated txn for advanced users.

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

No files or tests are named. Start by locating the estimateGas handling and the transaction flow in the interface, then trace how failures currently affect the wallet prompt. Done means an estimateGas failure produces a visible UX message before or instead of the wallet prompt, with the treatment of simulation details resolved.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.