1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

publish debug tweaks

This commit is contained in:
Matthias Kretschmann 2020-10-20 21:58:35 +02:00
parent 8d7eec69fa
commit c9b7b0cdd3
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -8,6 +8,24 @@ export default function Debug({
}: { }: {
values: Partial<MetadataPublishForm> values: Partial<MetadataPublishForm>
}): ReactElement { }): ReactElement {
const ddo = {
'@context': 'https://w3id.org/did/v1',
dataTokenInfo: {
...values.dataTokenOptions
},
service: [
{
index: 0,
type: 'metadata',
attributes: { ...transformPublishFormToMetadata(values) }
},
{
index: 1,
type: values.access,
attributes: {}
}
]
}
return ( return (
<div className={styles.grid}> <div className={styles.grid}>
<div> <div>
@ -18,11 +36,9 @@ export default function Debug({
</div> </div>
<div> <div>
<h5>Transformed Values</h5> <h5>Transformed DDO Values</h5>
<pre> <pre>
<code> <code>{JSON.stringify(ddo, null, 2)}</code>
{JSON.stringify(transformPublishFormToMetadata(values), null, 2)}
</code>
</pre> </pre>
</div> </div>
</div> </div>