From 4a0d9cb66f7a18d789e08c15ace3b414b95320ca Mon Sep 17 00:00:00 2001 From: softsimon Date: Fri, 10 Mar 2023 18:35:26 +0900 Subject: [PATCH] Fixes arrow position on confirmed blocks fixes #3294 --- .../components/blockchain-blocks/blockchain-blocks.component.ts | 2 +- .../src/app/components/transaction/transaction.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts index 3feaf6c2d..e3547a569 100644 --- a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts +++ b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts @@ -107,7 +107,7 @@ export class BlockchainBlocksComponent implements OnInit, OnChanges, OnDestroy { this.blocks.unshift(block); this.blocks = this.blocks.slice(0, this.dynamicBlocksAmount); - if (txConfirmed) { + if (txConfirmed && this.height === block.height) { this.markHeight = block.height; this.moveArrowToPosition(true, true); } else { diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 673743344..c28525159 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -347,7 +347,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.blocksSubscription = this.stateService.blocks$.subscribe(([block, txConfirmed]) => { this.latestBlock = block; - if (txConfirmed && this.tx) { + if (txConfirmed && this.tx && !this.tx.status.confirmed) { this.tx.status = { confirmed: true, block_height: block.height,