Skip to content

Commit

Permalink
Merge pull request #136 from gataca-io/fix/maskMandatoryError
Browse files Browse the repository at this point in the history
Fix evaluation rule ALL when there are no marked input descriptors
  • Loading branch information
nklomp authored Jan 13, 2024
2 parents c99b1c2 + 4d75388 commit d82e52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/evaluation/evaluationClientWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import { Checked, Status } from '../ConstraintUtils';
import { PresentationSubmissionLocation } from '../signing';
import { IInternalPresentationDefinition, InternalPresentationDefinitionV2, IPresentationDefinition } from '../types';
import { IInternalPresentationDefinition, IPresentationDefinition, InternalPresentationDefinitionV2 } from '../types';

Check failure on line 13 in lib/evaluation/evaluationClientWrapper.ts

View workflow job for this annotation

GitHub Actions / build

Member 'InternalPresentationDefinitionV2' of the import declaration should be sorted alphabetically
import { JsonPathUtils, ObjectUtils } from '../utils';

import { EvaluationResults, HandlerCheckResult, SelectResults, SubmissionRequirementMatch } from './core';
Expand Down Expand Up @@ -486,7 +486,7 @@ export class EvaluationClientWrapper {
if (sr.from) {
if (sr.rule === Rules.All) {
const [count, matched] = this.countMatchingInputDescriptors(sr, marked);
if (count !== groupCount.get(sr.from)) {
if (count !== (groupCount.get(sr.from) || 0)) {
throw Error(`Not all input descriptors are members of group ${sr.from}`);
}
total++;
Expand Down

0 comments on commit d82e52c

Please sign in to comment.