From 15cbd3944587c095e8d894ebb866e7b2ee3a6b8f Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Fri, 30 Jul 2021 04:46:39 -0300 Subject: [PATCH] Small fixes --- src/special/london/Blocks.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/special/london/Blocks.tsx b/src/special/london/Blocks.tsx index 3e9732f..1cbead2 100644 --- a/src/special/london/Blocks.tsx +++ b/src/special/london/Blocks.tsx @@ -66,7 +66,16 @@ const Blocks: React.FC = ({ latestBlock }) => { if (_blocks.length > 0 && latestBlock.number === _blocks[0].number) { return _blocks; } - return [extBlock, ..._blocks].slice(0, MAX_BLOCK_HISTORY + 1); + + // Leave the last block because of transition animation + const newBlocks = [extBlock, ..._blocks].slice( + 0, + MAX_BLOCK_HISTORY + 1 + ); + + // Little hack to fix out of order block notifications + newBlocks.sort((a, b) => a.number - b.number); + return newBlocks; }); }; _readBlock();