diff --git a/src/app/execution/txFormat.js b/src/app/execution/txFormat.js index 484ded1d0a..9ff1e3c4d6 100644 --- a/src/app/execution/txFormat.js +++ b/src/app/execution/txFormat.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) } diff --git a/src/recorder.js b/src/recorder.js index 2109c1e99f..c260481222 100644 --- a/src/recorder.js +++ b/src/recorder.js @@ -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) }) } diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 6ca990f3ef..c3e8dd2d67 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -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') {