clean up; remove unnecessary else's

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent 13b3aebad1
commit c371e04925
  1. 11
      src/app/debugger/debuggerUI/TxBrowser.js

@ -75,14 +75,13 @@ TxBrowser.prototype.submit = function (tx) {
}
try {
if (this.txNumber.indexOf('0x') !== -1) {
self.web3.eth.getTransaction(this.txNumber, function (error, result) {
return self.web3.eth.getTransaction(this.txNumber, function (error, result) {
self.update(error, result)
})
} else {
}
self.web3.eth.getTransactionFromBlock(this.blockNumber, this.txNumber, function (error, result) {
self.update(error, result)
})
}
} catch (e) {
self.update(e.message)
}
@ -92,7 +91,8 @@ TxBrowser.prototype.update = function (error, tx) {
var info = {}
if (error) {
this.view.querySelector('#error').innerHTML = error
} else {
return
}
if (tx) {
this.view.querySelector('#error').innerHTML = ''
if (!tx.to) {
@ -109,7 +109,6 @@ TxBrowser.prototype.update = function (error, tx) {
info.hash = mes
this.view.querySelector('#error').innerHTML = 'Cannot find transaction with reference. Block number: ' + this.blockNumber + '. Transaction index/hash: ' + this.txNumber
}
}
}
TxBrowser.prototype.updateBlockN = function (ev) {
@ -145,9 +144,11 @@ TxBrowser.prototype.render = function () {
</div>
<span id='error'></span>
</div>`
if (!this.view) {
this.view = view
}
return view
}

Loading…
Cancel
Save