From d3692f023e369f2fdd2c1be0d5b6cd61350b2b1f Mon Sep 17 00:00:00 2001 From: Krishna Waske Date: Tue, 29 Oct 2024 13:59:29 +0530 Subject: [PATCH] chore: verify credential status Signed-off-by: Krishna Waske --- .../modules/vc/data-integrity/W3cJsonLdCredentialService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts b/packages/core/src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts index 27011edf64..4dceb6a65a 100644 --- a/packages/core/src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts +++ b/packages/core/src/modules/vc/data-integrity/W3cJsonLdCredentialService.ts @@ -259,6 +259,7 @@ export class W3cJsonLdCredentialService { ) const allSuites = presentationSuites.concat(...credentialSuites) + const verifyCredentialStatus = options.verifyCredentialStatus ?? true const verifyOptions: Record = { presentation: JsonTransformer.toJSON(options.presentation), suite: allSuites, @@ -266,7 +267,7 @@ export class W3cJsonLdCredentialService { domain: options.domain, documentLoader: this.w3cCredentialsModuleConfig.documentLoader(agentContext), checkStatus: async ({ credential }: { credential: W3cJsonCredential }) => { - if ('credentialStatus' in credential) { + if (verifyCredentialStatus && 'credentialStatus' in credential) { await verifyBitStringCredentialStatus(credential, agentContext) } return {