From d15b8ce212fb88ef84980aedec46ccfbc870b923 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Fri, 9 Feb 2024 00:35:15 +0100 Subject: [PATCH] chore: refactor method args to object, fixing build issue --- packages/presentation-exchange/src/functions.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/presentation-exchange/src/functions.ts b/packages/presentation-exchange/src/functions.ts index 1d03aeb64..ef3782a27 100644 --- a/packages/presentation-exchange/src/functions.ts +++ b/packages/presentation-exchange/src/functions.ts @@ -21,7 +21,13 @@ export async function createPEXPresentationSignCallback( }, context: IRequiredContext ): Promise { - function determineProofFormat(format?: Format | 'jwt' | 'lds' | 'EthereumEip712Signature2021', presentationDefinition: IPresentationDefinition) { + function determineProofFormat({ + format, + presentationDefinition, + }: { + format?: Format | 'jwt' | 'lds' | 'EthereumEip712Signature2021' + presentationDefinition: IPresentationDefinition + }) { let proofFormat: ProofFormat = 'jwt' const formatOptions = format ?? args.format ?? presentationDefinition.format if (formatOptions) { @@ -66,7 +72,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, presentationDefinition) + const proofFormat = determineProofFormat({ format, presentationDefinition }) let header if (!presentation.holder) { presentation.holder = id.did