diff --git a/commands/metamask.js b/commands/metamask.js index 0b8b65869..7ae865ffb 100644 --- a/commands/metamask.js +++ b/commands/metamask.js @@ -261,14 +261,21 @@ module.exports = { addNetworkPageElements.chainIdInput, network.chainId, ); - await puppeteer.waitAndType( - addNetworkPageElements.symbolInput, - network.symbol, - ); - await puppeteer.waitAndType( - addNetworkPageElements.blockExplorerInput, - network.blockExplorer, - ); + + if (network.symbol) { + await puppeteer.waitAndType( + addNetworkPageElements.symbolInput, + network.symbol, + ); + } + + if (network.blockExplorer) { + await puppeteer.waitAndType( + addNetworkPageElements.blockExplorerInput, + network.blockExplorer, + ); + } + await puppeteer.waitAndClick(addNetworkPageElements.saveButton); await puppeteer.waitAndClick(settingsPageElements.closeButton); await puppeteer.waitForText(