From 4656c292cf68c141e0facb852ff97947bd38dfa3 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Sat, 24 Jun 2023 17:51:51 +0200 Subject: [PATCH] fix: Fix issue with deleting session when imported in other projects --- packages/issuer-rest/lib/OID4VCIServer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/issuer-rest/lib/OID4VCIServer.ts b/packages/issuer-rest/lib/OID4VCIServer.ts index 68cd0d08..7ba2cbaf 100644 --- a/packages/issuer-rest/lib/OID4VCIServer.ts +++ b/packages/issuer-rest/lib/OID4VCIServer.ts @@ -277,9 +277,10 @@ export class OID4VCIServer { return sendErrorResponse(response, 400, { error: TokenErrorResponse.invalid_request, error_description: 'No credentials supplied' }) } const result = await this.issuer.createCredentialOfferURI({ ...request.body, grants, credentials }) - // const session = result.session const resultResponse: ICreateCredentialOfferURIResponse = result if ('session' in resultResponse) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore delete resultResponse.session } return response.send(resultResponse)