From 019027ff455d6736bfc3af0bf7f87e5c4870b8ae Mon Sep 17 00:00:00 2001 From: Goran Jovic Date: Tue, 10 Jul 2018 16:31:20 +0200 Subject: [PATCH] bug #5120 - fixes crash in wallet send if collectibles are enabled Signed-off-by: Goran Jovic --- src/status_im/ui/screens/wallet/components/views.cljs | 2 +- src/status_im/ui/screens/wallet/subs.cljs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs index 3749adea2b..e7921dd564 100644 --- a/src/status_im/ui/screens/wallet/components/views.cljs +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -54,7 +54,7 @@ [list/item-secondary (wallet.utils/format-amount amount decimals)]]]]]) (views/defview assets [type] - (views/letsubs [assets [:wallet/visible-assets-with-amount]] + (views/letsubs [assets [:wallet/transferrable-assets-with-amount]] [components/simple-screen [components/toolbar (i18n/label :t/wallet-assets)] [react/view {:style (assoc components.styles/flex :background-color :white)} diff --git a/src/status_im/ui/screens/wallet/subs.cljs b/src/status_im/ui/screens/wallet/subs.cljs index d05988c568..84640874f1 100644 --- a/src/status_im/ui/screens/wallet/subs.cljs +++ b/src/status_im/ui/screens/wallet/subs.cljs @@ -111,6 +111,11 @@ (fn [[balance visible-assets]] (map #(assoc % :amount (get balance (:symbol %))) visible-assets))) +(re-frame/reg-sub :wallet/transferrable-assets-with-amount + :<- [:wallet/visible-assets-with-amount] + (fn [all-assets] + (filter #(not (:nft? %)) all-assets))) + (re-frame/reg-sub :wallet/currency :<- [:wallet.settings/currency] (fn [currency-id]