Merge pull request #3304 from mempool/simon/fix-confirmation-arrow-bug

Fixes arrow position on confirmed blocks
This commit is contained in:
softsimon 2023-03-11 11:31:30 +09:00 committed by GitHub
commit e4aa3c2091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ export class BlockchainBlocksComponent implements OnInit, OnChanges, OnDestroy {
this.blocks.unshift(block); this.blocks.unshift(block);
this.blocks = this.blocks.slice(0, this.dynamicBlocksAmount); this.blocks = this.blocks.slice(0, this.dynamicBlocksAmount);
if (txConfirmed) { if (txConfirmed && this.height === block.height) {
this.markHeight = block.height; this.markHeight = block.height;
this.moveArrowToPosition(true, true); this.moveArrowToPosition(true, true);
} else { } else {

View File

@ -347,7 +347,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.blocksSubscription = this.stateService.blocks$.subscribe(([block, txConfirmed]) => { this.blocksSubscription = this.stateService.blocks$.subscribe(([block, txConfirmed]) => {
this.latestBlock = block; this.latestBlock = block;
if (txConfirmed && this.tx) { if (txConfirmed && this.tx && !this.tx.status.confirmed) {
this.tx.status = { this.tx.status = {
confirmed: true, confirmed: true,
block_height: block.height, block_height: block.height,