Lazy load flashbot tx checking
This commit is contained in:
parent
1b26e6be27
commit
754369578f
|
@ -69,6 +69,7 @@ const BlockTransactions: React.FC = () => {
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.reverse();
|
.reverse();
|
||||||
|
setTxs(responses);
|
||||||
|
|
||||||
const internalChecks = await Promise.all(
|
const internalChecks = await Promise.all(
|
||||||
responses.map(async (res) => {
|
responses.map(async (res) => {
|
||||||
|
@ -87,13 +88,10 @@ const BlockTransactions: React.FC = () => {
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
for (let i = 0; i < responses.length; i++) {
|
const processedResponses = responses.map((r, i): ProcessedTransaction => {
|
||||||
if (internalChecks[i]) {
|
return { ...r, internalMinerInteraction: internalChecks[i] };
|
||||||
responses[i].internalMinerInteraction = true;
|
});
|
||||||
}
|
setTxs(processedResponses);
|
||||||
}
|
|
||||||
|
|
||||||
setTxs(responses);
|
|
||||||
};
|
};
|
||||||
readBlock();
|
readBlock();
|
||||||
}, [blockNumber]);
|
}, [blockNumber]);
|
||||||
|
|
Loading…
Reference in New Issue