Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK: New BigInt types with conversion to decimal and integers #15

Open
sophialittlejohn opened this issue Oct 29, 2024 · 0 comments
Open
Assignees
Labels

Comments

@sophialittlejohn
Copy link
Collaborator

Create extractions of BigInt that allows parsing to number and decimal and that uses BigInt under the hood (instead of BN.js).

Previously:

  • CurrencyBalance
  • TokenBalance (very similar to CurrencyBalance, check if we can improve naming to only use one or the other)
  • Rate (27 decimals)
  • Perquintill (mark as deprecated since it's only polkadot)
  • Price

Tasks

  • copy over logic from BN.ts but implement without BN.js library
  • make classes only used in Polkadot context as deprecated
  • when basic math is done on class it should return a new instance of the class to preserve types and methods (unlike currently when math is done on CurrencyBalance.add returns BN instead of CurrencyBalance).
@sophialittlejohn sophialittlejohn self-assigned this Oct 29, 2024
@sophialittlejohn sophialittlejohn transferred this issue from centrifuge/apps Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant