1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-23 01:36:47 +02:00

remove priceType from metadata, new hasPool check

This commit is contained in:
Matthias Kretschmann 2020-10-20 18:23:08 +02:00
parent efcf65813d
commit 8454bf9cc7
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 3 additions and 8 deletions

View File

@ -9,7 +9,6 @@ import { DataTokenOptions, PriceOptions } from '@oceanprotocol/react'
export interface AdditionalInformationMarket extends AdditionalInformation {
links?: File[]
termsAndConditions: boolean
priceType: string
}
export interface MetadataMarket extends Metadata {

View File

@ -242,7 +242,7 @@ input[type='range']::-moz-range-track {
.small {
font-size: var(--font-size-small);
min-height: 34px;
height: 34px;
padding: calc(var(--spacer) / 4);
}
@ -252,7 +252,7 @@ input[type='range']::-moz-range-track {
.prefix.small,
.postfix.small {
min-height: 34px;
height: 34px;
font-size: var(--font-size-mini);
}

View File

@ -7,7 +7,6 @@ import Tabs from '../../atoms/Tabs'
import { useOcean, useMetadata } from '@oceanprotocol/react'
import compareAsBN from '../../../utils/compareAsBN'
import Pool from './Pool'
import { AdditionalInformationMarket } from '../../../@types/MetaData'
export default function AssetActions({ ddo }: { ddo: DDO }): ReactElement {
const { ocean, balance, accountId } = useOcean()
@ -73,10 +72,7 @@ export default function AssetActions({ ddo }: { ddo: DDO }): ReactElement {
]
// Check from metadata, cause that is available earlier
const hasPool =
((attributes.additionalInformation as unknown) as AdditionalInformationMarket)
?.priceType === 'dynamic'
// price?.type === 'pool'
const hasPool = ddo.price?.type === 'pool'
hasPool &&
tabs.push({