aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2016-04-06 16:56:37 +0800
committerBas van Kervel <bas@ethdev.com>2016-04-06 17:27:05 +0800
commit18490d833cf416f476d1e4587002a3ff484f288b (patch)
tree9f69fe9d8032a5ffc1d65ed5090bae826348666c /rpc
parent7e02105672cda92889a78db864a5701d78f45eb2 (diff)
downloaddexon-18490d833cf416f476d1e4587002a3ff484f288b.tar.gz
dexon-18490d833cf416f476d1e4587002a3ff484f288b.tar.zst
dexon-18490d833cf416f476d1e4587002a3ff484f288b.zip
console: use transaction output formatter for eth.pendingTransactions output
Diffstat (limited to 'rpc')
-rw-r--r--rpc/javascript.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/rpc/javascript.go b/rpc/javascript.go
index c4fa80c0b..211a6644e 100644
--- a/rpc/javascript.go
+++ b/rpc/javascript.go
@@ -250,7 +250,15 @@ web3._extend({
[
new web3._extend.Property({
name: 'pendingTransactions',
- getter: 'eth_pendingTransactions'
+ getter: 'eth_pendingTransactions',
+ outputFormatter: function(txs) {
+ var formatted = [];
+ for (var i = 0; i < txs.length; i++) {
+ formatted.push(web3._extend.formatters.outputTransactionFormatter(txs[i]));
+ formatted[i].blockHash = null;
+ }
+ return formatted;
+ }
})
]
});