From 41f77793f425e7d98e29b9f42838551b2d2af4a7 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Tue, 12 Jun 2018 12:54:41 -0500 Subject: [PATCH] more patchy mcpatchface Signed-off-by: VoR0220 --- lib/modules/gasEstimator/index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/modules/gasEstimator/index.js b/lib/modules/gasEstimator/index.js index dee093de..62ff637c 100644 --- a/lib/modules/gasEstimator/index.js +++ b/lib/modules/gasEstimator/index.js @@ -25,21 +25,18 @@ class GasEstimator { if (abiMethod.type === "constructor") { // already provided for us gasMap['constructor'] = contract.gasEstimates.creation.totalCost.toString(); - gasCb(null); + gasCb(); } else if (abiMethod.type === "fallback") { gasMap['fallback'] = contract.gasEstimates.external[""].toString(); - gasCb(null); + gasCb(); } else if (abiMethod.inputs === null || abiMethod.inputs === undefined || abiMethod.inputs.length === 0) { // just run it and register it contractObj.methods[name] .apply(contractObj.methods[name], []) .estimateGas((err, gasAmount) => { - if (err) { - return gasCb(err); - } else { - gasMap[name] = gasAmount; - gasCb(null, gasAmount, name); - } + if (err) return gasCb(err); + gasMap[name] = gasAmount; + gasCb(); }); } else { // async concatenate all the fuzz values and their gas cost outputs and check for equality