We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e06ff40 commit 2958ccaCopy full SHA for 2958cca
src/status_im2/contexts/add_new_contact/events.cljs
@@ -175,8 +175,11 @@
175
(let [contact (get-in db [:contacts/new-identity])]
176
(when (= (:input contact) input)
177
(let [state (cond
178
- (or (string/includes? (:message err) "fallback failed")
179
- (string/includes? (:message err) "no such host"))
+ (and (string? err) (string/includes? err "invalid public key"))
+ {: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")))
183
{:state :invalid :msg :t/lost-connection}
184
:else {:state :invalid})]
185
{:db (assoc db :contacts/new-identity (merge contact state))}))))
0 commit comments