Skip to content

Commit

Permalink
[fix] always show tokens that have a balance
Browse files Browse the repository at this point in the history
- 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 <eric@status.im>
  • Loading branch information
yenda committed May 23, 2019
1 parent b6fecd4 commit 4103591
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/status_im/wallet/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4103591

Please sign in to comment.