I have this:
ethereum.request({
method: 'eth_sign',
params:
{
from: account, //this is the address
message: '0xfafa'
}
}).then(data => {
console.log("data ", data);
})
Seems like the error states: RPC Error: Invalid parameters: must provide an Ethereum address.
What's the right syntax to make it work ?
paramsshould be an array. In any case you can inject any web3 version in your project, you shouldn't depend on Metamask copy. – Ismael Mar 10 '21 at 02:52