diff --git a/src/app/debugger/debuggerUI/VmDebugger.js b/src/app/debugger/debuggerUI/VmDebugger.js index 3623a0f8cd..256dad80b0 100644 --- a/src/app/debugger/debuggerUI/VmDebugger.js +++ b/src/app/debugger/debuggerUI/VmDebugger.js @@ -39,6 +39,19 @@ function VmDebugger (_parentUI, _traceManager, _codeManager, _solidityProxy, _ca }) this.calldataPanel = new CalldataPanel(_parentUI, _traceManager) + _parentUI.event.register('indexChanged', this, function (index) { + if (index < 0) return + if (_parentUI.currentStepIndex !== index) return + + _traceManager.getCallDataAt(index, function (error, calldata) { + if (error) { + console.log(error) + self.calldataPanel.update({}) + } else if (_parentUI.currentStepIndex === index) { + self.calldataPanel.update(calldata) + } + }) + }) this.stackPanel = new StackPanel(_parentUI, _traceManager) this.storagePanel = new StoragePanel(_parentUI, _traceManager) diff --git a/src/app/debugger/debuggerUI/vmDebugger/CalldataPanel.js b/src/app/debugger/debuggerUI/vmDebugger/CalldataPanel.js index 6207b078cb..afd072ba48 100644 --- a/src/app/debugger/debuggerUI/vmDebugger/CalldataPanel.js +++ b/src/app/debugger/debuggerUI/vmDebugger/CalldataPanel.js @@ -6,28 +6,14 @@ function CalldataPanel (_parentUI, _traceManager) { this._parentUI = _parentUI this.traceManager = _traceManager this.basicPanel = new DropdownPanel('Call Data', {json: true}) - this.init() } -CalldataPanel.prototype.render = function () { - return yo`