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

price data structure tweaks

This commit is contained in:
Matthias Kretschmann 2020-07-24 09:00:49 +02:00
parent 1b49413ec7
commit 6e33ad92cb
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 6 additions and 6 deletions

View File

@ -25,8 +25,8 @@ export interface MetadataPublishForm {
author: string
license: string
price: {
cost: string
tokensToMint: string
cost: number
tokensToMint: number
}
access: 'Download' | 'Compute' | string
termsAndConditions: boolean

View File

@ -7,8 +7,8 @@ export const validationSchema = Yup.object().shape<MetadataPublishForm>({
name: Yup.string().required('Required'),
author: Yup.string().required('Required'),
price: Yup.object().shape({
cost: Yup.string().required('Required'),
tokensToMint: Yup.string().required('Required')
cost: Yup.number().required('Required'),
tokensToMint: Yup.number().required('Required')
}),
files: Yup.array<FileMetadata>().required('Required').nullable(),
description: Yup.string().required('Required'),
@ -28,8 +28,8 @@ export const initialValues: MetadataPublishForm = {
name: '',
author: '',
price: {
cost: '',
tokensToMint: ''
cost: 0,
tokensToMint: null
},
files: '',
description: '',