react-native-biometric-verifier 0.0.4 → 0.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-biometric-verifier",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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
  "scripts": {
@@ -13,10 +13,10 @@ export const EmployeeCard = ({ employeeData }) => {
13
13
  return null;
14
14
  }
15
15
 
16
- const { employeename, employeeid, imageurl } = employeeData;
16
+ const { facename, faceid, imageurl } = employeeData;
17
17
 
18
- const employeeName = employeename || 'Unknown Employee';
19
- const employeeId = employeeid || 'N/A';
18
+ const employeeName = facename || 'Unknown Employee';
19
+ const employeeId = faceid || 'N/A';
20
20
  const imageSource = !imageError && imageurl
21
21
  ? { uri: `${IMAGE_URL}${imageurl}` }
22
22
  : { uri: `${GIF_URL}camera.png` }; // Add a local fallback image in assets
@@ -39,7 +39,7 @@ export const EmployeeCard = ({ employeeData }) => {
39
39
 
40
40
  {/* Employee Info */}
41
41
  <Text style={styles.empName}>{employeeName}</Text>
42
- <Text style={styles.empId}>Employee ID: {employeeId}</Text>
42
+ <Text style={styles.empId}> ID: {employeeId}</Text>
43
43
 
44
44
  {/* Verified Badge */}
45
45
  <View style={styles.employeeDetails}>
@@ -54,8 +54,8 @@ export const EmployeeCard = ({ employeeData }) => {
54
54
 
55
55
  EmployeeCard.propTypes = {
56
56
  employeeData: PropTypes.shape({
57
- employeename: PropTypes.string,
58
- employeeid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
57
+ facename: PropTypes.string,
58
+ faceid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
59
59
  imageurl: PropTypes.string,
60
60
  }),
61
61
  };
package/src/index.js CHANGED
@@ -84,7 +84,7 @@ const BiometricVerificationModal = React.memo(({ data, qrscan = false, callback
84
84
  }, [navigation, notifyMessage, resetState, updateState]);
85
85
 
86
86
  const uploadFaceScan = useCallback(async (selfie) => {
87
- const currentData = dataRef.current?.data?.userdata?.hrenemp;
87
+ const currentData = dataRef.current;
88
88
  const base64 = await convertImageToBase64(selfie.uri);
89
89
  if (!currentData) {
90
90
  notifyMessage('Employee data not found.', 'error');
@@ -104,7 +104,7 @@ const BiometricVerificationModal = React.memo(({ data, qrscan = false, callback
104
104
 
105
105
  try {
106
106
  const body = { image: base64 }
107
- const header = { hrenemp: currentData }
107
+ const header = { faceid: currentData }
108
108
  const response = await networkServiceCall("POST",RECOGNIZE_URL,header,body);
109
109
  if (response.httpstatus === 200) {
110
110
  notifyMessage('Identity verified successfully!', 'success');