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

Fix datasets algorithm is allowed to run on returning nothing (#738)

This commit is contained in:
Norbi 2021-07-15 17:46:14 +03:00 committed by GitHub
parent cdedfafca2
commit de519f4969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,10 @@ export default function AlgorithmDatasetsListForCompute({
useEffect(() => {
async function getDatasetsAllowedForCompute() {
const datasetComputeService = dataset.findServiceByType('compute')
const isCompute = Boolean(dataset?.findServiceByType('compute'))
const datasetComputeService = dataset.findServiceByType(
isCompute ? 'compute' : 'access'
)
const datasets = await getAlgorithmDatasetsForCompute(
algorithmDid,
datasetComputeService?.serviceEndpoint,