1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

fix OceanCompute.result

This commit is contained in:
0x332 2020-02-17 14:57:35 +05:00
parent deb075fdf7
commit 43318f2d6f

View File

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