diff --git a/src/@types/MetaData.d.ts b/src/@types/MetaData.d.ts index 740fa4722..df787238c 100644 --- a/src/@types/MetaData.d.ts +++ b/src/@types/MetaData.d.ts @@ -4,6 +4,7 @@ import { AdditionalInformation, ServiceMetadata } from '@oceanprotocol/lib' +import { PriceOptions } from '@oceanprotocol/react' export interface AdditionalInformationMarket extends AdditionalInformation { links?: File[] @@ -22,12 +23,7 @@ export interface MetadataPublishForm { files: string | File[] author: string license: string - price: { - tokensToMint: number - type: 'simple' | 'advanced' | string - weightOnDataToken: string - liquidityProviderFee: string - } + price: PriceOptions access: 'Download' | 'Compute' | string termsAndConditions: boolean // ---- optional fields ---- diff --git a/src/components/molecules/FormFields/Price/index.tsx b/src/components/molecules/FormFields/Price/index.tsx index 63e5965d4..89cafa62b 100644 --- a/src/components/molecules/FormFields/Price/index.tsx +++ b/src/components/molecules/FormFields/Price/index.tsx @@ -51,6 +51,7 @@ export default function Price(props: InputProps): ReactElement { function handleOceanChange(event: ChangeEvent) { setAmountOcean(event.target.value) + helpers.setValue({ ...field.value, price: event.target.value }) } function handleTabChange(tabName: string) { diff --git a/src/components/pages/Publish/index.tsx b/src/components/pages/Publish/index.tsx index 7fbbfc463..a128606e4 100644 --- a/src/components/pages/Publish/index.tsx +++ b/src/components/pages/Publish/index.tsx @@ -13,6 +13,7 @@ import Preview from './Preview' import { MetadataPublishForm } from '../../../@types/MetaData' // import { useSiteMetadata } from '../../../hooks/useSiteMetadata' import { useUserPreferences } from '../../../providers/UserPreferences' +import { Logger } from '@oceanprotocol/lib' export default function PublishPage({ content @@ -35,7 +36,8 @@ export default function PublishPage({ let datatokenOptions: DataTokenOptions try { - // mpAddress and mpFee are not yet implemented in ocean js so are not used + Logger.log('Publish with ', priceOptions, serviceType, datatokenOptions) + const ddo = await publish( metadata as any, priceOptions,