0

I have created a function to send Ethereum and it can run inside console.log. With a simple code call a function like this:

var sendEth = sendMoney(data).then(hash => { console.log(hash.transactionHash); }); //sendMoney is Function

And of course this is according to my expectations to display transactionHash as show image below :

Image Here

But my question is how can I make the variables that I sendEth it with a new variable named "var txID" ? I just want to take the transactionHash that is already running.

my hope is like this next : var txID = sendEth; << how can it be taken successfully ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.