diff --git a/src/components/pages/History/ComputeDetailsModal.tsx b/src/components/pages/History/ComputeDetailsModal.tsx index 650a771f6..9b62b5e06 100644 --- a/src/components/pages/History/ComputeDetailsModal.tsx +++ b/src/components/pages/History/ComputeDetailsModal.tsx @@ -3,8 +3,6 @@ import { useOcean } from '@oceanprotocol/react' import React, { ReactElement, useEffect, useState } from 'react' import Loader from '../../atoms/Loader' import Modal from '../../atoms/Modal' -import AssetList from '../../organisms/AssetList' -import { ComputeJob } from '@oceanprotocol/lib/dist/node/ocean/interfaces/ComputeJob' import { ComputeJobMetaData } from '@types/ComputeJobMetaData' import Time from '../../atoms/Time' import shortid from 'shortid' @@ -32,9 +30,9 @@ export default function ComputeDetailsModal({ computeJob.did, computeJob.jobId ) - console.log(job[0]) if (job && job.length > 0) { computeJob.algorithmLogUrl = job[0].algorithmLogUrl + //hack because ComputeJob returns resultsUrl instead of resultsUrls, issue created already computeJob.resultsUrls = (job[0] as any).resultsUrl !== '' ? (job[0] as any).resultsUrl : [] } @@ -45,7 +43,7 @@ export default function ComputeDetailsModal({ } } getDetails() - }, [ocean, status, account, open]) + }, [ocean, status, account, isOpen]) return ( { jobs.push({ did: orderHistory[i].did, @@ -111,14 +110,11 @@ export default function ComputeJobs(): ReactElement { assetName: assetName, status: item.status, statusText: item.statusText, - algorithmLogUrl: item.algorithmLogUrl, - resultsUrls: - (item as any).resultsUrl !== '' ? (item as any).resultsUrl : [] + algorithmLogUrl: "", + resultsUrls: [] }) }) } - console.log(jobs) - jobs setJobs( jobs.sort((a, b) => { if (a.dateCreated > b.dateCreated) return -1 @@ -127,9 +123,8 @@ export default function ComputeJobs(): ReactElement { }) ) - setUserAgreed(true) - } catch (e) { - console.log(e) + } catch (error) { + Logger.log(error.message) } finally { setIsLoading(false) }