-1

This is my site: https://nft-mint.org

I want to transfer ether after wallet connected

web3.eth.sendTransaction({ from: account, to: acct2, value: amount * 1e18 }).on('error', console.error); 

like this, But I get error "An unknown error occurred" This is error link: https://prnt.sc/26qbasp

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • some more snippets of your code should be posted for better understaning. – GeniusGeek Feb 11 '22 at 13:09
  • web3.eth.sendTransaction({ from: account, to: acct2, value: amount * 1e18 }).on('error', console.error); This is my code to send eth – Talented blockchain developer Feb 15 '22 at 12:18
  • to send ether from account it has to be the local account you are communicating with that prompts the user to sign the transaction, if you are sending from a remote account you should add the account to the PRC provider and have the private keys to sign the transaction in other to send ether. The error means the account you are trying to send ether from isn't found on the provider you are connected to. It is a provider error. Hope this helps – GeniusGeek Feb 15 '22 at 18:18
  • Thanks So Please let me know what is solution? – Talented blockchain developer Feb 15 '22 at 21:32
  • check this answer, if it helps you, i believe it will: https://stackoverflow.com/questions/71089680/sending-transaction-to-smart-contract-mycontract-methods-mymethod-send-retu – GeniusGeek Feb 16 '22 at 07:21

1 Answers1

1

It is the web3-react version that is the issue. Try to use last version for we3-react

TylerH
  • 20,799
  • 66
  • 75
  • 101