mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-30 02:15:40 +00:00
[#13059] 'Cannot read property' error on scanning invalid key
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
4bf393ec3d
commit
dc8cbcde56
@ -69,14 +69,15 @@
|
||||
|
||||
(defn match-contact-async
|
||||
[chain {:keys [user-id]} callback]
|
||||
(let [valid-key (and (spec/valid? :global/public-key user-id)
|
||||
(not= user-id ens/default-key))]
|
||||
(let [valid-key (and (spec/valid? :global/public-key user-id)
|
||||
(not= user-id ens/default-key))]
|
||||
(cond
|
||||
(and valid-key)
|
||||
(callback {:type :contact
|
||||
:public-key user-id})
|
||||
|
||||
(and (not valid-key) (string? user-id))
|
||||
(and (not valid-key) (string? user-id) (not (string/blank? user-id))
|
||||
(not= user-id "0x"))
|
||||
(let [registry (get ens/ens-registries chain)
|
||||
ens-name (resolver/ens-name-parse user-id)
|
||||
on-success #(match-contact-async chain {:user-id %} callback)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user