|
|
|
@ -2,11 +2,11 @@ |
|
|
|
|
var DropdownPanel = require('./DropdownPanel') |
|
|
|
|
var yo = require('yo-yo') |
|
|
|
|
|
|
|
|
|
function StoragePanel (_parent, _traceManager, _address) { |
|
|
|
|
function StoragePanel (_parent, _traceManager, _storageResolver) { |
|
|
|
|
this.parent = _parent |
|
|
|
|
this.storageResolver = _storageResolver |
|
|
|
|
this.traceManager = _traceManager |
|
|
|
|
this.basicPanel = new DropdownPanel('Storage Changes', {json: true}) |
|
|
|
|
this.address = _address |
|
|
|
|
this.basicPanel = new DropdownPanel('Storage', {json: true}) |
|
|
|
|
this.init() |
|
|
|
|
this.disabled = false |
|
|
|
|
} |
|
|
|
@ -22,14 +22,14 @@ StoragePanel.prototype.init = function () { |
|
|
|
|
if (index < 0) return |
|
|
|
|
if (self.parent.currentStepIndex !== index) return |
|
|
|
|
|
|
|
|
|
self.traceManager.getStorageAt(index, self.parent.tx, function (error, storage) { |
|
|
|
|
self.storageResolver.storageRange((error, storage) => { |
|
|
|
|
if (error) { |
|
|
|
|
console.log(error) |
|
|
|
|
self.basicPanel.update({}) |
|
|
|
|
} else if (self.parent.currentStepIndex === index) { |
|
|
|
|
self.basicPanel.update(storage) |
|
|
|
|
} |
|
|
|
|
}, self.address) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|