fix accounts shown as disabled when asset is long-tapped if default account is empty
Signed-off-by: Brian Sztamfater <brian@status.im>
This commit is contained in:
parent
80bab0f976
commit
220798511b
|
@ -547,13 +547,16 @@
|
|||
|
||||
(rf/reg-sub
|
||||
:wallet/token-by-symbol
|
||||
:<- [:wallet/current-viewing-account-or-default]
|
||||
:<- [:wallet/accounts]
|
||||
:<- [:wallet/network-details]
|
||||
(fn [[{:keys [tokens]} networks] [_ token-symbol chain-ids]]
|
||||
(fn [[accounts networks] [_ token-symbol chain-ids]]
|
||||
(some
|
||||
(fn [{:keys [tokens]}]
|
||||
(->> (utils/tokens-with-balance tokens networks chain-ids)
|
||||
(filter #(= (string/lower-case (:symbol %))
|
||||
(string/lower-case token-symbol)))
|
||||
first)))
|
||||
first))
|
||||
accounts)))
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/accounts-without-current-viewing-account
|
||||
|
|
Loading…
Reference in New Issue