Strange thing happens with .toNumber
function. It works well for account balance, but not for rate / endTime. I can't understand why, because balance is BigNumber and rate property is BigNumber (you can see screenshot). Has anyone similar issue and how it needs to be solved?
I use Truffle 4 + VS Code.
Web3.js .toNumber Error – Solving Function Issues
web3js
Best Answer
Account balance returns BigNumber.
call
s actually return a Promise.If you do something like this, you should get the result in the console: