gbc-kyc-kit 3.0.18 → 3.0.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.
- package/dist/gbc-kyc-kit.es.js +20 -24
- package/dist/gbc-kyc-kit.umd.js +44 -44
- package/package.json +3 -3
package/dist/gbc-kyc-kit.es.js
CHANGED
|
@@ -41194,6 +41194,24 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41194
41194
|
useEffect(() => {
|
|
41195
41195
|
if (!lib$1(data2)) {
|
|
41196
41196
|
onSendSubmitLiveness();
|
|
41197
|
+
console.log("Entro al data no vacio");
|
|
41198
|
+
try {
|
|
41199
|
+
saveDataToDB({
|
|
41200
|
+
data: {
|
|
41201
|
+
selfie: `data:image/jpeg;base64,${data2.images[0]}`,
|
|
41202
|
+
similarity: faceMatch ? similarity : null,
|
|
41203
|
+
face_result_code: 0
|
|
41204
|
+
},
|
|
41205
|
+
component: "liveness",
|
|
41206
|
+
eventId,
|
|
41207
|
+
source: source2,
|
|
41208
|
+
inProduction,
|
|
41209
|
+
clientId,
|
|
41210
|
+
geolocation
|
|
41211
|
+
}).then((res) => dataLiveness(res));
|
|
41212
|
+
} catch (errorSavingData) {
|
|
41213
|
+
console.log(errorSavingData);
|
|
41214
|
+
}
|
|
41197
41215
|
}
|
|
41198
41216
|
}, [data2]);
|
|
41199
41217
|
const onSendSubmitLiveness = async () => {
|
|
@@ -41204,7 +41222,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41204
41222
|
access_token: token2
|
|
41205
41223
|
};
|
|
41206
41224
|
try {
|
|
41207
|
-
faceMatch
|
|
41225
|
+
faceMatch && await fetchFaceMatch(faceMatch, `data:image/jpeg;base64,${data2.images[0]}`, inProduction, customHeaders).then((res) => {
|
|
41208
41226
|
setSimilarity(res.data.similarity);
|
|
41209
41227
|
setMessage(successMessage ? successMessage : "Verificaci\xF3n de identidad completada");
|
|
41210
41228
|
saveDataToDB({
|
|
@@ -41221,7 +41239,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41221
41239
|
clientId,
|
|
41222
41240
|
geolocation
|
|
41223
41241
|
});
|
|
41224
|
-
})
|
|
41242
|
+
});
|
|
41225
41243
|
} catch (error) {
|
|
41226
41244
|
let message2 = "";
|
|
41227
41245
|
const {
|
|
@@ -41254,28 +41272,6 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
|
|
|
41254
41272
|
Q.error("Error - Verificar host con el proveedor");
|
|
41255
41273
|
}
|
|
41256
41274
|
};
|
|
41257
|
-
useEffect(() => {
|
|
41258
|
-
similarity !== 0 && wrapAndSaveData();
|
|
41259
|
-
}, [similarity]);
|
|
41260
|
-
const wrapAndSaveData = async () => {
|
|
41261
|
-
try {
|
|
41262
|
-
await saveDataToDB({
|
|
41263
|
-
data: {
|
|
41264
|
-
selfie: `data:image/jpeg;base64,${data2.images[0]}`,
|
|
41265
|
-
similarity: faceMatch ? similarity : null,
|
|
41266
|
-
face_result_code: 0
|
|
41267
|
-
},
|
|
41268
|
-
component: "liveness",
|
|
41269
|
-
eventId,
|
|
41270
|
-
source: source2,
|
|
41271
|
-
inProduction,
|
|
41272
|
-
clientId,
|
|
41273
|
-
geolocation
|
|
41274
|
-
}).then((res) => dataLiveness(res));
|
|
41275
|
-
} catch (errorSavingData) {
|
|
41276
|
-
return errorSavingData;
|
|
41277
|
-
}
|
|
41278
|
-
};
|
|
41279
41275
|
return {
|
|
41280
41276
|
status,
|
|
41281
41277
|
isLoading,
|