Commit 479f9dea authored by yann300's avatar yann300

add initiatingTransaction event && stamp to associate with executed

parent ed187886
...@@ -534,11 +534,13 @@ UniversalDApp.prototype.runTx = function (args, cb) { ...@@ -534,11 +534,13 @@ UniversalDApp.prototype.runTx = function (args, cb) {
}, },
// run transaction // run transaction
function (callback) { function (callback) {
var stamp = Date.now()
self.event.trigger('initiatingTransaction', [stamp, tx])
self.txRunner.rawRun(tx, function (error, result) { self.txRunner.rawRun(tx, function (error, result) {
if (!args.useCall) { if (!args.useCall) {
self.event.trigger('transactionExecuted', [error, args.from, args.to, args.data, false, result]) self.event.trigger('transactionExecuted', [error, args.from, args.to, args.data, false, result, stamp])
} else { } else {
self.event.trigger('callExecuted', [error, args.from, args.to, args.data, true, result]) self.event.trigger('callExecuted', [error, args.from, args.to, args.data, true, result, stamp])
} }
if (error) { if (error) {
if (typeof (error) !== 'string') { if (typeof (error) !== 'string') {
......
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