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 account = await ocean.accounts.list()
|
||||
|
||||
// remove `found` attribute from all objects
|
||||
// and use new array for hidden input
|
||||
// remove `found` attribute from all File objects
|
||||
// in a new array
|
||||
const files = this.state.files.map(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
// const filesStandard = this.state.files.map(
|
||||
// ({ found, ...keepAttrs }) => keepAttrs // eslint-disable-line
|
||||
// )
|
||||
({ found, ...keepAttrs }: { found: boolean }) => keepAttrs
|
||||
)
|
||||
|
||||
const newAsset = {
|
||||
// OEP-08 Attributes
|
||||
@ -287,15 +287,15 @@ export default class Publish extends Component<{}, PublishState> {
|
||||
author: this.state.author,
|
||||
license: this.state.license,
|
||||
copyrightHolder: this.state.copyrightHolder,
|
||||
files: this.state.files,
|
||||
files,
|
||||
price: this.state.price,
|
||||
type: this.state.type,
|
||||
categories: [this.state.categories]
|
||||
}),
|
||||
curation: Object.assign(AssetModel.curation),
|
||||
additionalInformation: Object.assign(
|
||||
AssetModel.additionalInformation
|
||||
)
|
||||
})
|
||||
// curation: Object.assign(AssetModel.curation),
|
||||
// additionalInformation: Object.assign(
|
||||
// AssetModel.additionalInformation
|
||||
// )
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user