Compare commits

...
2 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -254,7 +254,7 @@
(shape-style-container type icon size)
{:background-color
(if (= state :pressed)
(colors/theme-colors colors/neutral-100 colors/white)
(colors/theme-colors colors/white colors/neutral-100)
:transparent)
:width width}
style)}
@@ -90,21 +90,25 @@
(rf/defn set-new-identity-success
{:events [:contacts/set-new-identity-success]}
[{:keys [db]} input ens-name pubkey]
{:db (assoc db
:contacts/new-identity
{:input input
:public-key pubkey
:ens-name ens-name
:state :valid})})
(let [current-input (get-in db [:contacts/new-identity :input])]
(when (= current-input input)
{:db (assoc db
:contacts/new-identity
{:input input
:public-key pubkey
:ens-name ens-name
:state :valid})})))
(rf/defn set-new-identity-error
{:events [:contacts/set-new-identity-error]}
[{:keys [db]} error input]
{:db (assoc db
:contacts/new-identity
{:input input
:state :error
:error :invalid})})
(let [current-input (get-in db [:contacts/new-identity :input])]
(when (= current-input input)
{:db (assoc db
:contacts/new-identity
{:input input
:state :error
:error :invalid})})))
(rf/defn clear-new-identity
{:events [:contacts/clear-new-identity :contacts/new-chat-focus]}