diff --git a/src/ocean/OceanCompute.ts b/src/ocean/OceanCompute.ts index e6edbf8..8782dbd 100644 --- a/src/ocean/OceanCompute.ts +++ b/src/ocean/OceanCompute.ts @@ -240,13 +240,13 @@ export class OceanCompute extends Instantiable { * @param {Account} consumerAccount The account of the consumer ordering the service. * @param {string} agreementId The service agreement ID. * @param {string} jobId The ID of the compute job to be stopped. - * @return {Promise} Returns the DDO of the result asset. + * @return {Promise} Returns the DDO of the result asset. */ public async result( consumerAccount: Account, agreementId: string, jobId: string - ): Promise { + ): Promise { const status = await this.ocean.brizo.compute( 'get', agreementId, @@ -256,6 +256,6 @@ export class OceanCompute extends Instantiable { jobId ) - return status[0].ddo ? status[0].ddo : null + return status as ComputeJob } }