From a12b845aa544e2f97e8a49663b95f4fa289e4224 Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Tue, 26 Nov 2024 11:44:14 +0100 Subject: [PATCH] fix: pass hasher to cvVerifySchema --- .../credential-validation/src/agent/CredentialValidation.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/credential-validation/src/agent/CredentialValidation.ts b/packages/credential-validation/src/agent/CredentialValidation.ts index 9f9a9ab0c..f19255be9 100644 --- a/packages/credential-validation/src/agent/CredentialValidation.ts +++ b/packages/credential-validation/src/agent/CredentialValidation.ts @@ -72,7 +72,11 @@ export class CredentialValidation implements IAgentPlugin { private async cvVerifyCredential(args: VerifyCredentialArgs, context: RequiredContext): Promise { const { credential, hasher, policies } = args // defaulting the schema validation to when_present - const schemaResult = await this.cvVerifySchema({ credential, validationPolicy: policies?.schemaValidation ?? SchemaValidation.WHEN_PRESENT }) + const schemaResult = await this.cvVerifySchema({ + credential, + validationPolicy: policies?.schemaValidation ?? SchemaValidation.WHEN_PRESENT, + hasher, + }) if (!schemaResult.result) { return schemaResult }