fix showing twice word ETH
This commit is contained in:
parent
88326d4b56
commit
0ebd4fbd33
|
@ -123,7 +123,7 @@
|
||||||
[react/text {:style styles/asset-item-value
|
[react/text {:style styles/asset-item-value
|
||||||
:number-of-lines 1
|
:number-of-lines 1
|
||||||
:ellipsize-mode :tail}
|
:ellipsize-mode :tail}
|
||||||
(money/wei->str :eth amount)]
|
(money/to-fixed (money/wei-> :eth amount))]
|
||||||
[react/text {:style styles/asset-item-currency
|
[react/text {:style styles/asset-item-currency
|
||||||
:uppercase? true
|
:uppercase? true
|
||||||
:number-of-lines 1}
|
:number-of-lines 1}
|
||||||
|
|
|
@ -66,8 +66,11 @@
|
||||||
(defn wei-> [unit n]
|
(defn wei-> [unit n]
|
||||||
(.dividedBy (bignumber n) (eth-units unit)))
|
(.dividedBy (bignumber n) (eth-units unit)))
|
||||||
|
|
||||||
|
(defn to-fixed [bn]
|
||||||
|
(.toFixed bn))
|
||||||
|
|
||||||
(defn wei->str [unit n]
|
(defn wei->str [unit n]
|
||||||
(str (.toFixed (wei-> unit n)) " " (string/upper-case (name unit))))
|
(str (to-fixed (wei-> unit n)) " " (string/upper-case (name unit))))
|
||||||
|
|
||||||
(defn wei->ether [n]
|
(defn wei->ether [n]
|
||||||
(wei-> :eth n))
|
(wei-> :eth n))
|
||||||
|
|
Loading…
Reference in New Issue