Refactord blockchain is rendering, block arrow location propagation and keynavigation.

This commit is contained in:
softsimon
2020-03-22 17:44:36 +07:00
parent 69827843c9
commit 78e41fc3d3
15 changed files with 131 additions and 120 deletions

View File

@@ -65,6 +65,11 @@ export class TransactionComponent implements OnInit, OnDestroy {
} else {
this.findBlockAndSetFeeRating();
}
if (this.tx.status.confirmed) {
this.stateService.markBlock$.next({ blockHeight: tx.status.block_height });
} else {
this.stateService.markBlock$.next({ txFeePerVSize: tx.fee / (tx.weight / 4) });
}
},
(error) => {
this.error = error;
@@ -82,6 +87,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
block_hash: block.id,
block_time: block.timestamp,
};
this.stateService.markBlock$.next({ blockHeight: block.height });
this.audioService.playSound('magic');
this.findBlockAndSetFeeRating();
});
@@ -121,5 +127,6 @@ export class TransactionComponent implements OnInit, OnDestroy {
ngOnDestroy() {
this.websocketService.startTrackTransaction('stop');
this.stateService.markBlock$.next({});
}
}