react-native-biometric-verifier 0.0.45 → 0.0.46

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-biometric-verifier",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "A React Native module for biometric verification with face recognition and QR code scanning",
5
5
  "main": "src/index.js",
6
6
  "private": false,
package/src/index.js CHANGED
@@ -327,17 +327,14 @@ const BiometricModal = forwardRef(({
327
327
  location.latitude, location.longitude
328
328
  );
329
329
 
330
- // 6. Enhanced verification with accuracy buffer
331
- const maxAllowedDistance = MaxDistanceMeters + Math.max(location.accuracy, qrAccuracy);
332
- const distanceWithinThreshold = distance <= maxAllowedDistance;
333
-
330
+ const distanceWithinThreshold = distance <= MaxDistanceMeters;
331
+ console.log('distanceWithinThreshold', distance, MaxDistanceMeters)
334
332
  // Verify: distance within threshold AND BLE devices nearby AND depkey matches
335
- if (distanceWithinThreshold && isBLENearby && qrDepKey === depkey) {
333
+ if (distanceWithinThreshold && qrDepKey === depkey) {
336
334
  const locationDetails = {
337
335
  qrLocation: {
338
336
  latitude: qrLat,
339
337
  longitude: qrLng,
340
- // No altitude in your QR code format
341
338
  accuracy: qrAccuracy
342
339
  },
343
340
  deviceLocation: {
@@ -350,7 +347,7 @@ const BiometricModal = forwardRef(({
350
347
  timestamp: location.timestamp
351
348
  },
352
349
  distanceMeters: distance,
353
- accuracyBuffer: maxAllowedDistance,
350
+ accuracyBuffer: MaxDistanceMeters,
354
351
  verified: true,
355
352
  verifiedAt: new Date().toISOString(),
356
353
  bleDevicesDetected: consistentDevices,