[#21644] fix: display zero for empty balances asset (#21697)

This commit is contained in:
Mohsen 2024-11-29 08:42:37 +03:00 committed by GitHub
parent 4efb3c111a
commit 874f07bd77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,9 +266,10 @@
(defn fiat-formatted-for-ui
[currency-symbol fiat-value]
(if (money/less-than fiat-value 0.01)
(str "<" currency-symbol "0.01")
(prettify-balance currency-symbol fiat-value)))
(cond
(money/equal-to fiat-value 0) (str currency-symbol "0.00")
(money/less-than fiat-value 0.01) (str "<" currency-symbol "0.01")
:else (prettify-balance currency-symbol fiat-value)))
(defn prettify-percentage-change
"Returns unsigned precentage"