@onekeyfe/react-native-check-biometric-auth-changed 1.1.19 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import NitroModules
|
|
3
3
|
import LocalAuthentication
|
|
4
|
+
import ReactNativeNativeLogger
|
|
4
5
|
|
|
5
6
|
class ReactNativeCheckBiometricAuthChanged: HybridReactNativeCheckBiometricAuthChangedSpec {
|
|
6
7
|
func checkChanged() throws -> Promise<Bool> {
|
|
@@ -13,9 +14,13 @@ class ReactNativeCheckBiometricAuthChanged: HybridReactNativeCheckBiometricAuthC
|
|
|
13
14
|
let oldDomainState = defaults.data(forKey: "biometricAuthState")
|
|
14
15
|
if let oldDomainState = oldDomainState {
|
|
15
16
|
changed = oldDomainState != domainState
|
|
17
|
+
} else {
|
|
18
|
+
OneKeyLog.info("Biometric", "No previous biometric state stored, saving initial state")
|
|
16
19
|
}
|
|
17
20
|
defaults.set(domainState, forKey: "biometricAuthState")
|
|
18
|
-
|
|
21
|
+
if changed {
|
|
22
|
+
OneKeyLog.info("Biometric", "Biometric auth change detected")
|
|
23
|
+
}
|
|
19
24
|
return changed
|
|
20
25
|
}
|
|
21
26
|
}
|
package/package.json
CHANGED