update open-login-callback after fx/def macro fix
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
34300cc0c0
commit
e93906c0d9
|
@ -558,4 +558,6 @@ var TopLevel = {
|
||||||
"FIRSTWEEKCUTOFFDAY": function () {},
|
"FIRSTWEEKCUTOFFDAY": function () {},
|
||||||
"decimalPlaces": function () {},
|
"decimalPlaces": function () {},
|
||||||
"_android": function () {},
|
"_android": function () {},
|
||||||
|
"isSupported" : function () {},
|
||||||
|
"authenticate" : function () {},
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
(def status-keycard (js-require/js-require "react-native-status-keycard"))
|
(def status-keycard (js-require/js-require "react-native-status-keycard"))
|
||||||
(def realm (js/require "realm"))
|
(def realm (js/require "realm"))
|
||||||
(def webview-bridge (js-require/js-require "react-native-webview-bridge"))
|
(def webview-bridge (js-require/js-require "react-native-webview-bridge"))
|
||||||
(defn touchid [] (.-default (js/require "react-native-touch-id")))
|
(def touchid-class (js-require/js-require "react-native-touch-id"))
|
||||||
|
(defn touchid [] (.-default (touchid-class)))
|
||||||
(def webview (js-require/js-require "react-native-webview"))
|
(def webview (js-require/js-require "react-native-webview"))
|
||||||
(def securerandom (js-require/js-require "react-native-securerandom"))
|
(def securerandom (js-require/js-require "react-native-securerandom"))
|
||||||
(defn secure-random [] (.-generateSecureRandom (securerandom)))
|
(defn secure-random [] (.-generateSecureRandom (securerandom)))
|
||||||
|
|
|
@ -317,8 +317,7 @@
|
||||||
|
|
||||||
(fx/defn open-login-callback
|
(fx/defn open-login-callback
|
||||||
{:events [:accounts.login.callback/biometric-auth-done]}
|
{:events [:accounts.login.callback/biometric-auth-done]}
|
||||||
[{:keys [db] :as cofx} password biometric-auth-result]
|
[{:keys [db] :as cofx} password {:keys [bioauth-success bioauth-notrequired bioauth-message]}]
|
||||||
(let [{:keys [bioauth-success bioauth-notrequired bioauth-message]} biometric-auth-result]
|
|
||||||
(if (and password
|
(if (and password
|
||||||
(or bioauth-success bioauth-notrequired))
|
(or bioauth-success bioauth-notrequired))
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
|
@ -328,7 +327,7 @@
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
(when bioauth-message
|
(when bioauth-message
|
||||||
{:utils/show-popup {:title (i18n/label :t/biometric-auth-login-error-title) :content bioauth-message}})
|
{:utils/show-popup {:title (i18n/label :t/biometric-auth-login-error-title) :content bioauth-message}})
|
||||||
(navigation/navigate-to-cofx :login nil)))))
|
(navigation/navigate-to-cofx :login nil))))
|
||||||
|
|
||||||
(fx/defn do-biometric-auth
|
(fx/defn do-biometric-auth
|
||||||
[{:keys [db] :as cofx} password]
|
[{:keys [db] :as cofx} password]
|
||||||
|
|
Loading…
Reference in New Issue