Skip to content

Commit

Permalink
remove try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Feb 28, 2019
1 parent 616677a commit 1d74810
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/app/debugger/debugger/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,16 @@ Debugger.prototype.debug = function (blockNumber, txNumber, tx, loadingCb) {
return self.debugTx(tx, loadingCb)
}

try {
if (txNumber.indexOf('0x') !== -1) {
return web3.eth.getTransaction(txNumber, function (_error, result) {
let tx = result
self.debugTx(tx, loadingCb)
})
}
web3.eth.getTransactionFromBlock(blockNumber, txNumber, function (_error, result) {
if (txNumber.indexOf('0x') !== -1) {
return web3.eth.getTransaction(txNumber, function (_error, result) {
let tx = result
self.debugTx(tx, loadingCb)
})
} catch (e) {
console.error(e.message)
}
web3.eth.getTransactionFromBlock(blockNumber, txNumber, function (_error, result) {
let tx = result
self.debugTx(tx, loadingCb)
})
}

Debugger.prototype.debugTx = function (tx, loadingCb) {
Expand Down

0 comments on commit 1d74810

Please sign in to comment.