Use correct url for blocks-extras API - Fix amountShortner pipe

This commit is contained in:
nymkappa
2022-03-13 11:37:56 +01:00
parent 33897b029f
commit ab486bfe6e
4 changed files with 34 additions and 17 deletions

View File

@@ -17,7 +17,7 @@
</td>
<td class="text-right">{{ diffChange.difficultyShorten }}</td>
<td class="text-right" [style]="diffChange.change >= 0 ? 'color: #42B747' : 'color: #B74242'">
{{ diffChange.change >= 0 ? '+' : '' }}{{ formatNumber(diffChange.change, locale, '1.2-2') }}%
{{ diffChange.change >= 0 ? '+' : '' }}{{ diffChange.change | amountShortener }}%
</td>
</tr>
</tbody>

View File

@@ -43,7 +43,7 @@ export class DifficultyAdjustmentsTable implements OnInit {
const change = (data.difficulty[i].difficulty / data.difficulty[i - 1].difficulty - 1) * 100;
tableData.push(Object.assign(data.difficulty[i], {
change: change,
change: Math.round(change * 100) / 100,
difficultyShorten: formatNumber(
data.difficulty[i].difficulty / selectedPowerOfTen.divider,
this.locale, '1.2-2') + selectedPowerOfTen.unit