Uniswap / Uniswap/interface

It always displays a "swap failed" popup when performing a swap with smart wallet like loopring wallet and ambire wallet.

Open
#6,859 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.
It always displays a "swap failed" popup when performing a swap with smart wallet like loopring wallet and ambire wallet.
paste (5)
The reason is that uniswap checks swap data with data fetched from chain by hash.
Following is the code check if data are same

if (tx.data !== response.data) {
  sendAnalyticsEvent(SwapEventName.SWAP_MODIFIED_IN_WALLET, {
    txHash: response.hash,
    ...analyticsContext,
  })
  throw new ModifiedSwapError()
}

Describe the solution you'd like
Add whitelist for smart wallets.

Describe alternatives you've considered
Don't check swap data with data fetched from chain.

Additional context
Add any other context or screenshots about the feature request here.

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 tracing the swap path containing the tx.data and response.data comparison and the ModifiedSwapError that triggers the popup. Determine how smart wallets such as Loopring Wallet and Ambire Wallet are identified; done means their valid swaps no longer show a failure popup while modified-swap detection remains effective.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Feature
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.