From 0556a42331af0c6f18a0bee203f32037395611de Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Fri, 8 Nov 2024 15:30:18 +0530 Subject: [PATCH] fix: draft 11 Signed-off-by: Timo Glastra --- packages/oid4vci/src/credential-offer/credential-offer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/oid4vci/src/credential-offer/credential-offer.ts b/packages/oid4vci/src/credential-offer/credential-offer.ts index 0e0697c..2826852 100644 --- a/packages/oid4vci/src/credential-offer/credential-offer.ts +++ b/packages/oid4vci/src/credential-offer/credential-offer.ts @@ -205,7 +205,7 @@ export async function createCredentialOffer(options: CreateCredentialOfferOption // Draft 11 support const txCode = grants[preAuthorizedCodeGrantIdentifier].tx_code - if (txCode && options.issuerMetadata.credentialIssuer.originalDraftVersion === Oid4vciDraftVersion.Draft11) { + if (txCode && options.issuerMetadata.originalDraftVersion === Oid4vciDraftVersion.Draft11) { grants[preAuthorizedCodeGrantIdentifier].user_pin_required = txCode !== undefined } } @@ -228,7 +228,7 @@ export async function createCredentialOffer(options: CreateCredentialOfferOption } satisfies CredentialOfferObject) // Draft 11 support - if (options.issuerMetadata.credentialIssuer.originalDraftVersion === Oid4vciDraftVersion.Draft11) { + if (options.issuerMetadata.originalDraftVersion === Oid4vciDraftVersion.Draft11) { credentialOfferObject.credentials = credentialOfferObject.credential_configuration_ids }