tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
440 stars 277 forks source link

Get confirmed balance of TRC20 #373

Closed samyan closed 1 year ago

samyan commented 1 year ago

Is it possible to get the confirmed balance of TRC20 from an address passing 'latest' as param to balanceOf ? I'm trying to do it but seems that param is just ignored.

trc20Contract.methods.balanceOf(address).call('latest')

There is anyway to do it?

unicornonea commented 1 year ago

please try trc20Contract.methods.balanceOf(address).call( {confirmed: true} )

samyan commented 1 year ago

please try trc20Contract.methods.balanceOf(address).call( {confirmed: true} )

You saved my day. Thank you!