From e419978aec1a74360e3dcdb108b21c80bd74af34 Mon Sep 17 00:00:00 2001 From: Sean Hagstrom Date: Thu, 9 May 2024 14:13:09 +0100 Subject: [PATCH] tidy: use subscription for building account-props --- src/status_im/subs/wallet/wallet.cljs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/status_im/subs/wallet/wallet.cljs b/src/status_im/subs/wallet/wallet.cljs index d89cf853ae83..947ba91d102e 100644 --- a/src/status_im/subs/wallet/wallet.cljs +++ b/src/status_im/subs/wallet/wallet.cljs @@ -187,6 +187,24 @@ :name name :accounts (format-settings-keypair-accounts accounts format-options)}))))) +(rf/reg-sub + :wallet/quo-keypairs-accounts + :<- [:wallet/keypairs] + (fn [keypairs] + (->> keypairs + (map (fn [{:keys [accounts name] + :as keypair}] + {:name name + :accounts (->> accounts + (keep (fn [{:keys [path customization-color emoji name address]}] + (when (not (string/starts-with? path constants/path-eip1581)) + {:customization-color customization-color + :size 32 + :emoji emoji + :type :default + :name name + :address address}))))}))))) + (rf/reg-sub :wallet/derivation-path-state :<- [:wallet/create-account]