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:
commit
f64859182c
8
src/@types/MetaData.d.ts
vendored
8
src/@types/MetaData.d.ts
vendored
@ -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 ----
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user