* feat: added change-password screen Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: pw verification error not shown Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * feat: added changing password with confirmation and loading Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: adjusted flow Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: added minimum waiting time when loading Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * ref: moved events to change-password Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: added styles where missing Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * ref: moved header out Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * ref: moved forms into separate namespaces Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: linter promesa alias issue Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * feat: added password-tips quo-component Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: validation message Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: removed bottom-sheet event Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * removed temp file Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: addressed review comments Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: addressed @seanstrom's review comments Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: address @ilmotta's review comments Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: addressed @vkjr's review comments Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: buttom button alignment with keyboard Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: addressed review comments Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: keyboard behavior Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: navigation to loader Signed-off-by: Lungu Cristian <lungucristian95@gmail.com> * fix: use-theme usage * fix: button alignment due to alert banner --------- Signed-off-by: Lungu Cristian <lungucristian95@gmail.com>
24 lines
646 B
Clojure
24 lines
646 B
Clojure
(ns native-module.utils
|
|
(:require
|
|
[clojure.string :as string]
|
|
[promesa.core :as promesa]
|
|
[utils.transforms :as types]))
|
|
|
|
(defn- promisify-callback
|
|
[res rej]
|
|
(fn [result]
|
|
(let [native-error (let [{:keys [error]} (types/json->clj result)]
|
|
(when-not (string/blank? error)
|
|
error))]
|
|
(if native-error
|
|
(rej (ex-info "Native module call error" {:error native-error}))
|
|
(res result)))))
|
|
|
|
(defn promisify-native-module-call
|
|
[f & args]
|
|
(promesa/create
|
|
(fn [res rej]
|
|
(->> [(promisify-callback res rej)]
|
|
(concat args)
|
|
(apply f)))))
|