diff --git a/src/authorization-response/AuthorizationResponse.ts b/src/authorization-response/AuthorizationResponse.ts index ac32b28..ad54ba4 100644 --- a/src/authorization-response/AuthorizationResponse.ts +++ b/src/authorization-response/AuthorizationResponse.ts @@ -115,6 +115,8 @@ export class AuthorizationResponse { if (hasVpToken) { const wrappedPresentations = await extractPresentationsFromAuthorizationResponse(response, { hasher: verifyOpts.hasher }); + const presentationSubmission = + responseOpts.presentationExchange?.presentationSubmission ?? authorizationResponsePayload.presentation_submission; await assertValidVerifiablePresentations({ presentationDefinitions, @@ -122,7 +124,7 @@ export class AuthorizationResponse { verificationCallback: verifyOpts.verification.presentationVerificationCallback, opts: { ...responseOpts.presentationExchange, - presentationSubmission: responseOpts.presentationExchange?.presentationSubmission ?? authorizationResponsePayload.presentation_submission, + ...(presentationSubmission ? { presentationSubmission: presentationSubmission } : {}), hasher: verifyOpts.hasher, }, });