display msg if tx not found

pull/7/head
yann300 8 years ago
parent e7ef7f4fea
commit b2e4b3fa75
  1. 5
      src/ui/DropdownPanel.js
  2. 13
      src/ui/TxBrowser.js

@ -81,4 +81,9 @@ DropdownPanel.prototype.toggle = function () {
}
}
DropdownPanel.prototype.hide = function () {
var el = this.view.querySelector('.dropdownpanel')
el.style.display = 'none'
}
module.exports = DropdownPanel

@ -37,6 +37,7 @@ TxBrowser.prototype.setDefaultValues = function () {
this.connectInfo = ''
this.basicPanel.data = {}
this.basicPanel.update()
this.basicPanel.hide()
this.updateWeb3Url(util.web3.currentProvider.host)
}
@ -57,16 +58,16 @@ TxBrowser.prototype.submit = function () {
})
}
} catch (e) {
console.log(e)
self.update(e.message)
}
}
TxBrowser.prototype.update = function (error, tx) {
var info = {}
if (error) {
console.log(error)
return
}
var info = {}
info[''] = error
} else {
if (tx) {
if (!tx.to) {
tx.to = traceHelper.contractCreationToken('0')
@ -82,8 +83,12 @@ TxBrowser.prototype.update = function (error, tx) {
info.hash = mes
console.log('cannot find ' + this.blockNumber + ' ' + this.txNumber)
}
}
this.basicPanel.data = info
this.basicPanel.update()
if (error) {
this.basicPanel.toggle()
}
}
TxBrowser.prototype.updateWeb3Url = function (newhost) {

Loading…
Cancel
Save