- Preparing search index...
- The search index is not available
cardstack
Function applyRateToAmount
- applyRateToAmount(tokenRate: TokenPairRate, amount: BigNumber, invert?: boolean): BigNumber
-
Parameters
-
-
amount: BigNumber
-
invert: boolean = false
Returns BigNumber
Returns
an amount in the smallest units of output token
if invert false, amount is the value of tokenIn in the smallest units else amount is the value of tokenOut in the smallest units