fix data structure

pull/3094/head
yann300 7 years ago
parent 16f121516c
commit 8af71ab32d
  1. 3
      src/app/execution/txFormat.js
  2. 4
      src/recorder.js
  3. 8
      src/universal-dapp.js

@ -143,7 +143,8 @@ module.exports = {
}, callbackStep)
} else {
callbackStep(`creation of library ${libraryName} pending...`)
udapp.runTx({ data: bytecode, useCall: false }, (err, txResult) => {
var data = {dataHex: bytecode}
udapp.runTx({ data: data, useCall: false }, (err, txResult) => {
if (err) {
return callback(err)
}

@ -195,7 +195,7 @@ class Recorder {
cb(data.error)
return
} else {
record.data = data.data
record.data = { dataHex: data.data, funArgs: tx.record.parameters, funAbi: fnABI, contractBytecode: tx.record.bytecode }
}
self._api.udapp().runTx(record, function (err, txResult) {
if (err) {
@ -211,7 +211,7 @@ class Recorder {
newContractFn(abi, address, record.contractName)
}
}
cb()
cb(err)
})
}, () => { self.setListen(true) })
}

@ -527,14 +527,14 @@ function queryAddress (env, next) {
}
function runTransaction (env, next) {
var { self, args, tx, payLoad } = env
var { self, tx, payLoad } = env
var timestamp = Date.now()
self.event.trigger('initiatingTransaction', [timestamp, tx, payLoad])
self.txRunner.rawRun(tx, function (error, result) {
if (!args.useCall) {
self.event.trigger('transactionExecuted', [error, args.from, args.to, args.data, false, result, timestamp, payLoad])
if (!tx.useCall) {
self.event.trigger('transactionExecuted', [error, tx.from, tx.to, tx.data, false, result, timestamp, payLoad])
} else {
self.event.trigger('callExecuted', [error, args.from, args.to, args.data, true, result, timestamp, payLoad])
self.event.trigger('callExecuted', [error, tx.from, tx.to, tx.data, true, result, timestamp, payLoad])
}
if (error) {
if (typeof (error) !== 'string') {

Loading…
Cancel
Save