Skip to content

Commit

Permalink
feat: update chatbot demo
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking committed Dec 16, 2024
1 parent 9912183 commit 32b3661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions examples/chatbot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class CredentialTypesController {
revocationRegistryDefinition: {
credentialDefinitionId,
tag: 'default',
maximumCredentialNumber: 10,
maximumCredentialNumber: 1000,
issuerId,
},
options: {},
Expand Down

0 comments on commit 32b3661

Please sign in to comment.