Skip to content

Commit

Permalink
Show more decimal places for small daily rewards, closes #286
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Sep 26, 2023
1 parent e1af7ca commit 9077b29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/farm-summary/farm-summary.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ export class FarmSummaryComponent implements OnInit {
if (dailyReward == null) {
return 'N/A';
}
const decimalPlaces = dailyReward.isLessThan(0.01) ? 6 : 2

return `≈ ${dailyReward.toFixed(2)} XCH`;
return `≈ ${dailyReward.toFixed(decimalPlaces)} XCH`;
}

get dailyRewardXchBigNumber() {
Expand Down

0 comments on commit 9077b29

Please sign in to comment.