reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.83k stars 1.36k forks source link

[bug] Web3Modal + Wagmi : zkSync's EIP712 paymaster transactions are not supported on mobile #2035

Open NilsDelage opened 6 months ago

NilsDelage commented 6 months ago

Link to minimal reproducible example

https://github.com/NilsDelage/tests-paymaster-w3m-wevm

Summary

Steps to reproduce:

Additionally, different mobile wallets, throw different errors:

{context: 'client'}context: "client"[[Prototype]]: Object 'Missing or invalid. request() method: eth_sendRawTransaction'
page.tsx:77 error TransactionExecutionError: An unknown RPC error occurred.
 '{"code":-32603,"message":"Internal JSON-RPC error.","data":{"code":-32600,"message":"Invalid request"}}'
 page.tsx:77 error TransactionExecutionError: User rejected the request.

We extend Wagmi's wallet client with Viem's eip712WalletActions to propose those sponsored transactions.

List of related npm package versions

"@web3modal/wagmi": "^4.0.13",
"viem": "^2.7.20",
"wagmi": "^2.5.7",
"@tanstack/react-query": "^5.25.0"
glitch-txs commented 3 months ago

Hi, are you still experiencing this issue in the latest version of Wagmi and Web3Modal?

NilsDelage commented 3 months ago

Hi, the metamask mobile version is now working when using the internal browser, but not working through wallet connect. In fact, it seems that this is the issue, all connections using wallet-connect are not able to handle paymaster transactions. You can test the example with several wallets at https://tests-paymaster-w3m-wevm.vercel.app/

glitch-txs commented 3 months ago

cc @Sam-Newman