1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix preview crash

This commit is contained in:
Matthias Kretschmann 2022-01-11 20:09:14 +00:00
parent a084c038c5
commit a1c75c94fe
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -155,19 +155,21 @@ export async function transformPublishFormToDdo(
version: '4.0.0', version: '4.0.0',
chainId, chainId,
metadata: newMetadata, metadata: newMetadata,
services: [newService] services: [newService],
// Only added for DDO preview, reflecting Asset response, // Only added for DDO preview, reflecting Asset response,
// again, we can assume if `datatokenAddress` is not passed, // again, we can assume if `datatokenAddress` is not passed,
// we are on preview. // we are on preview.
// ...(!datatokenAddress && { ...(!datatokenAddress && {
// dataTokenInfo: { datatokens: [
// name: values.services[0].dataTokenOptions.name, {
// symbol: values.services[0].dataTokenOptions.symbol name: values.services[0].dataTokenOptions.name,
// }, symbol: values.services[0].dataTokenOptions.symbol
// nft: { }
// owner: accountId ],
// } nft: {
// }) owner: accountId
}
})
} }
return newDdo return newDdo