Smart contract wallet transactions marked as dangerous (connected via WalletConnect)
Nobody has claimed this yet.
- 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
- 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)
- Make a swap transaction
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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