Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.95k stars 5.02k forks source link

Missing or invalid. request() method: eth_sign #7086

Open micahalcorn opened 1 year ago

micahalcorn commented 1 year ago

Bug Description Clicking "Confirm swap" on https://app.uniswap.org/#/swap fails silently with Gnosis Safe connected via WalletConnect.

Screenshot 2023-08-04 at 1 00 11 PM

Steps to Reproduce

  1. Connect the Gnosis Safe mobile wallet to app.uniswap.org using WalletConnect.
  2. Enter any amount of OETH to swap for ETH.
  3. Approve the allowance.
  4. Click "Confirm swap".
  5. See uncaught error in the console.

Demo: https://www.loom.com/share/13fc327a58574e668c5d5e04b5641f76 ...

Expected Behavior The wallet should present a prompt for signing the swap transaction.

Additional Context It's possible that Safe + WalletConnect is not supported. I think 1inch requires me to use the Safe App within their web interface. Other dapps allow me to do what I'm attempting to do here.

woodenfurniture commented 1 year ago

Also seeing this attempting a trade of ERC20s after successful allowance approval on walletconnect v2: image

Native assets (ETH, AVAX) seems to be working fine.

woodenfurniture commented 1 year ago

Looking the in the source code, this may have been addressed previously: https://github.com/Uniswap/interface/blob/main/src/connection/WalletConnectV2.ts#L38

Some useful information that may assist in resolving this - use methods instead of optionalMethods: https://github.com/wagmi-dev/wagmi/discussions/2240#discussioncomment-6854104

Also noting that trustwallet was able to trade successfully via walletconnect so this seems wallet dependent.