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:
parent
86c7e7f7cc
commit
83c271dbab
@ -48,6 +48,7 @@ import { getComputeFeedback } from '@utils/feedback'
|
|||||||
import { usePool } from '@context/Pool'
|
import { usePool } from '@context/Pool'
|
||||||
import { useMarketMetadata } from '@context/MarketMetadata'
|
import { useMarketMetadata } from '@context/MarketMetadata'
|
||||||
import { getPoolData } from '@context/Pool/_utils'
|
import { getPoolData } from '@context/Pool/_utils'
|
||||||
|
import { getDummyWeb3 } from '@utils/web3'
|
||||||
|
|
||||||
export default function Compute({
|
export default function Compute({
|
||||||
asset,
|
asset,
|
||||||
@ -109,6 +110,7 @@ export default function Compute({
|
|||||||
|
|
||||||
async function checkAssetDTBalance(asset: DDO): Promise<boolean> {
|
async function checkAssetDTBalance(asset: DDO): Promise<boolean> {
|
||||||
if (!asset?.services[0].datatokenAddress) return
|
if (!asset?.services[0].datatokenAddress) return
|
||||||
|
const web3 = await getDummyWeb3(asset?.chainId)
|
||||||
const datatokenInstance = new Datatoken(web3)
|
const datatokenInstance = new Datatoken(web3)
|
||||||
const dtBalance = await datatokenInstance.balance(
|
const dtBalance = await datatokenInstance.balance(
|
||||||
asset?.services[0].datatokenAddress,
|
asset?.services[0].datatokenAddress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user