• A utility function to truncate an amount to some max decimal

    This is useful for things like the TokenBridge, where we want to truncate the amount to represent a maximum of 8 decimals

    Parameters

    • amount: amount.Amount

      the Amount to truncate

    • maxDecimals: number

      the max number of decimals we want to keep, zeroing out the rest

    Returns amount.Amount

    the truncated Amount

Generated using TypeDoc