Skip to content

Releases: aragon/token-amount

TokenAmount 0.3.0

10 Dec 18:05
Compare
Choose a tag to compare

This is the first release of TokenAmount ported to TypeScript by @andy-hook ❤️. The API is the same as 0.2.0.

Related PRs: #9, #10.

TokenAmount v0.2.0

04 Sep 20:48
Compare
Choose a tag to compare

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.