Uniswap / Uniswap/interface

Smart contract wallet transactions marked as dangerous (connected via WalletConnect)

Open
#5,716 2 comments 1 reaction 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
Smart contract wallet transactions are marked as dangerous. (When a wallet is connected with WalletConnect)

Steps to Reproduce

  1. Connect with a smart contract wallet with WalletConnect (we want it to work for Chora smart contract wallet, but it's reproducible with other smart contract wallets like Ambire)
  2. Make a swap transaction
  3. Message "Your swap was modified through your wallet. If this was a mistake, please cancel immediately or risk losing your funds." shown.

Expected Behavior
No warning should be shown as it is a legitimate transaction.

Additional Context
The condition in this line, added on 15 Nov

calldata !== response.data

can't be satisfied if the transaction is proxied through a smart contract's method that takes the calldata payload as an argument. calldata would in this case be a part of response.data, but they won't be equal.

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 in src/lib/hooks/swap/useSendSwapTransaction.tsx at the condition around line 126, then trace how WalletConnect smart contract wallet transactions produce response.data. Reproduce the swap with a smart contract wallet such as Chora or Ambire and verify that a legitimate proxied transaction no longer shows the dangerous-transaction warning.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.