aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/controllers/recent-blocks.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-12-20 04:22:48 +0800
committerDan Finlay <dan@danfinlay.com>2017-12-20 04:23:59 +0800
commit30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a (patch)
tree378646b52c1008c6996e43f3d7308ee7d30f95a7 /app/scripts/controllers/recent-blocks.js
parent10ff77477cf3163eaea5ac9485977d91bcc102c0 (diff)
downloadtangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.gz
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.bz2
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.lz
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.xz
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.tar.zst
tangerine-wallet-browser-30b45c8a385e9ae4c6b78d0a7ec6929f7bad4d9a.zip
Do not log whole txs in recent block controller.
Only record gas prices, because that has a current use.
Diffstat (limited to 'app/scripts/controllers/recent-blocks.js')
-rw-r--r--app/scripts/controllers/recent-blocks.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js
index 27f9013ff..4a906261e 100644
--- a/app/scripts/controllers/recent-blocks.js
+++ b/app/scripts/controllers/recent-blocks.js
@@ -23,8 +23,15 @@ class RecentBlocksController {
}
processBlock (newBlock) {
+ const block = extend(newBlock, {
+ gasPrices: newBlock.transactions.map((tx) => {
+ return tx.gasPrice
+ }),
+ })
+ delete block.transactions
+
const state = this.store.getState()
- state.recentBlocks.push(newBlock)
+ state.recentBlocks.push(block)
while (state.recentBlocks.length > this.historyLength) {
state.recentBlocks.shift()