Skip to content

Commit

Permalink
feat: allow to work without a PD Input descriptor (EBSI)
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jul 16, 2024
1 parent c1f21e4 commit 9fe0f92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/PEX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,9 @@ export class PEX {
presentationSubmission: presentationResult.presentationSubmission,
}),
});
if (!evaluationResults.value && selectedCredentials.length === 0) {
evaluationResults.value = presentationResult.presentationSubmission
}
if (!evaluationResults.value) {
throw new Error('Could not get evaluation results from presentationResult');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/evaluation/evaluationClientWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ export class EvaluationClientWrapper {
presentationSubmissionLocation?: PresentationSubmissionLocation;
},
): PresentationSubmission {
if (!this._client.results.length) {
if (!this._client.results) {
throw Error('You need to call evaluate() before pex.presentationFrom()');
}
if (!this._client.generatePresentationSubmission) {
Expand Down

0 comments on commit 9fe0f92

Please sign in to comment.