1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-14 09:14:52 +01:00

activate isAssetNetwork check

This commit is contained in:
Matthias Kretschmann 2021-06-14 15:37:59 +02:00
parent 63bfe43c5b
commit 88bead1474
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -14,7 +14,7 @@ import axios, { CancelToken } from 'axios'
import { retrieveDDO } from '../utils/aquarius'
import { getPrice } from '../utils/subgraph'
import { MetadataMarket } from '../@types/MetaData'
import { useOcean } from './Ocean'
import { DDO_TEMPORARY, useOcean } from './Ocean'
import { useWeb3 } from './Web3'
import { getOceanConfig } from '../utils/ocean'
import { useSiteMetadata } from '../hooks/useSiteMetadata'
@ -155,9 +155,8 @@ function AssetProvider({
useEffect(() => {
if (!networkId || !ddo) return
// TODO: replace with actual check against multinetwork DDO
// const isAssetNetwork = networkId === ddo.networkId
const isAssetNetwork = true
// TODO: remove typing once present in ocean.js' DDO typing
const isAssetNetwork = networkId === (ddo as DDO_TEMPORARY).chainId
setIsAssetNetwork(isAssetNetwork)
}, [networkId, ddo])