This commit is contained in:
Iuri Matias 2018-06-15 17:24:19 -04:00
parent ad6a6cf328
commit 6845c7124b

View File

@ -22,7 +22,7 @@ class GasEstimator {
async.each(contract.abiDefinition.filter((x) => x.type !== "event"), async.each(contract.abiDefinition.filter((x) => x.type !== "event"),
(abiMethod, gasCb) => { (abiMethod, gasCb) => {
let name = abiMethod.name; let name = abiMethod.name;
if (abiMethod.type == "constructor") { if (abiMethod.type === "constructor") {
// already provided for us // already provided for us
gasMap['constructor'] = contract.gasEstimates.creation.totalCost.toString(); gasMap['constructor'] = contract.gasEstimates.creation.totalCost.toString();
return gasCb(null, name, abiMethod.type); return gasCb(null, name, abiMethod.type);
@ -61,7 +61,7 @@ class GasEstimator {
}, },
(err, name, type) => { (err, name, type) => {
if (err) { if (err) {
if (type == "constructor" || type == "fallback") name = type; if (type === "constructor" || type === "fallback") name = type;
return cb(err, null, name); return cb(err, null, name);
} }
cb(null, gasMap, null); cb(null, gasMap, null);