From 479f9dea5138d80228f7450c20603988f37e4ba5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 20 Sep 2017 10:40:26 +0200 Subject: [PATCH] add initiatingTransaction event && stamp to associate with executed --- src/universal-dapp.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index 8194ca31fe..df04db87b1 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -534,11 +534,13 @@ UniversalDApp.prototype.runTx = function (args, cb) { }, // run transaction function (callback) { + var stamp = Date.now() + self.event.trigger('initiatingTransaction', [stamp, tx]) self.txRunner.rawRun(tx, function (error, result) { 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 { - 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 (typeof (error) !== 'string') {