Commit f69e6b2f authored by Iuri Matias's avatar Iuri Matias Committed by yann300

refactor; simplify old debug method

parent b9a0699c
......@@ -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 () {
......
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