From 4103591fe169a96a6c2066b1c9b51c9ebeba8247 Mon Sep 17 00:00:00 2001 From: yenda Date: Tue, 21 May 2019 19:08:48 +0200 Subject: [PATCH] [fix] always show tokens that have a balance - temporary fix before visible assets are fixed - the problem is that you can't hide an asset with the way it currently works, it will come back every time as long as there is a balance for it Signed-off-by: yenda --- src/status_im/wallet/core.cljs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/status_im/wallet/core.cljs b/src/status_im/wallet/core.cljs index 27fb8a1d04..afd1e8a022 100644 --- a/src/status_im/wallet/core.cljs +++ b/src/status_im/wallet/core.cljs @@ -383,8 +383,7 @@ chain (ethereum/chain-keyword db) assets (get-in settings [:wallet :visible-tokens chain]) tokens (->> (tokens/tokens-for all-tokens chain) - (remove #(or (:hidden? %))) - (filter #((or assets identity) (:symbol %))))] + (remove #(or (:hidden? %))))] (when (not= network-status :offline) (fx/merge cofx @@ -400,10 +399,11 @@ :tokens tokens :on-success (fn [symbol balance] - (if assets + (if (and assets + (assets symbol)) (re-frame/dispatch [:wallet.callback/update-token-balance-success symbol balance]) - ;; NOTE: when there is no visible assets set, + ;; NOTE: when there it is not a visible assets ;; we make an initialization round (when (> balance 0) (re-frame/dispatch