Updated on 2026-08-14

This commit is contained in:
Tangem 2024-05-14 18:56:38 +05:00
parent 5797d26910
commit 0beda4cc81

View file

@ -11,6 +11,7 @@ import java.math.BigDecimal
import java.math.RoundingMode
private const val FIAT_DECIMALS = 2
private const val CRYPTO_FEE_DECIMALS = 6
private const val FEE_MINIMUM_VALUE = 0.01
internal fun getCryptoReference(amount: Amount?, isFeeApproximate: Boolean): TextReference? {
@ -21,7 +22,7 @@ internal fun getCryptoReference(amount: Amount?, isFeeApproximate: Boolean): Tex
BigDecimalFormatter.formatCryptoAmount(
cryptoAmount = amount.value,
cryptoCurrency = amount.currencySymbol,
decimals = amount.decimals,
decimals = amount.decimals.coerceAtMost(CRYPTO_FEE_DECIMALS),
),
),
)