|
|
|
@ -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) { |
|
|
|
@ -110,7 +110,6 @@ TxBrowser.prototype.update = function (error, tx) { |
|
|
|
|
this.view.querySelector('#error').innerHTML = 'Cannot find transaction with reference. Block number: ' + this.blockNumber + '. Transaction index/hash: ' + this.txNumber |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TxBrowser.prototype.updateBlockN = function (ev) { |
|
|
|
|
this.blockNumber = ev.target.value |
|
|
|
@ -145,9 +144,11 @@ TxBrowser.prototype.render = function () { |
|
|
|
|
</div> |
|
|
|
|
<span id='error'></span> |
|
|
|
|
</div>` |
|
|
|
|
|
|
|
|
|
if (!this.view) { |
|
|
|
|
this.view = view |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return view |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|