fix: display value decimals instead of using exp notation
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
e6005dd7c8
commit
68fcc967a7
|
@ -157,7 +157,7 @@
|
||||||
(if (nil? to)
|
(if (nil? to)
|
||||||
{:contact {:name (i18n/label :t/new-contract)}}
|
{:contact {:name (i18n/label :t/new-contract)}}
|
||||||
(let [eth-value (when value (money/bignumber value))
|
(let [eth-value (when value (money/bignumber value))
|
||||||
eth-amount (when eth-value (money/to-number (money/wei->ether eth-value)))
|
eth-amount (when eth-value (money/to-fixed (money/wei->ether eth-value)))
|
||||||
token (get-transfer-token db to data)]
|
token (get-transfer-token db to data)]
|
||||||
(cond
|
(cond
|
||||||
(and eth-amount (or (not (zero? eth-amount)) (nil? data)))
|
(and eth-amount (or (not (zero? eth-amount)) (nil? data)))
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
[react/text {:style {:margin-bottom 2
|
[react/text {:style {:margin-bottom 2
|
||||||
:font-size 20
|
:font-size 20
|
||||||
:line-height 24}}
|
:line-height 24}}
|
||||||
(str amount " " (name symbol))]
|
(str (money/to-fixed amount) " " (name symbol))]
|
||||||
[react/text {:style {:font-size 12
|
[react/text {:style {:font-size 12
|
||||||
:line-height 16
|
:line-height 16
|
||||||
:color colors/gray}}
|
:color colors/gray}}
|
||||||
|
|
Loading…
Reference in New Issue