1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +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 author: string
license: string license: string
price: { price: {
cost: string cost: number
tokensToMint: string tokensToMint: number
} }
access: 'Download' | 'Compute' | string access: 'Download' | 'Compute' | string
termsAndConditions: boolean termsAndConditions: boolean

View File

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