Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

balanceOfLinkedToken returns an overflown number #468

Closed
fvictorio opened this issue Feb 5, 2020 · 9 comments · Fixed by #469
Closed

balanceOfLinkedToken returns an overflown number #468

fvictorio opened this issue Feb 5, 2020 · 9 comments · Fixed by #469
Assignees
Labels
bug Something isn't working released

Comments

@fvictorio
Copy link

Expected Behaviour

balanceOfLinkedToken should return a BigNumber or string

Current Behaviour

balanceOfLinkedToken returns a javascript number, which may overflow

Possible Solution

I think the customary thing to do here is to return some instance of some big number library, but returning a string should work too.

Steps to Reproduce (for bugs)

  1. Create a zkAsset in Rinkeby with the address from the docs: const asset = await window.aztec.zkAsset('0x70c23EEC80A6387464Af55bD7Ee6C8dA273C4fb4');
  2. Mint a huge amount of the linked token (0x5B7825EA998Db74E7e43736D91459C1B0f0AdcA9). I did 10000000000000000000 (1E19)
  3. Call asset.balanceOfLinkedToken()

Your Environment

I used the aztec library from https://sdk.aztecprotocol.com/aztec.js

@joeandrews
Copy link
Contributor

Thanks for reporting this, @LeilaWang is looking into it. I think your solution of returning a BigNumber should be sufficient.

@joeandrews joeandrews added the bug Something isn't working label Feb 5, 2020
@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.19.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.5.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.7.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 0.17.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.18.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 2.4.0 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.3.2 🎉

Your semantic-release bot 📦🚀

@joeandrews
Copy link
Contributor

🎉 This issue has been resolved in version 1.1.4 🎉

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants