refactor; simplify old debug method

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent b9a0699c8c
commit f69e6b2f06
  1. 2
      src/app/debugger/debugger/debugger.js
  2. 17
      src/app/debugger/debuggerUI.js

@ -85,6 +85,8 @@ Debugger.prototype.debug = function (blockNumber, txNumber, tx, loadingCb) {
return
}
self.debugger.solidityProxy.reset({})
if (tx) {
if (!tx.to) {
tx.to = traceHelper.contractCreationToken('0')

@ -121,22 +121,7 @@ class DebuggerUI {
}
debug (txHash) {
const self = this
let web3 = executionContext.web3()
web3.eth.getTransaction(txHash, (error, tx) => {
if (error) {
return console.error("coudn't get txHash: " + error)
}
self.transactionDebugger.debugger.solidityProxy.reset({})
if (tx instanceof Object) {
self.txBrowser.load(tx.hash, tx)
self.startDebugging(null, tx.hash, tx)
} else if (tx instanceof String) {
self.txBrowser.load(tx)
self.startDebugging(null, tx)
}
})
this.startDebugging(null, txHash, null)
}
render () {

Loading…
Cancel
Save