Shorten reward stats

This commit is contained in:
nymkappa 2022-03-07 18:19:02 +01:00
parent 09e3791cee
commit 2435e7bfe9
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 4 additions and 7 deletions

View File

@ -17,7 +17,7 @@
<div class="item">
<h5 class="card-title" i18n="">Reward Per Tx</h5>
<div class="card-text">
{{ rewardStats.rewardPerTx }}
{{ rewardStats.rewardPerTx | amountShortener }}
<span class="symbol">sats/tx</span>
<div class="symbol">in the last 8 blocks</div>
</div>
@ -25,7 +25,7 @@
<div class="item">
<h5 class="card-title" i18n="">Average Fee</h5>
<div class="card-text">
{{ rewardStats.feePerTx }}
{{ rewardStats.feePerTx | amountShortener}}
<span class="symbol">sats/tx</span>
<div class="symbol">in the last 8 blocks</div>
</div>

View File

@ -2,8 +2,6 @@ import { ChangeDetectionStrategy, Component, Inject, LOCALE_ID, OnDestroy, OnIni
import { map } from 'rxjs/operators';
import { SeoService } from 'src/app/services/seo.service';
import { StateService } from 'src/app/services/state.service';
import { formatNumber } from '@angular/common';
import { WebsocketService } from 'src/app/services/websocket.service';
import { Observable } from 'rxjs';
@Component({
@ -22,7 +20,6 @@ export class MiningDashboardComponent implements OnInit {
constructor(private seoService: SeoService,
public stateService: StateService,
private websocketService: WebsocketService,
@Inject(LOCALE_ID) private locale: string,
) {
this.seoService.setTitle($localize`:@@mining.mining-dashboard:Mining Dashboard`);
@ -39,8 +36,8 @@ export class MiningDashboardComponent implements OnInit {
return {
'totalReward': totalReward,
'rewardPerTx': formatNumber(totalReward / totalTx, this.locale, '1.0-0'),
'feePerTx': formatNumber(totalFee / totalTx, this.locale, '1.0-0'),
'rewardPerTx': totalReward / totalTx,
'feePerTx': totalFee / totalTx,
}
})
);