mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
added the check for the status of the template that is used to sign the service agreement
This commit is contained in:
parent
e1b1642907
commit
85496f7002
@ -109,6 +109,12 @@ export default class ServiceAgreement extends OceanBase {
|
||||
throw new Error(`TemplateId not found in service "${service.type}" ddo.`)
|
||||
}
|
||||
|
||||
const templateActive = await serviceAgreement.getTemplateStatus(service.templateId)
|
||||
|
||||
if (!templateActive) {
|
||||
throw new Error(`Template with id ${service.templateId} is not active.`)
|
||||
}
|
||||
|
||||
const executeAgreementReceipt = await serviceAgreement
|
||||
.executeAgreement(
|
||||
service.templateId,
|
||||
|
Loading…
Reference in New Issue
Block a user