From b6a38c90331f23450e6b015ec364b6388f7ab60e Mon Sep 17 00:00:00 2001 From: ninabreznik Date: Tue, 19 Dec 2017 02:39:53 +0700 Subject: [PATCH] Little fixes --- src/app/editor/contextualListener.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/editor/contextualListener.js b/src/app/editor/contextualListener.js index 9893767724..2c2530fa38 100644 --- a/src/app/editor/contextualListener.js +++ b/src/app/editor/contextualListener.js @@ -148,7 +148,7 @@ class ContextualListener { var fn = fnName + this._getInputParams(node) if (node.attributes.visibility === 'public') { executionCost = this.estimationObj.external[fn] - } else if (node.attributes.visibility === 'internal') { + } else if (node.attributes.visibility === 'private') { executionCost = this.estimationObj.internal[fn] } } else { @@ -164,11 +164,9 @@ class ContextualListener { _getContract (node) { for (var i in this.nodes) { if (this.nodes[i].id === node.attributes.scope) { - var contract = this._getGasEstimation(this.nodes[i]) - break + return this._getGasEstimation(this.nodes[i]) } } - return contract } _getInputParams (node) {