From ed76a55b068907c5b0877a38326e656389cce65f Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Thu, 31 Oct 2024 12:11:30 +0100 Subject: [PATCH] chore: sdJwtDecodedCredentialToUniformCredential fix --- packages/ssi-types/src/types/sd-jwt-vc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ssi-types/src/types/sd-jwt-vc.ts b/packages/ssi-types/src/types/sd-jwt-vc.ts index f4cdc0dcb..8a79600a0 100644 --- a/packages/ssi-types/src/types/sd-jwt-vc.ts +++ b/packages/ssi-types/src/types/sd-jwt-vc.ts @@ -325,7 +325,7 @@ export const sdJwtDecodedCredentialToUniformCredential = ( }, {} as Record) // Add id to credentialSubject if applicable - if (sub || jti) { + if (!credentialSubject.id && (sub || jti)) { credentialSubject.id = sub ?? jti }