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:
parent
a084c038c5
commit
a1c75c94fe
@ -155,19 +155,21 @@ export async function transformPublishFormToDdo(
|
||||
version: '4.0.0',
|
||||
chainId,
|
||||
metadata: newMetadata,
|
||||
services: [newService]
|
||||
services: [newService],
|
||||
// Only added for DDO preview, reflecting Asset response,
|
||||
// again, we can assume if `datatokenAddress` is not passed,
|
||||
// we are on preview.
|
||||
// ...(!datatokenAddress && {
|
||||
// dataTokenInfo: {
|
||||
// name: values.services[0].dataTokenOptions.name,
|
||||
// symbol: values.services[0].dataTokenOptions.symbol
|
||||
// },
|
||||
// nft: {
|
||||
// owner: accountId
|
||||
// }
|
||||
// })
|
||||
...(!datatokenAddress && {
|
||||
datatokens: [
|
||||
{
|
||||
name: values.services[0].dataTokenOptions.name,
|
||||
symbol: values.services[0].dataTokenOptions.symbol
|
||||
}
|
||||
],
|
||||
nft: {
|
||||
owner: accountId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return newDdo
|
||||
|
Loading…
Reference in New Issue
Block a user