Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Nov 25, 2024
1 parent 5f2b3f2 commit 1a0c086
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,18 @@ export class PresentationExchange {
// Verify the signature of all VPs
await Promise.all(
presentationsToVerify.map(async (presentation) => {
let verificationResult:PresentationVerificationResult
let verificationResult: PresentationVerificationResult
try {
verificationResult= await verifyPresentationCallback(presentation as W3CVerifiablePresentation, evaluationResults.value!)

verificationResult = await verifyPresentationCallback(presentation as W3CVerifiablePresentation, evaluationResults.value!)
} catch (error: unknown) {
throw new Error(SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID)
}

if (!verificationResult.verified) {
throw new Error(
SIOPErrors.VERIFIABLE_PRESENTATION_SIGNATURE_NOT_VALID + (verificationResult.reason ? `. ${verificationResult.reason}` : ''),
)
}
}),
)
}
Expand Down

0 comments on commit 1a0c086

Please sign in to comment.