mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Fix inheritance issue.
This commit is contained in:
parent
1caf92e12f
commit
6c25ec5bbd
@ -59,6 +59,7 @@ export class AgreementTemplateBase {
|
||||
this.conditions = conditions
|
||||
|
||||
this.logger = LoggerInstance
|
||||
this.templateName = 'invalid'
|
||||
}
|
||||
|
||||
public async createAgreementFromDDO(
|
||||
@ -90,8 +91,12 @@ export class AgreementTemplateBase {
|
||||
)
|
||||
}
|
||||
|
||||
public getName() {
|
||||
return this.templateName
|
||||
}
|
||||
|
||||
public getId() {
|
||||
return this.templateManager.generateId(this.templateName)
|
||||
return this.templateManager.generateId(this.getName())
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,7 +149,6 @@ export class AgreementTemplateBase {
|
||||
return null
|
||||
}
|
||||
|
||||
// getAgreementData
|
||||
/**
|
||||
* Conditions address list.
|
||||
* @return {Promise<string[]>} Conditions address.
|
||||
|
@ -1,8 +1,19 @@
|
||||
import { AgreementTemplateBase } from './AgreementTemplateBase'
|
||||
import { AgreementTemplateBase, Conditions } from './AgreementTemplateBase'
|
||||
import { escrowAccessServiceAgreementTemplate } from './EscrowAccess.serviceAgreementTemplate'
|
||||
import { AgreementStoreManager, TemplateStoreManager } from '../managers'
|
||||
import DIDRegistry from '../DIDRegistry';
|
||||
|
||||
export class EscrowAccessSecretStoreTemplate extends AgreementTemplateBase {
|
||||
public templateName: 'EscrowAccessSecretStoreTemplate'
|
||||
|
||||
public constructor(
|
||||
templateManager: TemplateStoreManager,
|
||||
agreementStoreManager: AgreementStoreManager,
|
||||
didRegistry: DIDRegistry,
|
||||
conditions: Conditions
|
||||
) {
|
||||
super(templateManager, agreementStoreManager, didRegistry, conditions)
|
||||
this.templateName = 'EscrowAccessSecretStoreTemplate'
|
||||
}
|
||||
|
||||
public async getServiceAgreementTemplate() {
|
||||
return escrowAccessServiceAgreementTemplate
|
||||
|
@ -1,8 +1,19 @@
|
||||
import { AgreementTemplateBase } from './AgreementTemplateBase'
|
||||
import { AgreementTemplateBase, Conditions} from './AgreementTemplateBase'
|
||||
import { escrowComputeServiceAgreementTemplate } from './EscrowCompute.serviceAgreementTemplate'
|
||||
import { AgreementStoreManager, TemplateStoreManager } from '../managers';
|
||||
import DIDRegistry from '../DIDRegistry';
|
||||
|
||||
export class EscrowComputeExecutionTemplate extends AgreementTemplateBase {
|
||||
public templateName: 'EscrowComputeExecutionTemplate'
|
||||
|
||||
public constructor(
|
||||
templateManager: TemplateStoreManager,
|
||||
agreementStoreManager: AgreementStoreManager,
|
||||
didRegistry: DIDRegistry,
|
||||
conditions: Conditions
|
||||
) {
|
||||
super(templateManager, agreementStoreManager, didRegistry, conditions)
|
||||
this.templateName = 'EscrowComputeExecutionTemplate'
|
||||
}
|
||||
|
||||
public async getServiceAgreementTemplate() {
|
||||
return escrowComputeServiceAgreementTemplate
|
||||
|
Loading…
Reference in New Issue
Block a user