Ethereum Asked by Jiří Čechal on December 2, 2021
So I am trying to create a signature of a string, but I cannot do that, as I always get error stating MetaMask - RPC Error: Error: WalletMiddleware - Invalid "from" address.
(code: -32603). I am creating a message with window.web3.eth.sign(hash, userAddress)
function, where user address is response of window.ethereum.enable()
function.
Try
web3.eth.defaultAccount = userAddress;
to set the default account
Answered by Somnath on December 2, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP