sendCustomRequest gets stuck


#1

Hi,

I debugged in to the @walletconnect/web3-provider, and trying to understand why most of my web3 calls gets stuck. I modified its code locally like this to debug:

  engine.addProvider({
    setEngine: _ => _,
    handleRequest: async (payload, next, end) => {
      console.log("!!!! handleRequest payload", payload);
      const walletConnector = await engine.getWalletConnector()
      try {
       console.log("!!!! handleRequest sendCustomRequest");
        const result = await walletConnector.sendCustomRequest(payload)
        console.log("!!!! handleRequest result", result);
        end(null, result)
      } catch (error) {
        console.log("!!!! handleRequest error", error);
        end(error)
      }
    }
  })

What I have observed so far from the logs for a simple web3.eth.net.getId are:

!!! handleRequest payload {jsonrpc: "2.0", id: 2, method: "net_version", params: Array(0)}id: 2jsonrpc: "2.0"method: "net_version"params: []__proto__: Object
index.js?186b:161 
!!!! handleRequest sendCustomRequest

Actually it doesn’t work for any web3 jsonrpc for me.

I tested with both trust wallet and wallETH


#2

is the test-dapp you use public so I can try out what’s happening there?