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 { allowDynamicPricing, allowFixedPricing } from '../../app.config'
|
||||
import * as Yup from 'yup'
|
||||
|
||||
export const validationSchema: Yup.SchemaOf<PriceOptionsMarket> =
|
||||
@ -26,8 +27,13 @@ export const validationSchema: Yup.SchemaOf<PriceOptionsMarket> =
|
||||
|
||||
export const initialValues: PriceOptionsMarket = {
|
||||
price: 1,
|
||||
type: 'dynamic',
|
||||
dtAmount: 9,
|
||||
type:
|
||||
allowDynamicPricing === 'true'
|
||||
? 'dynamic'
|
||||
: allowFixedPricing === 'true'
|
||||
? 'fixed'
|
||||
: 'free',
|
||||
dtAmount: allowDynamicPricing === 'true' ? 9 : 1000,
|
||||
oceanAmount: 21,
|
||||
weightOnOcean: '7', // 70% on OCEAN
|
||||
weightOnDataToken: '3', // 30% on datatoken
|
||||
|
Loading…
Reference in New Issue
Block a user