Merge pull request #1310 from nymkappa/bugfix/auto-refresh-reward-stats

Bugfix/auto refresh reward stats
This commit is contained in:
softsimon 2022-03-07 17:18:57 +01:00 committed by GitHub
commit 09e3791cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ export class MiningDashboardComponent implements OnInit {
ngOnInit(): void {
this.$rewardStats = this.stateService.blocks$.pipe(
map(([block]) => {
this.blocks.push(block);
this.blocks.unshift(block);
this.blocks = this.blocks.slice(0, 8);
const totalTx = this.blocks.reduce((acc, block) => acc + block.tx_count, 0);
const totalFee = this.blocks.reduce((acc, block) => acc + block.extras?.totalFees ?? 0, 0);