From 43318f2d6fd7beb376640950e851b162ac1622b9 Mon Sep 17 00:00:00 2001 From: 0x332 Date: Mon, 17 Feb 2020 14:57:35 +0500 Subject: [PATCH] fix OceanCompute.result --- src/ocean/OceanCompute.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } }