Don't round signet difficulty in table and chart
This commit is contained in:
@@ -12,8 +12,11 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<h5 class="card-title" i18n="block.difficulty">Difficulty</h5>
|
||||
<p class="card-text">
|
||||
{{ hashrates.currentDifficulty | amountShortener }}
|
||||
<p class="card-text" *ngIf="network === 'signet'">
|
||||
{{ hashrates.currentDifficulty | amountShortener : 5 }}
|
||||
</p>
|
||||
<p class="card-text" *ngIf="network !== 'signet'">
|
||||
{{ hashrates.currentDifficulty | amountShortener : 2 }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -335,6 +335,9 @@ export class HashrateChartComponent implements OnInit {
|
||||
axisLabel: {
|
||||
color: 'rgb(110, 112, 121)',
|
||||
formatter: (val) => {
|
||||
if (this.stateService.network === 'signet') {
|
||||
return val;
|
||||
}
|
||||
const selectedPowerOfTen: any = selectPowerOfTen(val);
|
||||
const newVal = Math.round(val / selectedPowerOfTen.divider);
|
||||
return `${newVal} ${selectedPowerOfTen.unit}`;
|
||||
|
||||
Reference in New Issue
Block a user