Actually use the past 8 blocks for reward stats
This commit is contained in:
parent
beae88778b
commit
8837b8c882
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user