Skip to content

Commit

Permalink
tidy: use subscription for building account-props
Browse files Browse the repository at this point in the history
  • Loading branch information
seanstrom authored and mohsen-ghafouri committed May 10, 2024
1 parent 98a2ae4 commit e419978
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/status_im/subs/wallet/wallet.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit e419978

Please sign in to comment.