Skip to content

Commit

Permalink
rewrite not-in-progress-names
Browse files Browse the repository at this point in the history
  • Loading branch information
qfrank committed Aug 28, 2023
1 parent a2e914c commit ffdcd3d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/status_im2/subs/ens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,11 @@
:<- [:ens/preferred-name]
:<- [:ens/registrations]
(fn [[names multiaccount preferred-name registrations]]
(let [names (keys names)
in-progress-names (reduce (fn [acc {:keys [username custom-domain?]}]
(let [not-in-progress-names (reduce (fn [acc {:keys [username custom-domain?]}]
(let [full-name (ens/fullname custom-domain? username)]
(conj acc full-name)))
#{}
(vals registrations))
not-in-progress-names (remove #(contains? in-progress-names %) names)]
(remove #(= % full-name) acc)))
(keys names)
(vals registrations))]
{:names not-in-progress-names
:profile/profile multiaccount
:preferred-name preferred-name
Expand Down

0 comments on commit ffdcd3d

Please sign in to comment.