WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.74k stars 1.33k forks source link

[bug] Can't send transaction of Arbitrum when using email wallet (authConnector) #2429

Open aminhdev opened 3 weeks ago

aminhdev commented 3 weeks ago

Link to minimal reproducible example

https://lab.web3modal.com/library/wagmi-email/

Summary

When Im trying to execute a transaction in Arbitrum chain I got error as below

Here is example code for sending transaction

import { useSendTransaction } from 'wagmi'
import { parseEther } from 'viem'

function App() {
  const { sendTransaction } = useSendTransaction()

  return (
    <button
      onClick={() =>
        sendTransaction({
          to: '0x52De85e0E6e76FB7448a8aE8a08382Aa48cEEbC4',
          value: parseEther('0.00001'),
        })
      }
    >
      Send transaction
    </button>
  )
}

This is curl request

curl 'https://rpc.walletconnect.org/v1/?chainId=eip155:42161&projectId=<our-project-id>' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-GB-oxendict,en;q=0.9,vi;q=0.8' \
  -H 'content-type: application/json' \
  -H 'origin: https://auth.magic.link' \
  -H 'priority: u=1, i' \
  -H 'referer: https://auth.magic.link/' \
  -H 'sec-ch-ua: "Google Chrome";v="125", "Chromium";v="125", "Not.A/Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \
  --data-raw '{"jsonrpc":"2.0","id":"1","method":"eth_sendRawTransaction","params":["0x02f87282a4b1808459682f00845a995c008252089452de85e0e6e76fb7448a8ae8a08382aa48ceebc486082f79cd900080c080a0062a5be6fe2b99e56af970f66afa1104b2af93db62e84ed6dc5630c3f66ccfbda072290adee651a77750ae92c3d7bf13b7fc8072bc772f37249255cc47190d14d9"]}'

This is returned error

{
    "jsonrpc": "2.0",
    "id": "1",
    "error": {
        "code": -32000,
        "message": "intrinsic gas too low"
    }
}

Noted: I just want to confirm that the problem is already existed in Arbitrum chain when execute transaction using email wallet, I can execute transaction using email wallet in other chains normally (Ether, Optimism, BNB, Polylon)

List of related npm package versions

"@tanstack/react-query": "^4.2.1", "@web3modal/wagmi": "^4.2.3", "viem": "^2.13.1", "wagmi": "^2.9.8"

linear[bot] commented 3 weeks ago

APKT-627 [bug] Can't send transaction of Arbitrum when using email wallet (authConnector)