Skip to content

Commit

Permalink
refactor: Fix credential selection during grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Aug 29, 2023
1 parent 612445d commit b4a0929
Showing 1 changed file with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,9 @@ List<CredentialModel> getCredentialsFromPresentationDefinition({
required int inputDescriptorIndex,
required bool? isJwtVpInJwtVCRequired,
}) {
final allInputDescriptorConsidered =
presentationDefinition.submissionRequirements != null;

var filterList = <Field>[];

if (allInputDescriptorConsidered) {
for (final descriptor in presentationDefinition.inputDescriptors) {
if (descriptor.constraints != null &&
descriptor.constraints!.fields != null) {
for (final field in descriptor.constraints!.fields!) {
filterList.add(field);
}
}
}
} else {
filterList = presentationDefinition
.inputDescriptors[inputDescriptorIndex].constraints?.fields ??
<Field>[];
}
final filterList = presentationDefinition
.inputDescriptors[inputDescriptorIndex].constraints?.fields ??
<Field>[];

/// If we have some instructions we filter the wallet's
/// crendential list whith it
Expand Down

0 comments on commit b4a0929

Please sign in to comment.