diff --git a/lib/utils/receipt.js b/lib/utils/receipt.js index 25765a4581..406aad01b6 100644 --- a/lib/utils/receipt.js +++ b/lib/utils/receipt.js @@ -34,7 +34,10 @@ Receipt.prototype.toJSON = function() { contractAddress: this.contractAddress != null ? to.rpcDataHexString(this.contractAddress) : null, logs: this.logs.map(function(log) {return log.toJSON()}), status: to.rpcQuantityHexString(this.status), - logsBloom: to.rpcDataHexString(this.logsBloom) + logsBloom: to.rpcDataHexString(this.logsBloom), + v: to.rpcDataHexString(this.tx.v), + r: to.rpcDataHexString(this.tx.r), + s: to.rpcDataHexString(this.tx.s) } }; diff --git a/test/requests.js b/test/requests.js index 8bb762fab7..ed26ef5197 100644 --- a/test/requests.js +++ b/test/requests.js @@ -953,6 +953,9 @@ var tests = function(web3) { assert.notEqual(receipt, null, "Transaction receipt shouldn't be null"); assert.notEqual(contractAddress, null, "Transaction did not create a contract"); + assert.equal(receipt.hasOwnProperty('v'), true, "Transaction includes v signature parameter"); + assert.equal(receipt.hasOwnProperty('r'), true, "Transaction includes r signature parameter"); + assert.equal(receipt.hasOwnProperty('s'), true, "Transaction includes s signature parameter"); done(); }); }); @@ -963,7 +966,9 @@ var tests = function(web3) { assert.notEqual(result, null, "Transaction result shouldn't be null"); assert.equal(result.hash, initialTransaction, "Resultant hash isn't what we expected") - + assert.equal(result.hasOwnProperty('v'), true, "Transaction includes v signature parameter"); + assert.equal(result.hasOwnProperty('r'), true, "Transaction includes r signature parameter"); + assert.equal(result.hasOwnProperty('s'), true, "Transaction includes s signature parameter"); done(); }); });