From 1a0a2f6dc7fe7def99ffef579102ba27fe2e012f Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Fri, 10 May 2019 00:58:07 +0200 Subject: [PATCH] commands/init: Skip Etherscan if --abi is provided --- src/commands/init.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commands/init.js b/src/commands/init.js index fc0317410..b639777ce 100644 --- a/src/commands/init.js +++ b/src/commands/init.js @@ -111,10 +111,12 @@ const processInitForm = async ( return value } - // Try loading the ABI from Etherscan - try { - abiFromEtherscan = await loadAbiFromEtherscan(network, value) - } catch (e) {} + // Try loading the ABI from Etherscan, if none was provided + if (!abi) { + try { + abiFromEtherscan = await loadAbiFromEtherscan(network, value) + } catch (e) {} + } return value }, },