Skip to content

Commit 2958cca

Browse files
committed
fix(add-contact): handle compress pubkey error from status-go
1 parent e06ff40 commit 2958cca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/status_im2/contexts/add_new_contact/events.cljs

+5-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,11 @@
175175
(let [contact (get-in db [:contacts/new-identity])]
176176
(when (= (:input contact) input)
177177
(let [state (cond
178-
(or (string/includes? (:message err) "fallback failed")
179-
(string/includes? (:message err) "no such host"))
178+
(and (string? err) (string/includes? err "invalid public key"))
179+
{:state :invalid :msg :t/not-a-chatkey}
180+
(and (string? (:message err))
181+
(or (string/includes? (:message err) "fallback failed")
182+
(string/includes? (:message err) "no such host")))
180183
{:state :invalid :msg :t/lost-connection}
181184
:else {:state :invalid})]
182185
{:db (assoc db :contacts/new-identity (merge contact state))}))))

0 commit comments

Comments
 (0)