1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
commons/client/src/utils/getUserJobs.ts
2020-05-19 09:25:10 -07:00

15 lines
392 B
TypeScript

import { Account } from '@oceanprotocol/squid'
export async function getUserJobs(ocean: any, account: string) {
try {
const accounts = await ocean.accounts.list()
const account = accounts[0]
await account.authenticate()
const jobList = await ocean.compute.status(account)
return jobList
} catch (error) {
console.error(error)
}
}