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

Fix test and return value from createAgreement.

This commit is contained in:
ssallam 2020-01-22 15:16:35 +01:00
parent 26de27a31b
commit 19353437ba
3 changed files with 4 additions and 6 deletions

View File

@ -99,8 +99,8 @@ describe('Consume Asset', () => {
it('should get the agreement conditions status not fulfilled', async () => { it('should get the agreement conditions status not fulfilled', async () => {
// Wait for the agreement event // Wait for the agreement event
await ocean.keeper.agreementStoreManager // await ocean.keeper.agreementStoreManager
.getAgreementCreatedEvent(serviceAgreementSignatureResult.agreementId).once() // .getAgreementCreatedEvent(serviceAgreementSignatureResult.agreementId).once()
const status = await ocean.agreements.status( const status = await ocean.agreements.status(
serviceAgreementSignatureResult.agreementId serviceAgreementSignatureResult.agreementId
) )

View File

@ -68,7 +68,7 @@ export class AgreementStoreManager extends ContractBase {
actors: string[], actors: string[],
from?: string from?: string
): Promise<any> { ): Promise<any> {
this.sendFrom( return this.sendFrom(
'createAgreement', 'createAgreement',
[ [
zeroX(agreementId), zeroX(agreementId),

View File

@ -123,7 +123,7 @@ export class OceanAgreements extends Instantiable {
const ddo = await this.ocean.aquarius.retrieveDDO(d) const ddo = await this.ocean.aquarius.retrieveDDO(d)
const service = ddo.findServiceById(index) const service = ddo.findServiceById(index)
const templateName = service.attributes.serviceAgreementTemplate.contractName const templateName = service.attributes.serviceAgreementTemplate.contractName
await this.ocean.keeper return await this.ocean.keeper
.getTemplateByName(templateName) .getTemplateByName(templateName)
.createAgreementFromDDO( .createAgreementFromDDO(
agreementId, agreementId,
@ -133,8 +133,6 @@ export class OceanAgreements extends Instantiable {
provider, provider,
from.getId() from.getId()
) )
return true
} }
/** /**