diff --git a/src/status_im/data_store/realm/contact_groups.cljs b/src/status_im/data_store/realm/contact_groups.cljs index bdf43f6936..07b57d5987 100644 --- a/src/status_im/data_store/realm/contact_groups.cljs +++ b/src/status_im/data_store/realm/contact_groups.cljs @@ -42,9 +42,7 @@ (defn- save-contacts [identities contacts] (doseq [contact-identity identities] - (if-let [contact (.find contacts (fn [object _ _] - (= contact-identity (aget object "identity"))))] - (.push contacts (clj->js {:identity contact-identity}))))) + (.push contacts (clj->js {:identity contact-identity})))) (defn add-contacts [group-id identities] diff --git a/src/status_im/new_group/handlers.cljs b/src/status_im/new_group/handlers.cljs index 499ca6fa21..b62e27f7e2 100644 --- a/src/status_im/new_group/handlers.cljs +++ b/src/status_im/new_group/handlers.cljs @@ -284,7 +284,7 @@ (fn [db [_ new-groups]] (-> db (update :contact-groups merge (map #(vector (:group-id %) %) new-groups)) - (assoc db :new-groups new-groups)))) + (assoc :new-groups new-groups)))) (register-handler :save-group-order (u/side-effect! @@ -317,7 +317,7 @@ (defn add-selected-contacts-to-group [{:keys [selected-contacts contact-groups contact-group-id] :as db} _] (let [new-identities (mapv #(hash-map :identity %) selected-contacts)] - (update db [:contact-groups contact-group-id :contacts] concat new-identities))) + (update-in db [:contact-groups contact-group-id :contacts] concat new-identities))) (defn add-selected-contacts-to-group! [{:keys [contact-group-id selected-contacts]} _]