aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-05-24 13:32:33 +0800
committerkumavis <aaron@kumavis.me>2018-05-24 13:32:33 +0800
commit22e59af741a43ab9a9dc8e96415788f681a8efda (patch)
treee02f623faeaa2d469d300f83e0d192116bfad8d0 /app
parenteb2423799d472863b5a74443ac32b5c1d59ce9fc (diff)
downloadtangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar.gz
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar.bz2
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar.lz
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar.xz
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.tar.zst
tangerine-wallet-browser-22e59af741a43ab9a9dc8e96415788f681a8efda.zip
controllers - recent-blocks - ensure full blocks
Diffstat (limited to 'app')
-rw-r--r--app/scripts/controllers/recent-blocks.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/controllers/recent-blocks.js b/app/scripts/controllers/recent-blocks.js
index e0b5551dd..215638666 100644
--- a/app/scripts/controllers/recent-blocks.js
+++ b/app/scripts/controllers/recent-blocks.js
@@ -57,7 +57,7 @@ class RecentBlocksController {
*/
async processBlock (newBlockNumberHex) {
const newBlockNumber = Number.parseInt(newBlockNumberHex, 16)
- const newBlock = await this.getBlockByNumber(newBlockNumber)
+ const newBlock = await this.getBlockByNumber(newBlockNumber, true)
const block = this.mapTransactionsToPrices(newBlock)
@@ -128,7 +128,7 @@ class RecentBlocksController {
const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index)
await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => {
try {
- const newBlock = await this.getBlockByNumber(targetBlockNumber)
+ const newBlock = await this.getBlockByNumber(targetBlockNumber, true)
if (newBlock) {
this.backfillBlock(newBlock)