zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / kotlin.Long / convertZatoshiToZecString

convertZatoshiToZecString

fun Long?.convertZatoshiToZecString(maxDecimals: Int = ZEC_FORMATTER.maximumFractionDigits, minDecimals: Int = ZEC_FORMATTER.minimumFractionDigits): String

Format a Zatoshi value into ZEC with the given number of digits, represented as a string. Start with Zatoshi -> End with ZEC.

Parameters

maxDecimals - the number of decimal places to use in the format. Default is 6 because ZEC is better than USD.

minDecimals - the minimum number of digits to allow to the right of the decimal.

Return
this Zatoshi value represented as ZEC, in a string with at least minDecimals and at most maxDecimals