From 2b616295c8cdaa17fe2209ddd46ac6f26b14277f Mon Sep 17 00:00:00 2001 From: Martin Auer Date: Tue, 8 Oct 2024 15:53:11 +0200 Subject: [PATCH] feat: fix: some nits --- packages/core/src/agent/AgentModules.ts | 2 +- .../src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/agent/AgentModules.ts b/packages/core/src/agent/AgentModules.ts index 0c1aaf0aa..7ca8b8851 100644 --- a/packages/core/src/agent/AgentModules.ts +++ b/packages/core/src/agent/AgentModules.ts @@ -138,7 +138,7 @@ function getDefaultAgentModules() { pex: () => new DifPresentationExchangeModule(), sdJwtVc: () => new SdJwtVcModule(), x509: () => new X509Module(), - mod: () => new MdocModule(), + mdoc: () => new MdocModule(), } as const } diff --git a/packages/openid4vc/src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts b/packages/openid4vc/src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts index be271a4c3..c6b511b2b 100644 --- a/packages/openid4vc/src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts +++ b/packages/openid4vc/src/openid4vc-verifier/OpenId4VcSiopVerifierService.ts @@ -389,7 +389,7 @@ export class OpenId4VcSiopVerifierService { hasher: Hasher.hash, }) - if (!nonce || !state) { + if (!nonce && !state) { throw new CredoError( 'Could not extract nonce or state from authorization response. Unable to find OpenId4VcVerificationSession.' )