remove console.log, fix null blocks

This commit is contained in:
Mononaut
2023-07-11 16:35:00 +09:00
parent 842ac8ce39
commit 7230b65dc3
3 changed files with 10 additions and 7 deletions

View File

@@ -142,7 +142,7 @@ export class BlockComponent implements OnInit, OnDestroy {
if (block?.extras?.reward != undefined) {
this.fees = block.extras.reward / 100000000 - this.blockSubsidy;
}
} else if (block.height === this.block.height) {
} else if (block.height === this.block?.height) {
this.block.stale = true;
this.block.canonical = block.id;
}

View File

@@ -210,7 +210,7 @@ export class BlockchainBlocksComponent implements OnInit, OnChanges, OnDestroy {
if (this.chainTip == null) {
this.pendingMarkBlock = { animate, newBlockFromLeft };
}
const blockindex = this.blocks.findIndex((b) => { console.log(b); return b.height === this.markHeight });
const blockindex = this.blocks.findIndex((b) => b.height === this.markHeight);
if (blockindex > -1) {
if (!animate) {
this.arrowTransition = 'inherit';