From 7acd9a2388be709b562e17458106861054c3944d Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 11 Nov 2021 08:55:35 +0000 Subject: [PATCH] ddo creation updates --- src/components/Publish/_utils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Publish/_utils.ts b/src/components/Publish/_utils.ts index 4647eb0b8..ceb6f7ed7 100644 --- a/src/components/Publish/_utils.ts +++ b/src/components/Publish/_utils.ts @@ -38,14 +38,14 @@ export function transformPublishFormToDdo(data: Partial): DDO { const service: Service = { type: access, files: filesEncrypted, - datatokenAddress: '', + datatokenAddress: '', // how to get before publish? serviceEndpoint: providerUrl, timeout } const newDdo: DDO = { - '@context': [''], - id: '', + '@context': ['https://w3id.org/did/v1'], + id: '', // how to get before publish? sha256(address of ERC721 contract + data.chainId) version: '4.0.0', created: currentTime, updated: currentTime, @@ -58,6 +58,9 @@ export function transformPublishFormToDdo(data: Partial): DDO { author, license: 'https://market.oceanprotocol.com/terms', links, + additionalInformation: { + termsAndConditions + }, ...(type === 'algorithm' && { ...getAlgorithmComponent( image,