idmission-web-sdk 0.0.66 → 0.0.67

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.
@@ -12578,6 +12578,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
12578
12578
  }));
12579
12579
  };
12580
12580
 
12581
+ var ALLOWED_RETRIES$3 = 0;
12581
12582
  var initialState$1 = {
12582
12583
  frame: null,
12583
12584
  face: null,
@@ -12625,11 +12626,13 @@ var reducer$1 = function reducer(state, action) {
12625
12626
  var customerMatched = resultData.verificationResultCode === '00';
12626
12627
  if (customerMatched) {
12627
12628
  requestState = 'VERIFIED';
12628
- } else if (unverifiedTimes < 2) {
12629
- requestState = 'CAPTURING';
12630
- unverifiedTimes += 1;
12631
12629
  } else {
12632
- requestState = 'REJECTED';
12630
+ if (unverifiedTimes < ALLOWED_RETRIES$3) {
12631
+ requestState = 'CAPTURING';
12632
+ unverifiedTimes += 1;
12633
+ } else {
12634
+ requestState = 'REJECTED';
12635
+ }
12633
12636
  }
12634
12637
  return tslib.__assign(tslib.__assign({}, state), {
12635
12638
  requestState: requestState,
@@ -12849,6 +12852,7 @@ var CustomerVerificationFailure = function CustomerVerificationFailure(_a) {
12849
12852
  }, verbiage.exitBtnText))));
12850
12853
  };
12851
12854
 
12855
+ var ALLOWED_RETRIES$2 = 2;
12852
12856
  var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12853
12857
  var onComplete = _a.onComplete,
12854
12858
  onCustomerMatched = _a.onCustomerMatched,
@@ -12932,6 +12936,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12932
12936
  onDoneClick: onDoneCallback,
12933
12937
  onRetryClick: function onRetryClick() {
12934
12938
  setCaptureState('CAPTURING');
12939
+ setAttempt(0);
12935
12940
  }
12936
12941
  });
12937
12942
  case 'NOT_MATCHED':
@@ -12939,10 +12944,15 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
12939
12944
  assets: assets.failure,
12940
12945
  colors: colors.failure,
12941
12946
  verbiage: verbiage.failure,
12942
- canRetry: false,
12947
+ canRetry: attempt < ALLOWED_RETRIES$2,
12943
12948
  onExitClick: function onExitClick() {
12944
12949
  releaseCameraAccess();
12945
12950
  onExitAfterFailure === null || onExitAfterFailure === void 0 ? void 0 : onExitAfterFailure();
12951
+ },
12952
+ onRetryClick: function onRetryClick() {
12953
+ setAttempt(function (n) {
12954
+ return n + 1;
12955
+ });
12946
12956
  }
12947
12957
  });
12948
12958
  default:
@@ -13019,6 +13029,7 @@ var CustomerVerification = function CustomerVerification(_a) {
13019
13029
  }))));
13020
13030
  };
13021
13031
 
13032
+ var ALLOWED_RETRIES$1 = 0;
13022
13033
  var initialState = {
13023
13034
  frame: null,
13024
13035
  face: null,
@@ -13066,7 +13077,7 @@ var reducer = function reducer(state, action) {
13066
13077
  var customerMatched = resultData.verificationResultCode === '46';
13067
13078
  if (customerMatched) {
13068
13079
  requestState = 'FOUND';
13069
- } else if (notFoundTimes < 2) {
13080
+ } else if (notFoundTimes < ALLOWED_RETRIES$1) {
13070
13081
  requestState = 'CAPTURING';
13071
13082
  notFoundTimes += 1;
13072
13083
  } else {
@@ -13290,6 +13301,7 @@ var CustomerIdentificationFailure = function CustomerIdentificationFailure(_a) {
13290
13301
  }, verbiage.exitBtnText))));
13291
13302
  };
13292
13303
 
13304
+ var ALLOWED_RETRIES = 2;
13293
13305
  var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13294
13306
  var onComplete = _a.onComplete,
13295
13307
  onCustomerMatched = _a.onCustomerMatched,
@@ -13373,6 +13385,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13373
13385
  onDoneClick: onDoneCallback,
13374
13386
  onRetryClick: function onRetryClick() {
13375
13387
  setCaptureState('CAPTURING');
13388
+ setAttempt(0);
13376
13389
  }
13377
13390
  });
13378
13391
  case 'NOT_FOUND':
@@ -13381,10 +13394,15 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
13381
13394
  assets: assets.failure,
13382
13395
  colors: colors.failure,
13383
13396
  verbiage: verbiage.failure,
13384
- canRetry: false,
13397
+ canRetry: attempt < ALLOWED_RETRIES,
13385
13398
  onExitClick: function onExitClick() {
13386
13399
  releaseCameraAccess();
13387
13400
  onExitAfterFailure === null || onExitAfterFailure === void 0 ? void 0 : onExitAfterFailure();
13401
+ },
13402
+ onRetryClick: function onRetryClick() {
13403
+ setAttempt(function (n) {
13404
+ return n + 1;
13405
+ });
13388
13406
  }
13389
13407
  });
13390
13408
  default: