mirror of
https://github.com/status-im/status-react.git
synced 2025-01-27 03:06:39 +00:00
Add :wallet/accounts-with-customization-color subscription (#18302)
This commit is contained in:
parent
0b4a1545ae
commit
bec51b7d0e
@ -36,10 +36,7 @@
|
||||
[]
|
||||
(let [{id :community-id} (rf/sub [:get-screen-params])
|
||||
{:keys [name color images]} (rf/sub [:communities/community id])
|
||||
accounts (->> (rf/sub [:wallet])
|
||||
:accounts
|
||||
vals
|
||||
(map #(assoc % :customization-color (:color %))))]
|
||||
accounts (rf/sub [:wallet/accounts-with-customization-color])]
|
||||
[rn/view {:style style/container}
|
||||
[quo/page-nav
|
||||
{:text-align :left
|
||||
|
@ -24,10 +24,7 @@
|
||||
[]
|
||||
(let [{id :community-id} (rf/sub [:get-screen-params])
|
||||
{:keys [name color images]} (rf/sub [:communities/community id])
|
||||
accounts (->> (rf/sub [:wallet])
|
||||
:accounts
|
||||
vals
|
||||
(map #(assoc % :customization-color (:color %))))]
|
||||
accounts (rf/sub [:wallet/accounts-with-customization-color])]
|
||||
[rn/safe-area-view {:style style/container}
|
||||
|
||||
[quo/drawer-top
|
||||
@ -42,7 +39,7 @@
|
||||
[rn/flat-list
|
||||
{:render-fn account-item
|
||||
:content-container-style {:padding 20}
|
||||
:key-fn :key-uid
|
||||
:key-fn :address
|
||||
:data accounts}]
|
||||
|
||||
[rn/view {:style style/buttons}
|
||||
|
@ -27,10 +27,7 @@
|
||||
(let [{id :community-id} (rf/sub [:get-screen-params])
|
||||
{:keys [name images color]} (rf/sub [:communities/community id])
|
||||
logo-uri (get-in images [:thumbnail :uri])
|
||||
accounts (->> (rf/sub [:wallet])
|
||||
:accounts
|
||||
vals
|
||||
(map #(assoc % :customization-color (:color %))))]
|
||||
accounts (rf/sub [:wallet/accounts-with-customization-color])]
|
||||
[:<>
|
||||
[quo/drawer-top
|
||||
{:type :context-tag
|
||||
|
@ -198,3 +198,11 @@
|
||||
(fn [[current-viewing-account network-details]]
|
||||
(let [network-preferences-names (:network-preferences-names current-viewing-account)]
|
||||
(filter #(contains? network-preferences-names (:network-name %)) network-details))))
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/accounts-with-customization-color
|
||||
:<- [:wallet/accounts]
|
||||
(fn [accounts]
|
||||
(map (fn [{:keys [color] :as account}]
|
||||
(assoc account :customization-color color))
|
||||
accounts)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user