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

Merge pull request #82 from oceanprotocol/fix/publishFixedPrice

Fix publish fixed price
This commit is contained in:
mihaisc 2020-09-16 15:11:28 +03:00 committed by GitHub
commit f64859182c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -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 ----

View File

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

View File

@ -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,