From 80898ad3577e58a1846f7dede04385544d945cac Mon Sep 17 00:00:00 2001 From: Philemon Ukane Date: Tue, 4 Jun 2024 18:05:32 +0100 Subject: [PATCH] fix zero fee display Signed-off-by: Philemon Ukane --- cmd/dcrdata/views/extras.tmpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/dcrdata/views/extras.tmpl b/cmd/dcrdata/views/extras.tmpl index c5ae11b5e..b18893172 100644 --- a/cmd/dcrdata/views/extras.tmpl +++ b/cmd/dcrdata/views/extras.tmpl @@ -203,7 +203,13 @@ {{define "decimalParts" -}}
{{- if eq (len .) 4 -}} - {{ index . 0 }}.{{ index . 1 }} + + {{- if gt (len (index . 1)) 0 -}} + {{ index . 0 }}.{{index . 1 }} + {{- else -}} + {{index . 0 }} + {{- end -}} + {{- if gt (len (index . 2)) 0 -}} {{ index . 2 }} {{- /* trailing zeros */ -}}