mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
update get compute url and use oceanjs helper for download
This commit is contained in:
parent
f36f3bcc14
commit
10b66d3e0e
@ -1,4 +1,8 @@
|
||||
import { LoggerInstance, Provider } from '@oceanprotocol/lib'
|
||||
import {
|
||||
downloadFileBrowser,
|
||||
LoggerInstance,
|
||||
Provider
|
||||
} from '@oceanprotocol/lib'
|
||||
import React, { ReactElement, useState } from 'react'
|
||||
import Loader from '@shared/atoms/Loader'
|
||||
import { ListItem } from '@shared/atoms/Lists'
|
||||
@ -24,19 +28,14 @@ export default function Results({
|
||||
|
||||
try {
|
||||
setIsLoading(true)
|
||||
console.log('getResults job: ', job)
|
||||
const jobResult = await providerInstance.computeResult(
|
||||
job.jobId,
|
||||
0,
|
||||
accountId,
|
||||
const jobResult = await providerInstance.getComputeResultUrl(
|
||||
'https://v4.provider.rinkeby.oceanprotocol.com/',
|
||||
web3
|
||||
web3,
|
||||
accountId,
|
||||
job.jobId,
|
||||
0
|
||||
)
|
||||
console.log('getResults jobResult: ', jobResult)
|
||||
// if (jobStatus?.length > 0) {
|
||||
// job.algorithmLogUrl = jobStatus[0].algorithmLogUrl
|
||||
// job.resultsUrl = jobStatus[0].resultsUrl
|
||||
// }
|
||||
await downloadFileBrowser(jobResult)
|
||||
} catch (error) {
|
||||
LoggerInstance.error(error.message)
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user