diff --git a/lib/modules/blockchain_connector/index.js b/lib/modules/blockchain_connector/index.js index 35f210caf..58a8e937a 100644 --- a/lib/modules/blockchain_connector/index.js +++ b/lib/modules/blockchain_connector/index.js @@ -7,6 +7,8 @@ const embarkJsUtils = require('embarkjs').Utils; const WEB3_READY = 'blockchain:ready'; +const BLOCK_LIMIT = 100; + // TODO: consider another name, this is the blockchain connector class BlockchainConnector { constructor(embark, options) { @@ -481,7 +483,7 @@ class BlockchainConnector { }); }, function(blockNumber, account, next) { - self.getTransactions(blockNumber, blockNumber, (transactions) => { + self.getTransactions(blockNumber - BLOCK_LIMIT, BLOCK_LIMIT, (transactions) => { account.transactions = transactions.filter((transaction) => transaction.from === address); next(null, account); });