refactor; remove unneded else

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent cd6061a4c7
commit 007b4ce5fb
  1. 27
      src/app/debugger/debuggerUI/VmDebugger.js

@ -186,20 +186,19 @@ class VmDebuggerLogic {
if (self._parent.currentStepIndex !== index) return
if (!self.storageResolver) return
if (index === self.traceLength - 1) {
var storageJSON = {}
for (var k in self.addresses) {
var address = self.addresses[k]
var storageViewer = new StorageViewer({ stepIndex: self._parent.currentStepIndex, tx: self._parent.tx, address: address }, self.storageResolver, self._traceManager)
storageViewer.storageRange(function (error, result) {
if (!error) {
storageJSON[address] = result
self.event.trigger('traceLengthUpdate', [storageJSON])
}
})
}
} else {
self.event.trigger('traceLengthUpdate', [{}])
if (index !== self.traceLength - 1) {
return self.event.trigger('traceLengthUpdate', [{}])
}
var storageJSON = {}
for (var k in self.addresses) {
var address = self.addresses[k]
var storageViewer = new StorageViewer({ stepIndex: self._parent.currentStepIndex, tx: self._parent.tx, address: address }, self.storageResolver, self._traceManager)
storageViewer.storageRange(function (error, result) {
if (!error) {
storageJSON[address] = result
self.event.trigger('traceLengthUpdate', [storageJSON])
}
})
}
})
}

Loading…
Cancel
Save