Commit a906b671 authored by yann300's avatar yann300

fix error msg

parent a79a988a
...@@ -65,10 +65,10 @@ TxBrowser.prototype.submit = function () { ...@@ -65,10 +65,10 @@ TxBrowser.prototype.submit = function () {
TxBrowser.prototype.update = function (error, tx) { TxBrowser.prototype.update = function (error, tx) {
var info = {} var info = {}
if (error) { if (error) {
console.log(error) this.view.querySelector('#error').innerHTML = error
info[''] = error
} else { } else {
if (tx) { if (tx) {
this.view.querySelector('#error').innerHTML = ''
if (!tx.to) { if (!tx.to) {
tx.to = traceHelper.contractCreationToken('0') tx.to = traceHelper.contractCreationToken('0')
} }
...@@ -81,7 +81,7 @@ TxBrowser.prototype.update = function (error, tx) { ...@@ -81,7 +81,7 @@ TxBrowser.prototype.update = function (error, tx) {
info.from = mes info.from = mes
info.to = mes info.to = mes
info.hash = mes info.hash = mes
console.log('cannot find ' + this.blockNumber + ' ' + this.txNumber) this.view.querySelector('#error').innerHTML = 'cannot find ' + this.blockNumber + ' ' + this.txNumber
} }
} }
this.basicPanel.data = info this.basicPanel.data = info
...@@ -153,6 +153,7 @@ TxBrowser.prototype.render = function () { ...@@ -153,6 +153,7 @@ TxBrowser.prototype.render = function () {
<button id='load' class='fa fa-play' title='start debugging' onclick=${function () { self.submit() }} style=${ui.formatCss(style.button)}> <button id='load' class='fa fa-play' title='start debugging' onclick=${function () { self.submit() }} style=${ui.formatCss(style.button)}>
</button> </button>
<button id='unload' class='fa fa-stop' title='stop debugging' onclick=${function () { self.unload() }} style=${ui.formatCss(style.button)}></button> <button id='unload' class='fa fa-stop' title='stop debugging' onclick=${function () { self.unload() }} style=${ui.formatCss(style.button)}></button>
<span id="error"><span>
<div style=${ui.formatCss(style.transactionInfo)} id='txinfo'> <div style=${ui.formatCss(style.transactionInfo)} id='txinfo'>
${this.basicPanel.render()} ${this.basicPanel.render()}
</div> </div>
......
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