Cannot eth_signTypedData with WalletConnect V2 and MetaMask

Could someone point to the problem. I am trying to use MetaMask v7.3.0 via WalletConnect v2 to sign data. Code is simple:

import { EthereumProvider } from “@walletconnect/ethereum-provider”;

if (!provider) {
provider = await EthereumProvider.init({
projectId: WC_PROJECT_ID,
showQrModal: true,
qrModalOptions: { themeMode: “light” },
chains: [chainId],
methods: [“eth_sendTransaction”, “eth_signTypedData”],
events: [“chainChanged”, “accountsChanged”],
metadata: {
name: “XXX”,
description: “XXX”,
url: “xxx”,
icons: [‘xxx.png’],
},
});
provider.on(“connect”, () => {
let signer = provider.accounts[0];
let res = await provider.request({
method: “eth_signTypedData”,
params: [signer, data]
});
});
}
provider.connect();

This code works with Trust wallet and Rainbow wallet, but with MetaMask it connects a wallet, so I receive address of teh wallet but on the sign request just waits for several minutes and then errors out.

Does anyone sucesesefuuly sign data with walletconnect v2 and MetaMask?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.