Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

web3 returns an object promise instead of number

// the problem is that you might have forgot to put "awat" in there

// code with the error:
async function () {
  let x = <so and so>;
  consol.log(x);
}

consol> [object promise]

// fix:
async function () {
  let x = await <so and so>;
  consol.log(x);
}
 
PREVIOUS NEXT
Tagged: #returns #object #promise #number
ADD COMMENT
Topic
Name
6+5 =