fix transactionExecuted event

pull/1/head
yann300 7 years ago
parent 24c4642a91
commit 51f9188165
  1. 3
      src/app/execution/txListener.js
  2. 3
      src/app/tabs/run-tab.js
  3. 2
      src/universal-dapp.js

@ -25,7 +25,8 @@ class TxListener {
this.startListening(context)
}
})
opt.event.udapp.register('transactionExecuted', (to, data, txResult) => {
opt.event.udapp.register('transactionExecuted', (error, to, data, lookupOnly, txResult) => {
if (error) return
if (this.loopId && this._api.isVM()) {
this._api.web3().eth.getTransaction(txResult.transactionHash, (error, tx) => {
if (error) return console.log(error)

@ -371,7 +371,8 @@ function settings (appAPI, appEvents) {
`
// EVENTS
appEvents.udapp.register('transactionExecuted', (to, data, lookupOnly, txResult) => {
appEvents.udapp.register('transactionExecuted', (error, to, data, lookupOnly, txResult) => {
if (error) return
if (!lookupOnly) el.querySelector('#value').value = '0'
})

@ -479,7 +479,7 @@ UniversalDApp.prototype.runTx = function (args, cb) {
function (callback) {
self.txRunner.rawRun(tx, function (error, result) {
if (!args.useCall) {
self.event.trigger('transactionExecuted', [args.to, args.data, result])
self.event.trigger('transactionExecuted', [error, args.to, args.data, false, result])
}
callback(error, result)
})

Loading…
Cancel
Save