aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-04-11 17:34:48 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-04-11 17:34:48 +0800
commita7161caedf865e3e777473bc676286d2a376afbb (patch)
treef285d85464d9d20aa4f453ad332c1ec034e64a2e
parent4b2492b6149fbe31ee3845185acba90ebfbcbf5c (diff)
parent18490d833cf416f476d1e4587002a3ff484f288b (diff)
downloadgo-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar.gz
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar.bz2
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar.lz
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar.xz
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.tar.zst
go-tangerine-a7161caedf865e3e777473bc676286d2a376afbb.zip
Merge pull request #2427 from bas-vk/pending-tx-console-format
console: use transaction output formatter for eth.pendingTransactions…
-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;
+ }
})
]
});