From 6bae0d4547c15f2ad7a28dbf3ce50c28dadbb9e3 Mon Sep 17 00:00:00 2001 From: sander Date: Wed, 28 Feb 2024 17:29:36 +0100 Subject: [PATCH] SPHEREON-1157: responseOpts.presentationExchange can be undefined --- src/authorization-response/AuthorizationResponse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/authorization-response/AuthorizationResponse.ts b/src/authorization-response/AuthorizationResponse.ts index a84b5cc..b857417 100644 --- a/src/authorization-response/AuthorizationResponse.ts +++ b/src/authorization-response/AuthorizationResponse.ts @@ -122,7 +122,7 @@ export class AuthorizationResponse { verificationCallback: verifyOpts.verification.presentationVerificationCallback, opts: { ...responseOpts.presentationExchange, - presentationSubmission: responseOpts.presentationExchange.presentationSubmission ?? authorizationResponsePayload.presentation_submission, + presentationSubmission: responseOpts.presentationExchange?.presentationSubmission ?? authorizationResponsePayload.presentation_submission, hasher: verifyOpts.hasher, }, }); @@ -152,7 +152,7 @@ export class AuthorizationResponse { return { authorizationResponse: this, - verifyOpts, + verifyOpts, presentationSubmission: responseOpts.presentationExchange.presentationSubmissi nonce, state, correlationId: verifyOpts.correlationId,