remove unneded if else

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent 644af32fca
commit 4b20698a94
  1. 35
      src/app/debugger/SolidityLocals.js

@ -40,24 +40,23 @@ class DebuggerSolidityLocals {
self.traceManager.getCurrentCalledAddressAt], self.traceManager.getCurrentCalledAddressAt],
self.parent.currentStepIndex, self.parent.currentStepIndex,
(error, result) => { (error, result) => {
if (!error) { if (error) {
var stack = result[0].value return console.log(error)
var memory = result[1].value }
try { var stack = result[0].value
var storageViewer = new StorageViewer({ stepIndex: self.parent.currentStepIndex, tx: self.parent.tx, address: result[2].value }, self.storageResolver, self.traceManager) var memory = result[1].value
localDecoder.solidityLocals(self.parent.currentStepIndex, self.internalTreeCall, stack, memory, storageViewer, sourceLocation).then((locals) => { try {
if (!locals.error) { var storageViewer = new StorageViewer({ stepIndex: self.parent.currentStepIndex, tx: self.parent.tx, address: result[2].value }, self.storageResolver, self.traceManager)
self.event.trigger('solidityLocals', [locals]) localDecoder.solidityLocals(self.parent.currentStepIndex, self.internalTreeCall, stack, memory, storageViewer, sourceLocation).then((locals) => {
} if (!locals.error) {
if (!Object.keys(locals).length) { self.event.trigger('solidityLocals', [locals])
self.event.trigger('solidityLocalsMessage', ['no locals']) }
} if (!Object.keys(locals).length) {
}) self.event.trigger('solidityLocalsMessage', ['no locals'])
} catch (e) { }
self.event.trigger('solidityLocalsMessage', [e.message]) })
} } catch (e) {
} else { self.event.trigger('solidityLocalsMessage', [e.message])
console.log(error)
} }
}) })
} }

Loading…
Cancel
Save