diff --git a/src/@utils/compute.ts b/src/@utils/compute.ts index b7c5e5d9f..a4967a014 100644 --- a/src/@utils/compute.ts +++ b/src/@utils/compute.ts @@ -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 }