Function convertAmountFromOnChainToHumanReadable

Amount is represented in the smallest unit format on chain, this function converts the smallest unit format to a human-readable amount format

human-readable amount format: 500
on chain amount format when decimal is 8: 50000000000
  • Parameters

    • value: number

      The value in human-readable format

    • decimal: number

      The token decimal

    Returns number

    The value in the smallest units