diff --git a/src/components/organisms/AssetActions/Compute/index.tsx b/src/components/organisms/AssetActions/Compute/index.tsx
index 102b2a045..47c45cc60 100644
--- a/src/components/organisms/AssetActions/Compute/index.tsx
+++ b/src/components/organisms/AssetActions/Compute/index.tsx
@@ -387,7 +387,10 @@ export default function Compute({
text="This algorithm has been set to private by the publisher and can't be downloaded. You can run it against any allowed data sets though!"
state="info"
/>
-
+
>
) : (
{type === 'algorithm' && (
-
+
)}
diff --git a/src/components/organisms/AssetContent/AlgorithmDatasetsListForCompute.tsx b/src/components/organisms/AssetContent/AlgorithmDatasetsListForCompute.tsx
index 7531ef390..2ddf5890f 100644
--- a/src/components/organisms/AssetContent/AlgorithmDatasetsListForCompute.tsx
+++ b/src/components/organisms/AssetContent/AlgorithmDatasetsListForCompute.tsx
@@ -5,11 +5,14 @@ import { AssetSelectionAsset } from '../../molecules/FormFields/AssetSelection'
import AssetComputeList from '../../molecules/AssetComputeList'
import { useOcean } from '../../../providers/Ocean'
import { useAsset } from '../../../providers/Asset'
+import { DDO } from '@oceanprotocol/lib'
export default function AlgorithmDatasetsListForCompute({
- algorithmDid
+ algorithmDid,
+ dataset
}: {
algorithmDid: string
+ dataset: DDO
}): ReactElement {
const { config } = useOcean()
const { type } = useAsset()
@@ -18,8 +21,11 @@ export default function AlgorithmDatasetsListForCompute({
useEffect(() => {
async function getDatasetsAllowedForCompute() {
+ const datasetComputeService = dataset.findServiceByType('compute')
+ datasetComputeService
const datasets = await getAlgorithmDatasetsForCompute(
algorithmDid,
+ datasetComputeService?.serviceEndpoint,
config.metadataCacheUri
)
setDatasetsForCompute(datasets)
diff --git a/src/utils/aquarius.ts b/src/utils/aquarius.ts
index 6f43b4635..e00f8faac 100644
--- a/src/utils/aquarius.ts
+++ b/src/utils/aquarius.ts
@@ -171,6 +171,7 @@ export async function transformDDOToAssetSelection(
export async function getAlgorithmDatasetsForCompute(
algorithmId: string,
+ datasetProviderUri: string,
metadataCacheUri: string
): Promise {
const source = axios.CancelToken.source()
@@ -192,6 +193,7 @@ export async function getAlgorithmDatasetsForCompute(
return []
}
const datasets = await transformDDOToAssetSelection(
+ datasetProviderUri,
computeDatasetsForCurrentAlgorithm,
metadataCacheUri,
[]