@idscan/onboarding 2.9.0 → 2.9.1

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.
@@ -921,9 +921,10 @@ class NotValidApplicant extends WrapperError {
921
921
  }
922
922
  class ValidationError extends WrapperError {
923
923
  constructor(error) {
924
- super("ValidationError");
924
+ const name = error.code === "RequestValidationError" ? error.code : "ValidationError";
925
+ super(name);
925
926
  this.message = error.message || "Try again later";
926
- this.name = "ValidationError";
927
+ this.name = name;
927
928
  this.setHeader(error);
928
929
  this.content = error.message || "Try again later";
929
930
  if (error == null ? void 0 : error.propertyErrors) {
@@ -1715,19 +1716,12 @@ class Validation {
1715
1716
  }
1716
1717
  }
1717
1718
  calculateFooter() {
1718
- const isFakeDocWithAttempts = this.status !== ResponseStatus.SUCCESS && this.attemptsLeft > 0;
1719
- if (this.status === 4) {
1720
- this.result.buttons.tryAgain = false;
1721
- this.result.buttons.complete = false;
1719
+ if (this.status === ResponseStatus.COMPLETE || this.status === ResponseStatus.SUCCESS) {
1722
1720
  return;
1723
1721
  }
1724
- if (isFakeDocWithAttempts) {
1725
- this.result.buttons.tryAgain = true;
1726
- this.result.buttons.complete = true;
1727
- }
1728
- if ([ResponseStatus.FAIL, ResponseStatus.INVALID_DATA].includes(this.status)) {
1729
- this.result.buttons.tryAgain = true;
1730
- }
1722
+ const showButtons = this.attemptsLeft > 0;
1723
+ this.result.buttons.tryAgain = showButtons;
1724
+ this.result.buttons.complete = showButtons;
1731
1725
  }
1732
1726
  prepareModal() {
1733
1727
  this.calculateType();
@@ -3977,7 +3971,7 @@ const checkIfMobile = () => {
3977
3971
  const isSurface = mc.isSurface();
3978
3972
  return isMobileUserAgent && isTouchable && isTouchScreen || isSurface;
3979
3973
  };
3980
- const version = "2.9.0";
3974
+ const version = "2.9.1";
3981
3975
  const packageJson = {
3982
3976
  version
3983
3977
  };