Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added label for the out-of-band issuance and verification #274

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/agent-service/src/agent-service.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down
3 changes: 2 additions & 1 deletion apps/issuance/src/issuance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ export class IssuanceService {
}
},
autoAcceptCredential: 'always',
comment
comment,
label: organizationDetails?.name
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class CredentialDefinitionRepository {
}
}


async getAllCredDefsByOrgIdForBulk(payload: BulkCredDefSchema): Promise<CredDefSchema[]> {
try {
const { credDefSortBy, sortValue, orgId } = payload;
Expand All @@ -190,7 +190,7 @@ export class CredentialDefinitionRepository {
});

const schemaLedgerIdArray = credentialDefinitions.map((credDef) => credDef.schemaLedgerId);

const schemas = await this.prisma.schema.findMany({
where: {
schemaLedgerId: {
Expand All @@ -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) => {
Expand All @@ -213,19 +214,23 @@ 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) {
this.logger.error(`Error in listing all credential definitions with schema details: ${error}`);
throw error;
}
}


}
3 changes: 2 additions & 1 deletion apps/verification/src/interfaces/verification.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions apps/verification/src/verification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ export class VerificationService {
proofRequestPayload: {
protocolVersion,
comment,
label: organizationDetails?.name,
proofFormats: {
indy: {
name: 'Proof Request',
Expand Down