[#13068] No error "Profile not found" if entering invalid public key in New chat field
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
3745a8e2fe
commit
c1a338c2dd
|
@ -27,10 +27,8 @@
|
||||||
(fx/defn new-chat-set-new-identity
|
(fx/defn new-chat-set-new-identity
|
||||||
{:events [:new-chat/set-new-identity]}
|
{:events [:new-chat/set-new-identity]}
|
||||||
[{db :db} new-identity-raw new-ens-name id]
|
[{db :db} new-identity-raw new-ens-name id]
|
||||||
(let [new-identity (utils/safe-trim new-identity-raw)
|
(let [ens-error (and (= new-identity-raw "0x") (not (string/blank? new-ens-name)))]
|
||||||
ens-error (and (= new-identity-raw "0x") (not (string/blank? new-ens-name)))]
|
(when (or (not id) (= id @resolve-last-id))
|
||||||
(when (and (or (not id) (= id @resolve-last-id))
|
|
||||||
(or ens-error (> (count new-identity) 4)))
|
|
||||||
(if ens-error
|
(if ens-error
|
||||||
{:db (assoc-in db [:contacts/new-identity :state] :error)}
|
{:db (assoc-in db [:contacts/new-identity :state] :error)}
|
||||||
(let [new-identity (utils/safe-trim new-identity-raw)
|
(let [new-identity (utils/safe-trim new-identity-raw)
|
||||||
|
|
Loading…
Reference in New Issue