From e006eb4fe77ee75970ed44a7a0a44af7df87e41a Mon Sep 17 00:00:00 2001 From: bhavanakarwade <137506897+bhavanakarwade@users.noreply.github.com> Date: Fri, 2 Aug 2024 17:42:32 +0530 Subject: [PATCH] refactor: fetch verification list function (#891) (#892) Signed-off-by: bhavanakarwade Signed-off-by: KulkarniShashank --- .../src/repositories/verification.repository.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/verification/src/repositories/verification.repository.ts b/apps/verification/src/repositories/verification.repository.ts index abb36692b..cbe7af814 100644 --- a/apps/verification/src/repositories/verification.repository.ts +++ b/apps/verification/src/repositories/verification.repository.ts @@ -130,6 +130,20 @@ export class VerificationRepository { const { proofPresentationPayload, orgId } = payload; + //For Educreds + if (proofPresentationPayload?.['proofData']?.presentation?.presentationExchange?.verifiableCredential) { + + const emailId = proofPresentationPayload?.['proofData']?.presentation?.presentationExchange?.verifiableCredential[0].credentialSubject?.email; + encryptEmailId = await this.commonService.dataEncryption(emailId); + } else { + encryptEmailId = 'Not Available'; + } + + //For Educreds + if (proofPresentationPayload?.['proofData']?.request?.presentationExchange) { + schemaId = proofPresentationPayload?.['proofData']?.request?.presentationExchange?.presentation_definition?.input_descriptors[0].schema[0].uri; + } + if ('default' !== proofPresentationPayload?.contextCorrelationId) { const getOrganizationId = await this.getOrganizationByTenantId(proofPresentationPayload?.contextCorrelationId); organisationId = getOrganizationId?.orgId;