Add guard to check that configs has tags

This commit is contained in:
Arnaud 2025-05-22 17:39:01 +02:00
parent 28cf61f45e
commit 36a5d02fee
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 5 additions and 2 deletions

View File

@ -27,8 +27,9 @@ module.exports = buildModule("Marketplace", (m) => {
)
let testMarketplace
const config = hre.network.config
if (hre.network.config && hre.network.config.tags.includes("local")) {
if (config && config.tags && config.tags.includes("local")) {
const { testVerifier } = m.useModule(VerifierModule)
testMarketplace = m.contract(

View File

@ -10,7 +10,9 @@ module.exports = buildModule("Token", (m) => {
from: deployer,
})
if (hre.network.config && hre.network.config.tags.includes("local")) {
const config = hre.network.config
if (config && config.tags && config.tags.includes("local")) {
for (let i = 0; i < MAX_ACCOUNTS; i++) {
const account = m.getAccount(i)
m.call(token, "mint", [account, MINTED_TOKENS], {