Fix crash on switching to Ropsten (dev mode)

This commit is contained in:
Roman Volosovskyi 2019-05-04 20:59:01 +03:00
parent 545eb513ff
commit 33621aec7c
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 5 additions and 4 deletions

View File

@ -939,9 +939,10 @@
(defn- get-balance-total-value [balance prices currency token->decimals]
(reduce-kv (fn [acc symbol value]
(if-let [price (get-in prices [symbol currency :price])]
(+ acc (-> (money/internal->formatted value symbol (token->decimals symbol))
(+ acc (or (some-> (money/internal->formatted value symbol (token->decimals symbol))
(money/crypto->fiat price)
.toNumber))
.toNumber)
0))
acc)) 0 balance))
(re-frame/reg-sub