From 218d82f282ad1a2f1cfa13fa58b85158855d8dcf Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 21 Nov 2023 13:52:05 +0530 Subject: [PATCH 1/2] fix: added label for the out-of-band issuance Signed-off-by: KulkarniShashank --- apps/agent-service/src/agent-service.service.ts | 2 +- apps/issuance/src/issuance.service.ts | 3 ++- apps/verification/src/interfaces/verification.interface.ts | 3 ++- apps/verification/src/verification.service.ts | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/agent-service/src/agent-service.service.ts b/apps/agent-service/src/agent-service.service.ts index dc6adb010..02cba6d30 100644 --- a/apps/agent-service/src/agent-service.service.ts +++ b/apps/agent-service/src/agent-service.service.ts @@ -305,7 +305,7 @@ export class AgentServiceService { if (agentSpinupDto.clientSocketId) { socket.emit('invitation-url-creation-started', { clientId: agentSpinupDto.clientSocketId }); } - await this._createLegacyConnectionInvitation(orgData.id, user, agentPayload.walletName); + await this._createLegacyConnectionInvitation(orgData.id, user, walletProvisionPayload.orgName); if (agentSpinupDto.clientSocketId) { socket.emit('invitation-url-creation-success', { clientId: agentSpinupDto.clientSocketId }); } diff --git a/apps/issuance/src/issuance.service.ts b/apps/issuance/src/issuance.service.ts index ec15141f0..c9d33d148 100644 --- a/apps/issuance/src/issuance.service.ts +++ b/apps/issuance/src/issuance.service.ts @@ -293,7 +293,8 @@ export class IssuanceService { } }, autoAcceptCredential: 'always', - comment + comment, + label: organizationDetails?.name }; diff --git a/apps/verification/src/interfaces/verification.interface.ts b/apps/verification/src/interfaces/verification.interface.ts index 99ad821f7..a61876a8f 100644 --- a/apps/verification/src/interfaces/verification.interface.ts +++ b/apps/verification/src/interfaces/verification.interface.ts @@ -84,12 +84,13 @@ export interface ISendProofRequestPayload { connectionId?: string; proofFormats: IProofFormats; autoAcceptProof: string; + label: string; } export interface IProofRequestPayload { url: string; apiKey: string; - proofRequestPayload: ISendProofRequestPayload + proofRequestPayload: ISendProofRequestPayload; } interface IWebhookPresentationProof { diff --git a/apps/verification/src/verification.service.ts b/apps/verification/src/verification.service.ts index 7d49ff2b2..e432d2dd4 100644 --- a/apps/verification/src/verification.service.ts +++ b/apps/verification/src/verification.service.ts @@ -344,6 +344,7 @@ export class VerificationService { proofRequestPayload: { protocolVersion, comment, + label: organizationDetails?.name, proofFormats: { indy: { name: 'Proof Request', From dc9590c3d00054321f94c97fc710c7d7a615a1d6 Mon Sep 17 00:00:00 2001 From: KulkarniShashank Date: Tue, 21 Nov 2023 14:46:21 +0530 Subject: [PATCH 2/2] Response changes on the schema and credential definition list Signed-off-by: KulkarniShashank --- .../credential-definition.repository.ts | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/apps/ledger/src/credential-definition/repositories/credential-definition.repository.ts b/apps/ledger/src/credential-definition/repositories/credential-definition.repository.ts index 7710d9f95..0db669d4f 100644 --- a/apps/ledger/src/credential-definition/repositories/credential-definition.repository.ts +++ b/apps/ledger/src/credential-definition/repositories/credential-definition.repository.ts @@ -168,7 +168,7 @@ export class CredentialDefinitionRepository { } } - + async getAllCredDefsByOrgIdForBulk(payload: BulkCredDefSchema): Promise { try { const { credDefSortBy, sortValue, orgId } = payload; @@ -190,7 +190,7 @@ export class CredentialDefinitionRepository { }); const schemaLedgerIdArray = credentialDefinitions.map((credDef) => credDef.schemaLedgerId); - + const schemas = await this.prisma.schema.findMany({ where: { schemaLedgerId: { @@ -201,10 +201,11 @@ export class CredentialDefinitionRepository { name: true, version: true, schemaLedgerId: true, - orgId: true + orgId: true, + attributes: true } }); - + // Match Credential Definitions with Schemas and map to CredDefSchema const matchingSchemas = credentialDefinitions.map((credDef) => { @@ -213,12 +214,16 @@ export class CredentialDefinitionRepository { if (matchingSchema) { return { credentialDefinitionId: credDef.credentialDefinitionId, - schemaCredDefName: `${matchingSchema.name}:${matchingSchema.version}-${credDef.tag}` + schemaCredDefName: `${matchingSchema.name}:${matchingSchema.version}-${credDef.tag}`, + schemaName: matchingSchema.name, + schemaVersion: matchingSchema.version, + schemaAttributes: matchingSchema.attributes, + credentialDefinition: credDef.tag }; } return null; }); - + // Filter out null values (missing schemas) and return the result return matchingSchemas.filter((schema) => null !== schema) as CredDefSchema[]; } catch (error) { @@ -226,6 +231,6 @@ export class CredentialDefinitionRepository { throw error; } } - - + + } \ No newline at end of file