update open-login-callback after fx/def macro fix

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
tbenr 2019-06-01 19:28:34 +02:00 committed by Andrey Shovkoplyas
parent 34300cc0c0
commit e93906c0d9
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
3 changed files with 15 additions and 13 deletions

View File

@ -558,4 +558,6 @@ var TopLevel = {
"FIRSTWEEKCUTOFFDAY": function () {}, "FIRSTWEEKCUTOFFDAY": function () {},
"decimalPlaces": function () {}, "decimalPlaces": function () {},
"_android": function () {}, "_android": function () {},
"isSupported" : function () {},
"authenticate" : function () {},
} }

View File

@ -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)))

View File

@ -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]