apibara / starknet-react

A collection of React providers and hooks for StarkNet
https://starknet-react.com
MIT License
364 stars 141 forks source link

fix: use BigInt for calcs in useBalance #407

Closed notV4l closed 7 months ago

notV4l commented 7 months ago

-avoid weird js rounding error like this one 😢 :

(25000000000000000000000000000 / 10**18).toString()  ---> '24999999999.999996'

-avoid overflow if balanceOf too big for number

netlify[bot] commented 7 months ago

Deploy Preview for starknet-react ready!

Name Link
Latest commit b94181a1cefd5da757f0ede6a680cf9db6193c58
Latest deploy log https://app.netlify.com/sites/starknet-react/deploys/65e7943eaab5860008da86db
Deploy Preview https://deploy-preview-407--starknet-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

notV4l commented 7 months ago

not the right solution