<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 21:21:29 May 01, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

How correctly to use the method web3.eth.sendTransaction ?

Lena_RLena_R Member Posts: 2
I have the simple web-page for sending transactions: field, where user can print his wallet for sending ether for him from my personal wallet. Personal wallet and amount of ether (0.1 ether) are values in js-code.
Here my code placed - https://jsfiddle.net/LenaR/gf9fuhxL/
When I open this page I see the error in eb-console "web3.min.js:1 Uncaught TypeError: Cannot create property 'from' on string '0x0'" (errors of library web3.js which point to this string of my code: "var recAcc = web3.eth.sendTransaction(web3.toHex(receiverAccount));"

How to fix this all code and correctly use this method web3.eth.sendTransaction?
Sign In or Register to comment.