Skip to content

Commit

Permalink
fix: allow update agents and assistants
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizgar91 committed Nov 22, 2024
1 parent c0ba25c commit b3f56a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nevermined-io/sdk",
"version": "3.0.43",
"version": "3.0.44",
"description": "Javascript SDK for connecting with Nevermined Data Platform ",
"main": "./dist/node/sdk.js",
"typings": "./dist/node/sdk.d.ts",
Expand Down
6 changes: 4 additions & 2 deletions src/nevermined/api/RegistryBaseApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-nocheck
import { formatUnits } from 'viem'
import { Instantiable, InstantiableConfig } from '../../Instantiable.abstract'
import { generateId } from '../../common/helpers'
import { DEFAULT_ENCRYPTION_METHOD, ZeroAddress } from '../../constants/AssetConstants'
Expand Down Expand Up @@ -26,7 +27,6 @@ import {
} from '../../types/MetadataTypes'
import { zeroX } from '../../utils/ConversionTypeHelpers'
import { SubscribablePromise } from '../../utils/SubscribablePromise'
import { formatUnits } from 'viem'
import { AccessService, NFTAccessService, NFTSalesService } from '../AccessService'
import { DID } from '../DID'
import { CreateProgressStep, OrderProgressStep, UpdateProgressStep } from '../ProgressSteps'
Expand Down Expand Up @@ -430,7 +430,9 @@ export abstract class RegistryBaseApi extends Instantiable {
metadataService.attributes.encryptedFiles = JSON.parse(encryptedFilesResponse)['hash']

if (
metadataService.attributes.main.type === 'service' &&
(metadataService.attributes.main.type === 'service' ||
assetAttributes.metadata.main.type === 'assistant' ||
assetAttributes.metadata.main.type === 'agent') &&
metadataService.attributes.main.webService.internalAttributes
) {
const encryptedServiceAttributesResponse = await this.nevermined.services.node.encrypt(
Expand Down

0 comments on commit b3f56a6

Please sign in to comment.