Releases: aragon/token-amount
Releases · aragon/token-amount
TokenAmount 0.3.0
This is the first release of TokenAmount ported to TypeScript by @andy-hook ❤️. The API is the same as 0.2.0.
TokenAmount v0.2.0
This new release adds a new feature: converting between rates! 💰→💸
Convert
The function is convert(rate, targetDecimals, options)
. It converts from a rate, returning a new TokenAmount instance with the desired decimals and set options. The conversion rate is expressed as the amount of the output token obtained per unit of the input token. We include an example on the README, and we've added tests to make sure it's bulletproof (It's all bignumbers
internally).
Related PR: #7.