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

Fix style issues.

This commit is contained in:
ssallam 2020-01-22 15:31:27 +01:00
parent 19353437ba
commit 5f331bf467
6 changed files with 12 additions and 12 deletions

View File

@ -99,5 +99,4 @@ export class AgreementStoreManager extends ContractBase {
agreementId: zeroX(agreementId)
})
}
}

View File

@ -16,7 +16,7 @@ import {
ConditionState,
conditionStateNames
} from '../conditions'
import {ServiceType} from "../../../ddo/Service";
import { ServiceType } from '../../../ddo/Service'
export interface Conditions {
lockRewardCondition: LockRewardCondition

View File

@ -4,7 +4,6 @@ import { AgreementStoreManager, TemplateStoreManager } from '../managers'
import DIDRegistry from '../DIDRegistry'
export class EscrowAccessSecretStoreTemplate extends AgreementTemplateBase {
public constructor(
templateManager: TemplateStoreManager,
agreementStoreManager: AgreementStoreManager,

View File

@ -1,10 +1,9 @@
import { AgreementTemplateBase, Conditions} from './AgreementTemplateBase'
import { AgreementTemplateBase, Conditions } from './AgreementTemplateBase'
import { escrowComputeServiceAgreementTemplate } from './EscrowCompute.serviceAgreementTemplate'
import { AgreementStoreManager, TemplateStoreManager } from '../managers';
import DIDRegistry from '../DIDRegistry';
import { AgreementStoreManager, TemplateStoreManager } from '../managers'
import DIDRegistry from '../DIDRegistry'
export class EscrowComputeExecutionTemplate extends AgreementTemplateBase {
public constructor(
templateManager: TemplateStoreManager,
agreementStoreManager: AgreementStoreManager,

View File

@ -123,7 +123,7 @@ export class OceanAgreements extends Instantiable {
const ddo = await this.ocean.aquarius.retrieveDDO(d)
const service = ddo.findServiceById(index)
const templateName = service.attributes.serviceAgreementTemplate.contractName
return await this.ocean.keeper
return this.ocean.keeper
.getTemplateByName(templateName)
.createAgreementFromDDO(
agreementId,
@ -157,7 +157,9 @@ export class OceanAgreements extends Instantiable {
)
if (templateId === `0x${'0'.repeat(64)}`) {
this.logger.error(`agreement ${agreementId} is not found, templateId is ${templateId}`)
this.logger.error(
`agreement ${agreementId} is not found, templateId is ${templateId}`
)
return
}

View File

@ -347,10 +347,11 @@ export class OceanAssets extends Instantiable {
this.logger.log('Creating agreement')
// Get provider from didRegistry if not given in arguments
let _provider = provider
if (!provider) {
const providers = await keeper.didRegistry.getDIDProviders(ddo.shortId())
if (!!providers) {
provider = providers[0]
if (providers) {
_provider = providers[0]
}
}
@ -360,7 +361,7 @@ export class OceanAssets extends Instantiable {
index,
undefined,
consumer,
provider,
_provider,
consumer
)
this.logger.log('Agreement created')