1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix selecting algorithms when on different network

This commit is contained in:
Bogdan Fazakas 2022-05-04 14:04:06 +03:00
parent 86c7e7f7cc
commit 83c271dbab

View File

@ -48,6 +48,7 @@ import { getComputeFeedback } from '@utils/feedback'
import { usePool } from '@context/Pool'
import { useMarketMetadata } from '@context/MarketMetadata'
import { getPoolData } from '@context/Pool/_utils'
import { getDummyWeb3 } from '@utils/web3'
export default function Compute({
asset,
@ -109,6 +110,7 @@ export default function Compute({
async function checkAssetDTBalance(asset: DDO): Promise<boolean> {
if (!asset?.services[0].datatokenAddress) return
const web3 = await getDummyWeb3(asset?.chainId)
const datatokenInstance = new Datatoken(web3)
const dtBalance = await datatokenInstance.balance(
asset?.services[0].datatokenAddress,