gbc-kyc-kit 3.0.29 → 3.0.31

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.
@@ -18253,7 +18253,7 @@ const response_of_check_ip_use_vpn = "yes";
18253
18253
  const limit_of_request = "Limite de consultas - Verificar con el proveedor";
18254
18254
  const MAX_WIDTH = 1920;
18255
18255
  const MAX_HEIGHT = 1080;
18256
- const BlackListController = (clientId, authorize, inProduction, source2, eventId, countryCodeAllowed, validateVpn, successMessage, alertMessage, dataBulkVerification) => {
18256
+ const BlackListController = (clientId, authorize, inProduction, source2, eventId, countryCodeAllowed, validateVpn, successMessage, alertMessage, dataBlackList, dataBulkVerification) => {
18257
18257
  const [isLoading, setIsLoading] = useState(false);
18258
18258
  const [status, setStatus] = useState(clientId === void 0 ? status_client_id : authorize === void 0 ? status_token : "");
18259
18259
  const [message, setMessage] = useState("");
@@ -18288,7 +18288,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18288
18288
  setIsLoading(false);
18289
18289
  setCsvFile(null);
18290
18290
  setBatchData({});
18291
- dataBulkVerification([]);
18291
+ dataBulkVerification && dataBulkVerification([]);
18292
18292
  };
18293
18293
  const schema = create({
18294
18294
  first_name: create$1().required("Este campo es requerido."),
@@ -18327,6 +18327,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18327
18327
  birth_date
18328
18328
  } = data2;
18329
18329
  setIsLoading(true);
18330
+ let dataToRegisterBlackList = null;
18330
18331
  try {
18331
18332
  const res = await authorize();
18332
18333
  const customHeaders = {
@@ -18356,7 +18357,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18356
18357
  status: status2,
18357
18358
  payload
18358
18359
  } = resOfBlacklist.data.data;
18359
- const dataToRegisterBlackList = {
18360
+ dataToRegisterBlackList = {
18360
18361
  request_match: match2,
18361
18362
  request_payload: payload,
18362
18363
  first_name: first_name === "" ? null : first_name,
@@ -18384,7 +18385,6 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18384
18385
  } else {
18385
18386
  setMessage(successMessage ? successMessage : message2);
18386
18387
  }
18387
- await dataBulkVerification(match2);
18388
18388
  setStatus(status2);
18389
18389
  } catch (error) {
18390
18390
  let message2 = "";
@@ -18412,6 +18412,9 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18412
18412
  setStatus(status2);
18413
18413
  ErrorHandler(error);
18414
18414
  } finally {
18415
+ if (dataToRegisterBlackList && dataBlackList) {
18416
+ await dataBlackList(dataToRegisterBlackList.match);
18417
+ }
18415
18418
  setIsLoading(false);
18416
18419
  }
18417
18420
  };
@@ -18424,6 +18427,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18424
18427
  const onSubmitCsv = async () => {
18425
18428
  var _a;
18426
18429
  setIsLoading(true);
18430
+ let dataToRegisterBlackListBatch = null;
18427
18431
  try {
18428
18432
  const res = await authorize();
18429
18433
  const customHeaders = {
@@ -18448,7 +18452,7 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18448
18452
  id,
18449
18453
  startTime
18450
18454
  } = resOfBlacklistBatch.data.data;
18451
- const dataToRegisterBlackListBatch = {
18455
+ dataToRegisterBlackListBatch = {
18452
18456
  csvFile,
18453
18457
  batch_id: id,
18454
18458
  start_time: startTime,
@@ -18469,11 +18473,6 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18469
18473
  setMessage(alertMessage ? alertMessage : "La verificai\xF3n est\xE1 en proceso. Por favor copie y guarde este ID para su control!");
18470
18474
  setStatus(resOfBlacklistBatch.data.message);
18471
18475
  setBatchData(resOfBlacklistBatch.data.data);
18472
- await dataBulkVerification({
18473
- batchSize,
18474
- id,
18475
- startTime
18476
- });
18477
18476
  } catch (error) {
18478
18477
  let message2 = "Error interno de la aplicai\xF3n";
18479
18478
  console.log(error);
@@ -18506,6 +18505,9 @@ const BlackListController = (clientId, authorize, inProduction, source2, eventId
18506
18505
  setStatus(status2);
18507
18506
  ErrorHandler(error);
18508
18507
  } finally {
18508
+ if (dataToRegisterBlackListBatch && dataBulkVerification) {
18509
+ await dataBulkVerification(dataToRegisterBlackListBatch);
18510
+ }
18509
18511
  setIsLoading(false);
18510
18512
  }
18511
18513
  };