From 0e876edadf4e2571c17457d71ff12e94ed703e5f Mon Sep 17 00:00:00 2001 From: "Miquel A. Cabot" Date: Thu, 24 Mar 2022 09:55:27 +0100 Subject: [PATCH] fix error in NftFactory.disableTokenTemplate() and NftFactory.reactivateTokenTemplate() --- src/factories/NFTFactory.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/factories/NFTFactory.ts b/src/factories/NFTFactory.ts index 5af4822f..ce3e97da 100644 --- a/src/factories/NFTFactory.ts +++ b/src/factories/NFTFactory.ts @@ -492,14 +492,14 @@ export class NftFactory { if ((await this.getOwner()) !== address) { throw new Error(`Caller is not Factory Owner`) } - if (templateIndex > (await this.getCurrentNFTTemplateCount())) { + if (templateIndex > (await this.getCurrentTokenTemplateCount())) { throw new Error(`Template index doesnt exist`) } if (templateIndex === 0) { throw new Error(`Template index cannot be ZERO`) } - if ((await this.getNFTTemplate(templateIndex)).isActive === false) { + if ((await this.getTokenTemplate(templateIndex)).isActive === false) { throw new Error(`Template is already disabled`) } const estGas = await this.estGasDisableTokenTemplate(address, templateIndex) @@ -551,7 +551,7 @@ export class NftFactory { if ((await this.getOwner()) !== address) { throw new Error(`Caller is not Factory Owner`) } - if (templateIndex > (await this.getCurrentNFTTemplateCount())) { + if (templateIndex > (await this.getCurrentTokenTemplateCount())) { throw new Error(`Template index doesnt exist`) }