From 7168896ffeb2984f7023cca7dae051c1af39a8cc Mon Sep 17 00:00:00 2001 From: Aleksandr Pantiukhov Date: Tue, 3 Apr 2018 23:04:55 +0200 Subject: [PATCH] bug #3571: Validation error 'Password confirmation doesn't match password' is shown after you fix value in 'Confirm password' Signed-off-by: Goran Jovic --- src/status_im/ui/screens/accounts/create/views.cljs | 2 +- src/status_im/ui/screens/accounts/events.cljs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/accounts/create/views.cljs b/src/status_im/ui/screens/accounts/create/views.cljs index 50d0603162..6d0a71285f 100644 --- a/src/status_im/ui/screens/accounts/create/views.cljs +++ b/src/status_im/ui/screens/accounts/create/views.cljs @@ -44,7 +44,7 @@ [text-input/text-input-with-label {:label (get-in steps [step :input-label]) :placeholder (get-in steps [step :input-placeholder]) - :on-change-text #(re-frame/dispatch [:set-in [:accounts/create (get-in steps [step :input-key])] %]) + :on-change-text #(re-frame/dispatch [:account-set-input-text (get-in steps [step :input-key]) %]) :secure-text-entry (boolean (#{:enter-password :confirm-password} step)) :error error}]) diff --git a/src/status_im/ui/screens/accounts/events.cljs b/src/status_im/ui/screens/accounts/events.cljs index 27a48b6a79..e799809e4b 100644 --- a/src/status_im/ui/screens/accounts/events.cljs +++ b/src/status_im/ui/screens/accounts/events.cljs @@ -215,6 +215,11 @@ :dispatch-n [[:navigate-to-clean :home] [:request-notifications]]})) +(handlers/register-handler-fx + :account-set-input-text + (fn [{db :db} [_ input-key text]] + {:db (update db :accounts/create merge {input-key text :error nil})})) + (handlers/register-handler-fx :update-sign-in-time (fn [{db :db now :now} _]