Skip to content

Commit

Permalink
tidy: use keep with when expressions instead of filter and map expres…
Browse files Browse the repository at this point in the history
…sions
  • Loading branch information
seanstrom committed May 8, 2024
1 parent 4b754a6 commit 24e2f07
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@
(defn- parse-accounts
[given-accounts]
(->> given-accounts
(filter (fn [{:keys [path]}]
(not (string/starts-with? path constants/path-eip1581))))
(map (fn [{:keys [customization-color emoji name address]}]
{:account-props {:customization-color customization-color
:size 32
:emoji emoji
:type :default
:name name
:address address}
:networks []
:state :default
:action :none}))))
(keep (fn [{:keys [path customization-color emoji name address]}]
(when (not (string/starts-with? path constants/path-eip1581))
{:account-props {:customization-color customization-color
:size 32
:emoji emoji
:type :default
:name name
:address address}
:networks []
:state :default
:action :none})))))

(defn on-options-press
[{:keys [theme]
Expand Down

0 comments on commit 24e2f07

Please sign in to comment.