Transaction Status error message is blank using WalletConnect
Hello. I've ben able to get WalletConnect adapter connecting after following a few examples. The problem I'm having is that useContractFunction doesn't seem to catch and populate the errors on TransactionStatus correctly. I've been using TransactionStatus in a useEffect hook to notify if the transaction fails/errors/suceeded. It's working perfectly fine with Metamask, but when using WalletConnect it comes back without any of the error details.
2nd console.log here is from when using WalletConnect as the Connection.
I can confirm I'm getting back the same error message from WalletConnect's RPC call, however it's not making its way to TransactionStatus. I'm trying to trace this on my own as well but figured I'd open a ticket.
I've narrowed this down to usePromiseTransaction expecting an error object, but it seems that we're only getting a string from WalletConnect. I'm not sure if this is a problem with the connector or if we should just use the error message itself in usePromiseTransaction when it's not an error object. I really thought Typescript was supposed to save us from these types of problems haha.
https://github.com/EthWorks/useDApp/blob/be1875b4f70523b79f8724ce57611fc470db2570/packages/core/src/hooks/usePromiseTransaction.ts#L29
With Metamask:
With WalletConnect:
Edit:
I traced it far enough in WalletConnect that JsonRpc-http-connection#send is where the payload is returned, but despite it being an error the response code is 200. This does bubble up as an error so at some point they raise an exception but it's not wrapped in an error object.
I'm using WalletConnect 1.6.1 because that's the only version supported by web3-react. I will continue digging as I need this fixed.
@jhirn how far did you go with this? also, how did you make it activate?
I followed this codepen by the author of react-web3 to get it to activate. https://codesandbox.io/s/8rg3h
I have not made any progress on this error but I'm guessing I'll have to fork and fix. Not a lot of activity for fixing bugs on this or react-web3.
I have tested it out on useDApp 1.1.5 and WalletConnect
I have been testing it in our WalletConnect docs page, adding an erroring transaction.
I'm connecting MetaMask mobile on iOS through Wallet Connect.
We use @walletconnect/web3-provider version 1.7.5.
Seems to be working properly, and the error is actually an error object in usePromiseTransaction:

And, the Transaction State is properly populated with the error message:
