Commit daaddd48 authored by ninabreznik's avatar ninabreznik

Add if (node.name === FunctionDefinition)

parent d9c50a8e
...@@ -172,6 +172,7 @@ class ContextView { ...@@ -172,6 +172,7 @@ class ContextView {
</div>` </div>`
function showGasEstimation () { function showGasEstimation () {
if (node.name === 'FunctionDefinition') {
var result = self._api.contextualListener.gasEstimation(node) var result = self._api.contextualListener.gasEstimation(node)
var executionCost = 'Execution cost: ' + result.executionCost + ' gas' var executionCost = 'Execution cost: ' + result.executionCost + ' gas'
var codeDepositCost = 'Code deposit cost: ' + result.codeDepositCost + ' gas' var codeDepositCost = 'Code deposit cost: ' + result.codeDepositCost + ' gas'
...@@ -181,7 +182,7 @@ class ContextView { ...@@ -181,7 +182,7 @@ class ContextView {
${estimatedGas} ${estimatedGas}
</div>` </div>`
} }
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment