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 React, { ReactElement, useState } from 'react'
|
||||||
import Loader from '@shared/atoms/Loader'
|
import Loader from '@shared/atoms/Loader'
|
||||||
import { ListItem } from '@shared/atoms/Lists'
|
import { ListItem } from '@shared/atoms/Lists'
|
||||||
@ -24,19 +28,14 @@ export default function Results({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
setIsLoading(true)
|
setIsLoading(true)
|
||||||
console.log('getResults job: ', job)
|
const jobResult = await providerInstance.getComputeResultUrl(
|
||||||
const jobResult = await providerInstance.computeResult(
|
|
||||||
job.jobId,
|
|
||||||
0,
|
|
||||||
accountId,
|
|
||||||
'https://v4.provider.rinkeby.oceanprotocol.com/',
|
'https://v4.provider.rinkeby.oceanprotocol.com/',
|
||||||
web3
|
web3,
|
||||||
|
accountId,
|
||||||
|
job.jobId,
|
||||||
|
0
|
||||||
)
|
)
|
||||||
console.log('getResults jobResult: ', jobResult)
|
await downloadFileBrowser(jobResult)
|
||||||
// if (jobStatus?.length > 0) {
|
|
||||||
// job.algorithmLogUrl = jobStatus[0].algorithmLogUrl
|
|
||||||
// job.resultsUrl = jobStatus[0].resultsUrl
|
|
||||||
// }
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LoggerInstance.error(error.message)
|
LoggerInstance.error(error.message)
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user