mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
remove found
attribute from all File objects before publishing
This commit is contained in:
parent
0c10eb5665
commit
4150e56ba3
@ -270,12 +270,12 @@ export default class Publish extends Component<{}, PublishState> {
|
|||||||
const { ocean } = this.context
|
const { ocean } = this.context
|
||||||
const account = await ocean.accounts.list()
|
const account = await ocean.accounts.list()
|
||||||
|
|
||||||
// remove `found` attribute from all objects
|
// remove `found` attribute from all File objects
|
||||||
// and use new array for hidden input
|
// in a new array
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
const files = this.state.files.map(
|
||||||
// const filesStandard = this.state.files.map(
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
// ({ found, ...keepAttrs }) => keepAttrs // eslint-disable-line
|
({ found, ...keepAttrs }: { found: boolean }) => keepAttrs
|
||||||
// )
|
)
|
||||||
|
|
||||||
const newAsset = {
|
const newAsset = {
|
||||||
// OEP-08 Attributes
|
// OEP-08 Attributes
|
||||||
@ -287,15 +287,15 @@ export default class Publish extends Component<{}, PublishState> {
|
|||||||
author: this.state.author,
|
author: this.state.author,
|
||||||
license: this.state.license,
|
license: this.state.license,
|
||||||
copyrightHolder: this.state.copyrightHolder,
|
copyrightHolder: this.state.copyrightHolder,
|
||||||
files: this.state.files,
|
files,
|
||||||
price: this.state.price,
|
price: this.state.price,
|
||||||
type: this.state.type,
|
type: this.state.type,
|
||||||
categories: [this.state.categories]
|
categories: [this.state.categories]
|
||||||
}),
|
})
|
||||||
curation: Object.assign(AssetModel.curation),
|
// curation: Object.assign(AssetModel.curation),
|
||||||
additionalInformation: Object.assign(
|
// additionalInformation: Object.assign(
|
||||||
AssetModel.additionalInformation
|
// AssetModel.additionalInformation
|
||||||
)
|
// )
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user