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 ?!?!?!
|
// TODO: Why do we have these one line functions ?!?!?!
|
||||||
export async function getEncryptedFiles(
|
export async function getEncryptedFiles(
|
||||||
files: FileMetadata[],
|
files: any,
|
||||||
providerUrl: string
|
providerUrl: string
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
try {
|
try {
|
||||||
|
@ -143,13 +143,18 @@ export async function transformPublishFormToDdo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// this is the default format hardcoded
|
// this is the default format hardcoded
|
||||||
const file = [
|
const file = {
|
||||||
{
|
nftAddress,
|
||||||
type: 'url',
|
datatokenAddress,
|
||||||
url: files[0].url,
|
files: [
|
||||||
method: 'GET'
|
{
|
||||||
}
|
type: 'url',
|
||||||
]
|
index: 0,
|
||||||
|
url: files[0].url,
|
||||||
|
method: 'GET'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
const filesEncrypted =
|
const filesEncrypted =
|
||||||
!isPreview &&
|
!isPreview &&
|
||||||
files?.length &&
|
files?.length &&
|
||||||
@ -172,7 +177,7 @@ export async function transformPublishFormToDdo(
|
|||||||
'@context': ['https://w3id.org/did/v1'],
|
'@context': ['https://w3id.org/did/v1'],
|
||||||
id: did,
|
id: did,
|
||||||
nftAddress,
|
nftAddress,
|
||||||
version: '4.0.0',
|
version: '4.1.0',
|
||||||
chainId,
|
chainId,
|
||||||
metadata: newMetadata,
|
metadata: newMetadata,
|
||||||
services: [newService],
|
services: [newService],
|
||||||
|
Loading…
Reference in New Issue
Block a user