Closed pravusjif closed 2 years ago
For now we use @decentraland/web3-provider and eth_signTypedData_v4
Hi, @pabloes can you share a repo and how to reproduce the issue? I need more context about the library versions, their usage, etc
The problem here is not about decentraland or wallet-connect, it's about wallets supporting RPC method "eth_signtypeddata_v4"
But this EIP-712 is not "Final", and only some wallets support it:
But not TrustWallet for example.
I liked its UX and seeing that metamask adopted it, I just used it also. The only we need to work as always is to still have access to the provider sendAsync method to be able to send "eth_signtypeddata_v4" RPC (or any other method allowing to send RPC to the provider), but EIP-712 signatures with walletconnect wallets not supporting it, won't work.
If something is broken in decentraland for us we will apply a migration, but it's working fine right now as always with the mentioned wallets, I always had in mind a migration in future btw.
a mistake in previous message, it is not that TrustWallet doesn't support eth_signtypeddata_v4, is that we have something wrong on our RPC message.
Thanks for all the info and testing on your side Pablo, so the problem lies in the usage of eth_signtypeddata_v4
method in the scene code (with @decentraland/web3-provider
library), as apparently if the RPC message hasn't been configured correctly then some wallets with wallet-connect (in this case TrustWallet) can have problems on their signing interactions.
This way of using that method in the marketplace should be a good example of how it should be used to work wallet-agnosticly: https://github.com/decentraland/marketplace-contracts/blob/d27b695e8006e70a5b7f245a57a13a5ec97f7ccf/test/helpers/metaTx.js#L68
Signing with Metamask:
Signing with Wallet Connect:
Even if we have that extra pop-up warning when being logged into Decentraland with Wallet Connect, the signing and transactions should all work regardless of the wallet.