From 32b3661c2fba9be3d0f89a54a7d117dc29156c95 Mon Sep 17 00:00:00 2001 From: Andres Vallecilla Date: Mon, 16 Dec 2024 14:56:21 -0500 Subject: [PATCH] feat: update chatbot demo --- examples/chatbot/index.ts | 11 ++--------- .../credentials/CredentialTypeController.ts | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/examples/chatbot/index.ts b/examples/chatbot/index.ts index a253a58..852fa26 100644 --- a/examples/chatbot/index.ts +++ b/examples/chatbot/index.ts @@ -86,13 +86,7 @@ const server = app.listen(PORT, async () => { ) try { - const credentialDefinition = (await apiClient.credentialTypes.create({ - id: randomUUID(), - name: "phoneNumber", - version: '1.0', - attributes: ['phoneNumber'] - })) - // const credentialDefinition = (await apiClient.credentialTypes.import(phoneCredDefData)) + const credentialDefinition = (await apiClient.credentialTypes.import(phoneCredDefData)) phoneNumberCredentialDefinitionId = phoneNumberCredentialType?.id ?? credentialDefinition.id phoneNumberRevocationDefinitionId = @@ -167,8 +161,7 @@ const handleMenuSelection = async (options: { connectionId: string; item: string // Issue credential if (selectedItem === 'issue' || selectedItem === 'Issue credential') { - if (!phoneNumberCredentialDefinitionId || phoneNumberCredentialDefinitionId === '' || - !phoneNumberRevocationDefinitionId || phoneNumberRevocationDefinitionId === '') { + if (!phoneNumberCredentialDefinitionId || phoneNumberCredentialDefinitionId === '') { await sendTextMessage({ connectionId, content: 'Service not available', diff --git a/packages/main/src/controllers/credentials/CredentialTypeController.ts b/packages/main/src/controllers/credentials/CredentialTypeController.ts index 2bf7ded..e93d7b5 100644 --- a/packages/main/src/controllers/credentials/CredentialTypeController.ts +++ b/packages/main/src/controllers/credentials/CredentialTypeController.ts @@ -151,7 +151,7 @@ export class CredentialTypesController { revocationRegistryDefinition: { credentialDefinitionId, tag: 'default', - maximumCredentialNumber: 10, + maximumCredentialNumber: 1000, issuerId, }, options: {},