mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
controllers - recent-blocks - ensure full blocks
This commit is contained in:
parent
eb2423799d
commit
22e59af741
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user