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:
parent
19353437ba
commit
5f331bf467
@ -99,5 +99,4 @@ export class AgreementStoreManager extends ContractBase {
|
|||||||
agreementId: zeroX(agreementId)
|
agreementId: zeroX(agreementId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import {
|
|||||||
ConditionState,
|
ConditionState,
|
||||||
conditionStateNames
|
conditionStateNames
|
||||||
} from '../conditions'
|
} from '../conditions'
|
||||||
import {ServiceType} from "../../../ddo/Service";
|
import { ServiceType } from '../../../ddo/Service'
|
||||||
|
|
||||||
export interface Conditions {
|
export interface Conditions {
|
||||||
lockRewardCondition: LockRewardCondition
|
lockRewardCondition: LockRewardCondition
|
||||||
|
@ -4,7 +4,6 @@ import { AgreementStoreManager, TemplateStoreManager } from '../managers'
|
|||||||
import DIDRegistry from '../DIDRegistry'
|
import DIDRegistry from '../DIDRegistry'
|
||||||
|
|
||||||
export class EscrowAccessSecretStoreTemplate extends AgreementTemplateBase {
|
export class EscrowAccessSecretStoreTemplate extends AgreementTemplateBase {
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
templateManager: TemplateStoreManager,
|
templateManager: TemplateStoreManager,
|
||||||
agreementStoreManager: AgreementStoreManager,
|
agreementStoreManager: AgreementStoreManager,
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { AgreementTemplateBase, Conditions} from './AgreementTemplateBase'
|
import { AgreementTemplateBase, Conditions } from './AgreementTemplateBase'
|
||||||
import { escrowComputeServiceAgreementTemplate } from './EscrowCompute.serviceAgreementTemplate'
|
import { escrowComputeServiceAgreementTemplate } from './EscrowCompute.serviceAgreementTemplate'
|
||||||
import { AgreementStoreManager, TemplateStoreManager } from '../managers';
|
import { AgreementStoreManager, TemplateStoreManager } from '../managers'
|
||||||
import DIDRegistry from '../DIDRegistry';
|
import DIDRegistry from '../DIDRegistry'
|
||||||
|
|
||||||
export class EscrowComputeExecutionTemplate extends AgreementTemplateBase {
|
export class EscrowComputeExecutionTemplate extends AgreementTemplateBase {
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
templateManager: TemplateStoreManager,
|
templateManager: TemplateStoreManager,
|
||||||
agreementStoreManager: AgreementStoreManager,
|
agreementStoreManager: AgreementStoreManager,
|
||||||
|
@ -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
|
||||||
return await this.ocean.keeper
|
return this.ocean.keeper
|
||||||
.getTemplateByName(templateName)
|
.getTemplateByName(templateName)
|
||||||
.createAgreementFromDDO(
|
.createAgreementFromDDO(
|
||||||
agreementId,
|
agreementId,
|
||||||
@ -157,7 +157,9 @@ export class OceanAgreements extends Instantiable {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (templateId === `0x${'0'.repeat(64)}`) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,10 +347,11 @@ export class OceanAssets extends Instantiable {
|
|||||||
this.logger.log('Creating agreement')
|
this.logger.log('Creating agreement')
|
||||||
|
|
||||||
// Get provider from didRegistry if not given in arguments
|
// Get provider from didRegistry if not given in arguments
|
||||||
|
let _provider = provider
|
||||||
if (!provider) {
|
if (!provider) {
|
||||||
const providers = await keeper.didRegistry.getDIDProviders(ddo.shortId())
|
const providers = await keeper.didRegistry.getDIDProviders(ddo.shortId())
|
||||||
if (!!providers) {
|
if (providers) {
|
||||||
provider = providers[0]
|
_provider = providers[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +361,7 @@ export class OceanAssets extends Instantiable {
|
|||||||
index,
|
index,
|
||||||
undefined,
|
undefined,
|
||||||
consumer,
|
consumer,
|
||||||
provider,
|
_provider,
|
||||||
consumer
|
consumer
|
||||||
)
|
)
|
||||||
this.logger.log('Agreement created')
|
this.logger.log('Agreement created')
|
||||||
|
Loading…
Reference in New Issue
Block a user