mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
remove priceType from metadata, new hasPool check
This commit is contained in:
parent
efcf65813d
commit
8454bf9cc7
1
src/@types/MetaData.d.ts
vendored
1
src/@types/MetaData.d.ts
vendored
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user