gbc-kyc-kit 3.0.18 → 3.0.19

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.
@@ -41136,7 +41136,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
41136
41136
  const [similarity, setSimilarity] = useState(0);
41137
41137
  const [failLiveness, setFailLiveness] = useState(false);
41138
41138
  const [dataFailLiveness, setDataFailLiveness] = useState({});
41139
- const listener = (event) => {
41139
+ const listener = async (event) => {
41140
41140
  var _a, _b;
41141
41141
  if (event.detail) {
41142
41142
  if (event.detail.action === "PROCESS_FINISHED") {
@@ -41145,6 +41145,19 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
41145
41145
  } else if (!failLiveness) {
41146
41146
  setFailLiveness(true);
41147
41147
  setDataFailLiveness(event);
41148
+ } else {
41149
+ await saveDataToDB({
41150
+ data: {
41151
+ selfie: "",
41152
+ face_result_code: 0
41153
+ },
41154
+ component: "liveness",
41155
+ eventId,
41156
+ source: source2,
41157
+ inProduction,
41158
+ clientId,
41159
+ geolocation
41160
+ });
41148
41161
  }
41149
41162
  }
41150
41163
  }
@@ -41194,6 +41207,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
41194
41207
  useEffect(() => {
41195
41208
  if (!lib$1(data2)) {
41196
41209
  onSendSubmitLiveness();
41210
+ wrapAndSaveData();
41197
41211
  }
41198
41212
  }, [data2]);
41199
41213
  const onSendSubmitLiveness = async () => {
@@ -41204,7 +41218,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
41204
41218
  access_token: token2
41205
41219
  };
41206
41220
  try {
41207
- faceMatch ? await fetchFaceMatch(faceMatch, `data:image/jpeg;base64,${data2.images[0]}`, inProduction, customHeaders).then((res) => {
41221
+ faceMatch && await fetchFaceMatch(faceMatch, `data:image/jpeg;base64,${data2.images[0]}`, inProduction, customHeaders).then((res) => {
41208
41222
  setSimilarity(res.data.similarity);
41209
41223
  setMessage(successMessage ? successMessage : "Verificaci\xF3n de identidad completada");
41210
41224
  saveDataToDB({
@@ -41221,7 +41235,7 @@ const LivenessController = (clientId, eventId, source2, inProduction, countryCod
41221
41235
  clientId,
41222
41236
  geolocation
41223
41237
  });
41224
- }) : wrapAndSaveData();
41238
+ });
41225
41239
  } catch (error) {
41226
41240
  let message2 = "";
41227
41241
  const {