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

Make fungible asset values to support exponent (minor units) #944

Closed
dahlia opened this issue Aug 3, 2020 · 1 comment · Fixed by #954
Closed

Make fungible asset values to support exponent (minor units) #944

dahlia opened this issue Aug 3, 2020 · 1 comment · Fixed by #954
Assignees
Labels
storage Related to storage (Libplanet.Store) suggestion Suggestion or feature request

Comments

@dahlia
Copy link
Contributor

dahlia commented Aug 3, 2020

In order to support minor currency units (i.e., exponent), fungible asset values should be represented as Decimal instead of BigInteger.

@dahlia dahlia added suggestion Suggestion or feature request storage Related to storage (Libplanet.Store) labels Aug 3, 2020
@dahlia dahlia changed the title Change the fungible asset value representation to Decimal from BigInteger Represent fungible asset values as Decimal instead of BigInteger Aug 3, 2020
@dahlia dahlia changed the title Represent fungible asset values as Decimal instead of BigInteger Make fungible asset values to support exponent (minor units) Aug 3, 2020
@dahlia
Copy link
Contributor Author

dahlia commented Aug 3, 2020

.NET's Decimal apparently does not support arbitrary precision… It might be better to define our own type (say AssetValue) which consists of two fields (BigInteger & scale).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage Related to storage (Libplanet.Store) suggestion Suggestion or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant