fix loading trace

pull/1/head
yann300 6 years ago
parent df3e3340dd
commit 88af44035e
  1. 3
      src/app/debugger/debugger.js
  2. 14
      src/app/debugger/remix-debugger/src/ui/TxBrowser.js

@ -101,8 +101,7 @@ Debugger.prototype.debug = function (txHash) {
this.debugger.web3.eth.getTransaction(txHash, function (error, tx) {
if (!error) {
self.debugger_ui.txBrowser.event.trigger('newTraceRequested', [undefined, undefined, tx])
self.debugger.debug(tx)
self.debugger_ui.debug(tx)
}
})
}

@ -73,13 +73,17 @@ TxBrowser.prototype.setDefaultValues = function () {
}
}
TxBrowser.prototype.submit = function () {
TxBrowser.prototype.submit = function (tx) {
var self = this
self.event.trigger('newTxLoading', [this.blockNumber, this.txNumber])
if (tx) {
return self.update(null, tx)
}
if (!this.txNumber) {
self.update('no tx index or tx hash to look for')
return
}
this.event.trigger('newTxLoading', [this.blockNumber, this.txNumber])
try {
var self = this
if (this.txNumber.indexOf('0x') !== -1) {
self.web3.eth.getTransaction(this.txNumber, function (error, result) {
self.update(error, result)
@ -150,9 +154,9 @@ TxBrowser.prototype.updateTxN = function (ev) {
this.txNumber = ev.target.value
}
TxBrowser.prototype.load = function (txHash) {
TxBrowser.prototype.load = function (txHash, tx) {
this.txNumber = txHash
this.submit()
this.submit(tx)
}
TxBrowser.prototype.unload = function (txHash) {

Loading…
Cancel
Save