From ef1c73c53ea734e024cf22efada1c30481964ad7 Mon Sep 17 00:00:00 2001 From: bhavanakarwade Date: Thu, 20 Feb 2025 11:57:04 +0530 Subject: [PATCH] chore: added goal code in out of band record Signed-off-by: bhavanakarwade --- src/controllers/proofs/ProofController.ts | 3 ++- src/events/ProofEvents.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controllers/proofs/ProofController.ts b/src/controllers/proofs/ProofController.ts index 69c6f4ed..829003a8 100644 --- a/src/controllers/proofs/ProofController.ts +++ b/src/controllers/proofs/ProofController.ts @@ -188,6 +188,7 @@ export class ProofController extends Controller { messages: [proofMessage], autoAcceptConnection: true, imageUrl: createRequestOptions?.imageUrl, + goalCode: createRequestOptions?.goalCode, invitationDid, }) @@ -279,4 +280,4 @@ export class ProofController extends Controller { throw ErrorHandlingService.handle(error) } } -} \ No newline at end of file +} diff --git a/src/events/ProofEvents.ts b/src/events/ProofEvents.ts index a56be82c..ca0ed7a0 100644 --- a/src/events/ProofEvents.ts +++ b/src/events/ProofEvents.ts @@ -10,7 +10,7 @@ export const proofEvents = async (agent: Agent, config: ServerConfig) => { agent.events.on(ProofEventTypes.ProofStateChanged, async (event: ProofStateChangedEvent) => { const record = event.payload.proofRecord const body = { ...record.toJSON(), ...event.metadata } as { proofData?: any } - if (event.metadata.contextCorrelationId !== 'default' && record.state === 'done') { + if (event.metadata.contextCorrelationId !== 'default') { const tenantAgent = await agent.modules.tenants.getTenantAgent({ tenantId: event.metadata.contextCorrelationId, }) @@ -40,4 +40,4 @@ export const proofEvents = async (agent: Agent, config: ServerConfig) => { }) } }) -} \ No newline at end of file +}