The quantity expressed as atomic units.
Convert to whole and fractional part using const whole = amount.quantity.slice(0, -amount.fractionalDigits); const fractional = amount.quantity.slice(-amount.fractionalDigits); or to a floating point approximation (not safe!) const approx = whole + fractional / 10**amount.fractionalDigits
Generated using TypeDoc
The number of fractional digits the token supports.
A quantity is expressed as atomic units. 10^fractionalDigits of those atomic units make up 1 token.
E.g. in Ethereum 10^18 wei are 1 ETH and from the quantity 123000000000000000000 the last 18 digits are the fractional part and the rest the wole part.