gbc-kyc-kit 1.8.1 → 1.8.3

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.
@@ -18748,6 +18748,9 @@ function ErrorHandler(error) {
18748
18748
  } else if (code === 504) {
18749
18749
  console.log(error.response.data.message);
18750
18750
  message = "M\xE1ximo de consultas, por favor contacte con soporte.";
18751
+ } else if (code === "020") {
18752
+ console.log(error.response.data.message);
18753
+ message = error.response.data.message;
18751
18754
  } else if (status === "429") {
18752
18755
  console.log(error.response.data);
18753
18756
  }
@@ -24956,7 +24959,22 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
24956
24959
  };
24957
24960
  try {
24958
24961
  await request2(parseReq);
24959
- faceMatch ? await fetchFaceMatch(faceMatch, `data:image/jpeg;base64,${data2.images[0]}`, inProduction, customHeaders).then((res) => setSimilarity(res.data.similarity)) : wrapAndSaveData();
24962
+ faceMatch ? await fetchFaceMatch(faceMatch, `data:image/jpeg;base64,${data2.images[0]}`, inProduction, customHeaders).then((res) => {
24963
+ setSimilarity(res.data.similarity);
24964
+ saveDataToDB({
24965
+ data: {
24966
+ similarity: res.data.similarity,
24967
+ first_image: `data:image/jpeg;base64,${data2.images[0]}`,
24968
+ second_image: faceMatch
24969
+ },
24970
+ component: "facematch",
24971
+ eventId,
24972
+ source: source2,
24973
+ inProduction,
24974
+ clientId,
24975
+ geolocation
24976
+ }).then((res2) => dataLiveness(res2));
24977
+ }) : wrapAndSaveData();
24960
24978
  } catch (error) {
24961
24979
  let message2 = "";
24962
24980
  const {