idmission-web-sdk 2.2.158 → 2.2.159

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/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.158';
206
+ var webSdkVersion = '2.2.159';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1341,11 +1341,14 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1341
1341
  onDocumentUploadProgress: onDocumentUploadProgress.current,
1342
1342
  onDocumentUploaded: onDocumentUploaded.current,
1343
1343
  onDocumentUploadFailed: onDocumentUploadFailed.current
1344
+ })["catch"](function (e) {
1345
+ if (!throwErrorsOnFailure) throw e;
1346
+ return '';
1344
1347
  })];
1345
1348
  }
1346
1349
  });
1347
1350
  });
1348
- }, [documentServiceUrl, jobId, sessionId, taskId]);
1351
+ }, [documentServiceUrl, jobId, sessionId, taskId, throwErrorsOnFailure]);
1349
1352
  var buildSubmissionPayload = useCallback(function () {
1350
1353
  return __awaiter(void 0, void 0, void 0, function () {
1351
1354
  function uploadIfPossible(src_1, filename_1) {
@@ -1481,10 +1484,6 @@ var SubmissionProvider = function SubmissionProvider(_a) {
1481
1484
  submissionRequest.customerData.idData.idImageFront = documents.passportImage;
1482
1485
  }
1483
1486
  if (documents.selfieImage) {
1484
- // if (action === SubmissionAction.IDENTIFY) {
1485
- // // TODO: remove once API is fixed
1486
- // submissionRequest.biometricData = { selfie: documents.selfieImage }
1487
- // }
1488
1487
  submissionRequest.customerData.biometricData = {
1489
1488
  selfie: documents.selfieImage
1490
1489
  };