diff --git a/packages/presentation-exchange/src/agent/PresentationExchange.ts b/packages/presentation-exchange/src/agent/PresentationExchange.ts index 8c843ec7b..022429fb9 100644 --- a/packages/presentation-exchange/src/agent/PresentationExchange.ts +++ b/packages/presentation-exchange/src/agent/PresentationExchange.ts @@ -26,7 +26,7 @@ export class PresentationExchange implements IAgentPlugin { readonly schema = schema.IDidAuthSiopOpAuthenticator private readonly defaultStore: string private readonly defaultNamespace: string - private readonly pex = new PEX() + private readonly pex = new PEX() readonly methods: IPresentationExchange = { pexStoreGetDefinition: this.pexStoreGetDefinition.bind(this), diff --git a/packages/presentation-exchange/src/functions.ts b/packages/presentation-exchange/src/functions.ts index 2fde599d4..1d03aeb64 100644 --- a/packages/presentation-exchange/src/functions.ts +++ b/packages/presentation-exchange/src/functions.ts @@ -21,7 +21,7 @@ export async function createPEXPresentationSignCallback( }, context: IRequiredContext ): Promise { - function determineProofFormat(format: Format | 'jwt' | 'lds' | 'EthereumEip712Signature2021', presentationDefinition: IPresentationDefinition) { + function determineProofFormat(format?: Format | 'jwt' | 'lds' | 'EthereumEip712Signature2021', presentationDefinition: IPresentationDefinition) { let proofFormat: ProofFormat = 'jwt' const formatOptions = format ?? args.format ?? presentationDefinition.format if (formatOptions) { @@ -66,7 +66,7 @@ export async function createPEXPresentationSignCallback( throw Error(`Could not resolve DID document or match signing key to did ${idOpts.identifier.did}`) } - const proofFormat = determineProofFormat(format ?? 'jwt', presentationDefinition) + const proofFormat = determineProofFormat(format, presentationDefinition) let header if (!presentation.holder) { presentation.holder = id.did diff --git a/packages/siopv2-oid4vp-op-auth/src/session/OID4VP.ts b/packages/siopv2-oid4vp-op-auth/src/session/OID4VP.ts index 74875bb64..fd9f27b00 100644 --- a/packages/siopv2-oid4vp-op-auth/src/session/OID4VP.ts +++ b/packages/siopv2-oid4vp-op-auth/src/session/OID4VP.ts @@ -70,10 +70,7 @@ export class OID4VP { ): Promise { if (opts?.subjectIsHolder && opts?.holderDID) { throw Error('Cannot both have subject is holder and a holderDID value at the same time (programming error)') - } else if ( - !selectedVerifiableCredentials?.credentials || - selectedVerifiableCredentials.credentials.length === 0 - ) { + } else if (!selectedVerifiableCredentials?.credentials || selectedVerifiableCredentials.credentials.length === 0) { throw Error('No verifiable verifiableCredentials provided for presentation definition') }