Commit 1edc5cd0 authored by yann300's avatar yann300

remove indexChanged event registration

parent 4716dad8
...@@ -28,34 +28,25 @@ class SolidityLocals { ...@@ -28,34 +28,25 @@ class SolidityLocals {
} }
init () { init () {
this.parent.event.register('indexChanged', this, (index) => { this.parent.event.register('sourceLocationChanged', this, (sourceLocation) => {
var warningDiv = this.view.querySelector('#warning') var warningDiv = this.view.querySelector('#warning')
warningDiv.innerHTML = '' warningDiv.innerHTML = ''
if (index < 0) { this.traceManager.waterfall([
warningDiv.innerHTML = 'invalid step index' this.traceManager.getStackAt,
return this.traceManager.getMemoryAt],
} this.parent.currentStepIndex,
(error, result) => {
if (this.parent.currentStepIndex !== index) return if (!error) {
var stack = result[0].value
this.parent.event.register('sourceLocationChanged', this, (sourceLocation) => { var memory = result[1].value
this.traceManager.waterfall([ try {
this.traceManager.getStackAt, var locals = localDecoder.solidityLocals(this.parent.currentStepIndex, this.internalTreeCall, stack, memory, sourceLocation)
this.traceManager.getMemoryAt], this.basicPanel.update(locals)
index, } catch (e) {
(error, result) => { warningDiv.innerHTML = e.message
if (!error) {
var stack = result[0].value
var memory = result[1].value
try {
var locals = localDecoder.solidityLocals(index, this.internalTreeCall, stack, memory, sourceLocation)
this.basicPanel.update(locals)
} catch (e) {
warningDiv.innerHTML = e.message
}
} }
}) }
}) })
}) })
} }
} }
......
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