web3.eth.sendTransaction({from:myAddress,to:contractAddress,value:payValue,data: getData.encodeABI(),gas: null, gasPrice: null, maxFeePerGas: null, maxPriorityFeePerGas: null },
function(err, transactionHash) {
if (!err){
console.log(err);
donext(transactionHash);
}
else{
console.log(err);
swal("Oops!", "Transaction aborted. User denied transaction signature.", "error");
}
});"
I am just sending some eth to smart contract but I am getting
{code: -32602, message: "'from' is not authorized to send transactions"} ..how to fix this? Thanks
Feb 8, 2022, 6:01 AM