refactor; simplify old debug method

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent a10323f820
commit 33b70beb7c
  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 return
} }
self.debugger.solidityProxy.reset({})
if (tx) { if (tx) {
if (!tx.to) { if (!tx.to) {
tx.to = traceHelper.contractCreationToken('0') tx.to = traceHelper.contractCreationToken('0')

@ -121,22 +121,7 @@ class DebuggerUI {
} }
debug (txHash) { debug (txHash) {
const self = this this.startDebugging(null, txHash, null)
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)
}
})
} }
render () { render () {

Loading…
Cancel
Save