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))
(money/crypto->fiat price)
.toNumber))
(+ acc (or (some-> (money/internal->formatted value symbol (token->decimals symbol))
(money/crypto->fiat price)
.toNumber)
0))
acc)) 0 balance))
(re-frame/reg-sub
@ -1630,4 +1631,4 @@
:<- [:chats/active-chats]
:<- [:search/filter]
(fn [[chats search-filter]]
(apply-filter search-filter chats extract-chat-attributes)))
(apply-filter search-filter chats extract-chat-attributes)))