Fix for block transition when switching networks.

This commit is contained in:
softsimon 2020-07-22 20:09:02 +07:00
parent f0c9ac5235
commit ad61374cbe

View File

@ -46,6 +46,12 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
if (this.blocks.some((b) => b.height === block.height)) {
return;
}
if (this.blocks.length && block.height !== this.blocks[0].height + 1) {
this.blocks = [];
this.blocksFilled = false;
}
this.blocks.unshift(block);
this.blocks = this.blocks.slice(0, 8);