mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
update publish form with DDO v4.1.0 structure (#1519)
* update publish form Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> * typing quick fix * fix build Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro> Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
parent
d523c7f0f3
commit
a47fb09b91
@ -9,7 +9,7 @@ import Web3 from 'web3'
|
||||
|
||||
// TODO: Why do we have these one line functions ?!?!?!
|
||||
export async function getEncryptedFiles(
|
||||
files: FileMetadata[],
|
||||
files: any,
|
||||
providerUrl: string
|
||||
): Promise<string> {
|
||||
try {
|
||||
|
@ -143,13 +143,18 @@ export async function transformPublishFormToDdo(
|
||||
}
|
||||
|
||||
// this is the default format hardcoded
|
||||
const file = [
|
||||
const file = {
|
||||
nftAddress,
|
||||
datatokenAddress,
|
||||
files: [
|
||||
{
|
||||
type: 'url',
|
||||
index: 0,
|
||||
url: files[0].url,
|
||||
method: 'GET'
|
||||
}
|
||||
]
|
||||
}
|
||||
const filesEncrypted =
|
||||
!isPreview &&
|
||||
files?.length &&
|
||||
@ -172,7 +177,7 @@ export async function transformPublishFormToDdo(
|
||||
'@context': ['https://w3id.org/did/v1'],
|
||||
id: did,
|
||||
nftAddress,
|
||||
version: '4.0.0',
|
||||
version: '4.1.0',
|
||||
chainId,
|
||||
metadata: newMetadata,
|
||||
services: [newService],
|
||||
|
Loading…
Reference in New Issue
Block a user