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

Merge branch 'feature/v4-c2d' of https://github.com/oceanprotocol/market into feature/v4-c2d

This commit is contained in:
Bogdan Fazakas 2022-06-23 17:20:58 +03:00
commit 8656a6c51b

View File

@ -177,16 +177,15 @@ export async function getAlgorithmsForAsset(
const publisherTrustedAlgorithms =
computeService.compute.publisherTrustedAlgorithms || []
let algorithms: Asset[]
if (!computeService.compute) {
algorithms = []
} else {
const gueryResults = await queryMetadata(
getQueryString(publisherTrustedAlgorithms, asset.chainId),
token
)
algorithms = gueryResults?.results
if (!computeService.compute || publisherTrustedAlgorithms.length === 0) {
return []
}
const gueryResults = await queryMetadata(
getQueryString(publisherTrustedAlgorithms, asset.chainId),
token
)
const algorithms: Asset[] = gueryResults?.results
return algorithms
}