safe-wallet-web icon indicating copy to clipboard operation
safe-wallet-web copied to clipboard

[WalletConnect v2] Can't create a Safe when optional namespaces are present

Open megakoko opened this issue 1 year ago • 4 comments

Bug description

We're using Gnosis Safe via Wallet Connect 2 and we're getting different errors after establishing the session with optional namespaces.

The session IS indeed established just fine after connecting the wallet. We're getting the errors below when trying to create the safe. We're not receiving any events from Gnosis, no transactions to sign. These errors pop up in the top right corner of the web page.

If we don't pass any optional namespaces then it's working just fine, we get the request to sign the transaction and the flow goes on.

Other DApps do work when optional namespaces are present in session connection request.

Below are some of the errors we get:

cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"code":-32000,"message":"gas required exceeds allowance (0)"}, method="estimateGas", transaction={"from":"0xE747f56CCf4f0A800CAaF5533FddAc776Ad14996","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0f79aa89c4"},"to":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","data":"0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000189fe7080420000000000000000000000000000000000000000000000000000000000000164b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000e747f56ccf4f0a800caaf5533fddac776ad14996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)
fee cap less than block base fee: address 0xeEE27662c2B8EBa3CD936A23F039F3189633e4C8, gasFeeCap: 63755909170 baseFee: 123855893013
insufficient funds for intrinsic transaction cost [ See: https://links.ethers.org/v5-errors-INSUFFICIENT_FUNDS ] (error={"code":-32000,"message":"insufficient funds for gas * price + value: address 0xeEE27662c2B8EBa3CD936A23F039F3189633e4C8 have 0 want 39915389360400000000"}, method="estimateGas", transaction={"from":"0xeEE27662c2B8EBa3CD936A23F039F3189633e4C8","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x0f7d3cd826"},"to":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","data":"0x1688f0b9000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000189fed54bb70000000000000000000000000000000000000000000000000000000000000164b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000f48f2b2d2a534e402487b3ee7c18c33aec0fe5e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000eee27662c2b8eba3cd936a23f039f3189633e4c8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","accessList":null}, code=INSUFFICIENT_FUNDS, version=providers/5.7.2)

Environment

  • Browser: Safari
  • Wallet: Tangem Wallet
  • Chain: Ethereum mainnet

Steps to reproduce

  • the user has several EVM chains on their main screen
  • go to https://app.safe.global/welcome
  • click "connect wallet"
  • choose "Wallet connect"
  • scan the QR code
  • start the connection
  • click "Create wallet" and go through the steps
  • the website says "There was an error. Please cancel the process or retry the transaction". With a popup in the top right corner displaying

Expected result

No error. Wallet is created.

Obtained result

Wallet not created. The website spews out one of the errors described in the description above.

This is only happening if we pass additional namespaces as "optional".

Screenshots

Screenshot 2023-09-01 at 11 09 59

megakoko avatar Sep 01 '23 08:09 megakoko