Function bigIntToStringDecimal

  • Multiplies rawAmount by 10 ** -decimals and returns the result as a string without losing precision

    Parameters

    • rawAmount: number | bigint

      The integer value

    • decimals: number

      The amount of places to move the decimal point to the left by

    • trimTrailingZeros: boolean = false

      If true, the result won't have trailing zeros. e.g. "0.100000" becomes "0.1"

    Returns string

    The result represented as a string