From ca82313631f0a5f18dd8064c505cea36a9fb7d9c Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 22 Nov 2016 12:50:47 +0100 Subject: [PATCH] fix call result --- src/universal-dapp.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/universal-dapp.js b/src/universal-dapp.js index b4c3689947..989587a608 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -779,7 +779,16 @@ UniversalDApp.prototype.rawRunTx = function (args, cb) { } if (args.useCall) { tx.gas = gasLimit - self.web3.eth.call(tx, cb) + var callhash = self.web3.sha3(JSON.stringify(tx)) + self.web3.eth.call(tx, function (error, result) { + if (error) { + return cb(error) + } + cb(null, { + result: result, + transactionHash: callhash + }) + }) } else { self.web3.eth.estimateGas(tx, function (err, resp) { if (err) {