@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.
@@ -21,6 +21,7 @@ Pod::Spec.new do |s|
21
21
 
22
22
  s.dependency 'React-jsi'
23
23
  s.dependency 'React-callinvoker'
24
+ s.dependency 'ReactNativeNativeLogger'
24
25
 
25
26
  load 'nitrogen/generated/ios/ReactNativeCheckBiometricAuthChanged+autolinking.rb'
26
27
  add_nitrogen_files(s)
@@ -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
- defaults.synchronize()
21
+ if changed {
22
+ OneKeyLog.info("Biometric", "Biometric auth change detected")
23
+ }
19
24
  return changed
20
25
  }
21
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-check-biometric-auth-changed",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "react-native-check-biometric-auth-changed",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",