Skip to content

Commit

Permalink
fix: Fix issue with deleting session when imported in other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jun 24, 2023
1 parent 7d9a8cd commit 4656c29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/issuer-rest/lib/OID4VCIServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,10 @@ export class OID4VCIServer<DIDDoc extends object> {
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)
Expand Down

0 comments on commit 4656c29

Please sign in to comment.