Updated on 2026-08-14
This commit is contained in:
parent
058a6ab4d5
commit
451fdc5e0b
37 changed files with 748 additions and 226 deletions
|
|
@ -13,12 +13,18 @@ fun getFiatReference(value: BigDecimal?, rate: BigDecimal?, appCurrency: AppCurr
|
|||
return stringReference(formattedFiat)
|
||||
}
|
||||
|
||||
fun getFiatString(value: BigDecimal?, rate: BigDecimal?, appCurrency: AppCurrency): String {
|
||||
fun getFiatString(
|
||||
value: BigDecimal?,
|
||||
rate: BigDecimal?,
|
||||
appCurrency: AppCurrency,
|
||||
approximate: Boolean = false,
|
||||
): String {
|
||||
if (value == null || rate == null) return EMPTY_BALANCE_SIGN
|
||||
val feeValue = value.multiply(rate)
|
||||
return BigDecimalFormatter.formatFiatAmount(
|
||||
fiatAmount = feeValue,
|
||||
fiatCurrencyCode = appCurrency.code,
|
||||
fiatCurrencySymbol = appCurrency.symbol,
|
||||
withApproximateSign = approximate,
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue