WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.46k stars 713 forks source link

[@walletconnect/ethereum-provider V2] Gas sponsoring on ZKSyncEra network Intermittent Error: No matching key. on eth_sendTransaction requests #5493

Closed amedrontadora closed 1 day ago

amedrontadora commented 2 days ago

Describe the bug When using the Safe wallet to connect to WalletConnect on the ZkSync network and sending transaction with the ZYFI Gas Sponsoring feature, an error occurs when sending a transaction. The error message is "No matching key. history: 1731258865148435."

No matching key. history: 1731258865148435
    at Lt.getRecord (http://localhost:3000/static/js/defaultVendors-node_modules_wagmi_core_node_modules_walletconnect_sign-client_dist_index_es_js.chunk.js:6837:13)
    at Lt.get (http://localhost:3000/static/js/defaultVendors-node_modules_wagmi_core_node_modules_walletconnect_sign-client_dist_index_es_js.chunk.js:6776:20)
    at Ut.onRelayEventResponse (http://localhost:3000/static/js/defaultVendors-node_modules_wagmi_core_node_modules_walletconnect_sign-client_dist_index_es_js.chunk.js:6582:38)
    at EventEmitter.<anonymous> (http://localhost:3000/static/js/defaultVendors-node_modules_wagmi_core_node_modules_walletconnect_sign-client_dist_index_es_js.chunk.js:6719:147)

SDK Version (if relevant)

Dependent packages and versions

"@wagmi/connectors": "^3.1.11" "@web3modal/ethers5": "^5.1.11"

To Reproduce Steps to reproduce the behavior:

  1. Go to syncswap.xyz
  2. Click connect then click WalletConnect and copy pairing code
  3. Go to https://app.safe.global/ click WalletConnect paste pairing code
  4. Return to SyncSwap and click on the icon to the ETH token and balance display. In the pop-up window, select any token displayed as FREE; for this example, I will use USDC.
  5. Execute any swap. 6.An error will appear on console as described above: 'Missing or invalid request() method: eth_sendRawTransaction'.

Expected behavior Gas sponsoring with a Safe Wallet work well

Screenshots 14cd774d6cb48adfcd6ed60125076494

Desktop (please complete the following information):

linear[bot] commented 2 days ago

CR-569 [@walletconnect/ethereum-provider V2] Gas sponsoring on ZKSyncEra network Intermittent Error: No matching key. on eth_sendTransaction requests

arein commented 1 day ago

The error message says send raw transaction is not supported.

Unfortunately many wallets do not support that method. Clave wallet does. You should be able to intercept at connection time whether the wallet supports the RPC method.

More and more wallets are supporting ERC-7677 which is the EVM standard for gas sponsorship.