1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00
This commit is contained in:
mihaisc 2020-09-16 15:01:15 +03:00
parent d594c4cdfe
commit 9f84f12502
No known key found for this signature in database
GPG Key ID: BE522BB8C3A5E2E4
3 changed files with 6 additions and 7 deletions

View File

@ -4,6 +4,7 @@ import {
AdditionalInformation, AdditionalInformation,
ServiceMetadata ServiceMetadata
} from '@oceanprotocol/lib' } from '@oceanprotocol/lib'
import { PriceOptions } from '@oceanprotocol/react'
export interface AdditionalInformationMarket extends AdditionalInformation { export interface AdditionalInformationMarket extends AdditionalInformation {
links?: File[] links?: File[]
@ -22,12 +23,7 @@ export interface MetadataPublishForm {
files: string | File[] files: string | File[]
author: string author: string
license: string license: string
price: { price: PriceOptions
tokensToMint: number
type: 'simple' | 'advanced' | string
weightOnDataToken: string
liquidityProviderFee: string
}
access: 'Download' | 'Compute' | string access: 'Download' | 'Compute' | string
termsAndConditions: boolean termsAndConditions: boolean
// ---- optional fields ---- // ---- optional fields ----

View File

@ -51,6 +51,7 @@ export default function Price(props: InputProps): ReactElement {
function handleOceanChange(event: ChangeEvent<HTMLInputElement>) { function handleOceanChange(event: ChangeEvent<HTMLInputElement>) {
setAmountOcean(event.target.value) setAmountOcean(event.target.value)
helpers.setValue({ ...field.value, price: event.target.value })
} }
function handleTabChange(tabName: string) { function handleTabChange(tabName: string) {

View File

@ -13,6 +13,7 @@ import Preview from './Preview'
import { MetadataPublishForm } from '../../../@types/MetaData' import { MetadataPublishForm } from '../../../@types/MetaData'
// import { useSiteMetadata } from '../../../hooks/useSiteMetadata' // import { useSiteMetadata } from '../../../hooks/useSiteMetadata'
import { useUserPreferences } from '../../../providers/UserPreferences' import { useUserPreferences } from '../../../providers/UserPreferences'
import { Logger } from '@oceanprotocol/lib'
export default function PublishPage({ export default function PublishPage({
content content
@ -35,7 +36,8 @@ export default function PublishPage({
let datatokenOptions: DataTokenOptions let datatokenOptions: DataTokenOptions
try { 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( const ddo = await publish(
metadata as any, metadata as any,
priceOptions, priceOptions,