   [data]
   (let [[errors data] (sc/validate data update-password-schema)]
     (if errors
-      (forms/assign-errors :profile/password errors)
+      (udf/assign-errors :profile/password errors)
       (UpdatePassword. data))))


  rs/EffectEvent
  (-apply-effect [_ state]
    (uum/info (tr "profile.password-saved"))))

;; --- Update Password

(defrecord UpdatePassword [data]
  rs/WatchEvent
  (-apply-watch [_ state s]
    (letfn [(on-error [{payload :payload :as data}]
              (if (= (:type payload) :form/validation)
                (rx/of
                 (forms/assign-errors :profile/password (:payload payload)))
                (do
                  (uum/error (tr "errors.profile.update-password") {:timeout 3000})
                  (rx/empty))))]
      (let [params {:old-password (:old-password data)
                    :password (:password-1 data)}]
        (->> (rp/req :update/password params)
             (rx/map #(->PasswordUpdated))
             (rx/catch on-error))))))

(def update-password-schema
  [[:password-1 sc/required sc/string [sc/min-len 6]]
   [:password-2 sc/required sc/string
    [sc/identical-to :password-1 :message "errors.form.password-not-match"]]

(defrecord FetchProfile []
  rs/WatchEvent
  (-apply-watch [_ state s]
    (->> (rp/req :fetch/profile)
         (rx/map :payload)
         (rx/map profile-fetched))))

(defn fetch-profile
  []
