idmission-web-sdk 0.0.86 → 0.0.87

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.
@@ -50,7 +50,7 @@ var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
50
50
  var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
51
51
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
52
52
 
53
- var webSdkVersion = '0.0.86';
53
+ var webSdkVersion = '0.0.87';
54
54
 
55
55
  function getPlatform() {
56
56
  return window.platform;
@@ -13408,6 +13408,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
13408
13408
  var _f = React.useContext(SubmissionContext),
13409
13409
  submit = _f.submit,
13410
13410
  submissionResponse = _f.submissionResponse,
13411
+ submissionError = _f.submissionError,
13411
13412
  selfieImage = _f.selfieImage,
13412
13413
  setSelfieImage = _f.setSelfieImage;
13413
13414
  var _g = React.useState(null),
@@ -13426,15 +13427,15 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
13426
13427
  face = state.face;
13427
13428
  var isReady = state.requestState === 'CAPTURED';
13428
13429
  React.useEffect(function () {
13429
- if (!frame || !face) return;
13430
+ if (!frame || !face || submissionError) return;
13430
13431
  var imageUrl = cropToShoulders(frame, face);
13431
13432
  setImageUrl(imageUrl);
13432
13433
  dataUrlToBase64(imageUrl).then(function (img) {
13433
13434
  setSelfieImage(img);
13434
13435
  });
13435
- }, [face, frame, setSelfieImage]);
13436
+ }, [face, frame, setSelfieImage, submissionError]);
13436
13437
  React.useEffect(function () {
13437
- if (!isReady || !selfieImage) return;
13438
+ if (!isReady || !selfieImage || submissionError) return;
13438
13439
  (function () {
13439
13440
  return tslib.__awaiter(void 0, void 0, void 0, function () {
13440
13441
  var submissionResponse_1, e_1;
@@ -13474,7 +13475,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
13474
13475
  });
13475
13476
  });
13476
13477
  })();
13477
- }, [isReady, onCustomerMatched, onCustomerNotMatched, selfieImage, state.requestState, submit]);
13478
+ }, [isReady, onCustomerMatched, onCustomerNotMatched, selfieImage, state.requestState, submissionError, submit]);
13478
13479
  React.useEffect(function () {
13479
13480
  if (!submissionResponse) return;
13480
13481
  if (state.requestState === 'FOUND') {