From 1010dedca9b0a5c431d9e5296a78a51036decee3 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Fri, 5 May 2017 16:05:26 +0300 Subject: [PATCH] fix #1173 --- src/status_im/contacts/handlers.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/contacts/handlers.cljs b/src/status_im/contacts/handlers.cljs index a5c84b575d..0bf358d104 100644 --- a/src/status_im/contacts/handlers.cljs +++ b/src/status_im/contacts/handlers.cljs @@ -271,7 +271,7 @@ (defn add-new-contact [db [_ {:keys [whisper-identity] :as contact}]] (-> db - (update :contacts assoc whisper-identity contact) + (update-in [:contacts whisper-identity] merge contact) (assoc :new-contact-identity ""))) (register-handler :add-new-contact @@ -297,7 +297,8 @@ (let [contact (if-let [contact-info (get-in chats [chat-id :contact-info])] (read-string contact-info) (assoc (get contacts chat-id) :pending? false)) - contact' (assoc contact :address (public-key->address chat-id))] + contact' (assoc contact :address (public-key->address chat-id) + :pending? false)] (dispatch [::prepare-contact contact']) (dispatch [:watch-contact contact']) (dispatch [:discoveries-send-portions chat-id])))))