From 9077b29a80b77d01064269b3b1a6e124f22cfdea Mon Sep 17 00:00:00 2001 From: Felix Brucker Date: Tue, 26 Sep 2023 16:32:40 +0530 Subject: [PATCH] Show more decimal places for small daily rewards, closes #286 --- src/app/farm-summary/farm-summary.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/farm-summary/farm-summary.component.ts b/src/app/farm-summary/farm-summary.component.ts index e1f5098..d3b1251 100644 --- a/src/app/farm-summary/farm-summary.component.ts +++ b/src/app/farm-summary/farm-summary.component.ts @@ -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() {