Hi there,
I have a question about await in my .js code. When I create a gen0 kitty, in the browser console I first get the err message and after a few seconds when the instance gets the txHash back, it shows me the alert message. Should I implement “await” here, and if so, what’s the best way to properly do it? Thank you so much!!
function createCat(){
var dnaStr = getDna();
instance.methods.createCatGen0(dnaStr).send({}, function(error, txHash){
if (err)
console.log(err);
else
console.log(txHash);
})
}