Skip to content

Commit

Permalink
refactor: fetch verification list function (#891) (#892)
Browse files Browse the repository at this point in the history
Signed-off-by: bhavanakarwade <bhavana.karwade@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
  • Loading branch information
bhavanakarwade authored and KulkarniShashank committed Sep 11, 2024
1 parent ff4eb8f commit e006eb4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/verification/src/repositories/verification.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e006eb4

Please sign in to comment.