mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
change initial price type based on config (#821)
This commit is contained in:
parent
1f332c4148
commit
9b94ed9f6d
@ -1,4 +1,5 @@
|
|||||||
import { PriceOptionsMarket } from '../@types/MetaData'
|
import { PriceOptionsMarket } from '../@types/MetaData'
|
||||||
|
import { allowDynamicPricing, allowFixedPricing } from '../../app.config'
|
||||||
import * as Yup from 'yup'
|
import * as Yup from 'yup'
|
||||||
|
|
||||||
export const validationSchema: Yup.SchemaOf<PriceOptionsMarket> =
|
export const validationSchema: Yup.SchemaOf<PriceOptionsMarket> =
|
||||||
@ -26,8 +27,13 @@ export const validationSchema: Yup.SchemaOf<PriceOptionsMarket> =
|
|||||||
|
|
||||||
export const initialValues: PriceOptionsMarket = {
|
export const initialValues: PriceOptionsMarket = {
|
||||||
price: 1,
|
price: 1,
|
||||||
type: 'dynamic',
|
type:
|
||||||
dtAmount: 9,
|
allowDynamicPricing === 'true'
|
||||||
|
? 'dynamic'
|
||||||
|
: allowFixedPricing === 'true'
|
||||||
|
? 'fixed'
|
||||||
|
: 'free',
|
||||||
|
dtAmount: allowDynamicPricing === 'true' ? 9 : 1000,
|
||||||
oceanAmount: 21,
|
oceanAmount: 21,
|
||||||
weightOnOcean: '7', // 70% on OCEAN
|
weightOnOcean: '7', // 70% on OCEAN
|
||||||
weightOnDataToken: '3', // 30% on datatoken
|
weightOnDataToken: '3', // 30% on datatoken
|
||||||
|
Loading…
Reference in New Issue
Block a user