Commit 1edc5cd0 authored by yann300's avatar yann300

remove indexChanged event registration

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