Skip to content

Commit

Permalink
fix zero fee display
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
  • Loading branch information
ukane-philemon authored and chappjc committed Jun 6, 2024
1 parent 6fe8861 commit 80898ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/dcrdata/views/extras.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@
{{define "decimalParts" -}}
<div class="decimal-parts d-inline-block">
{{- if eq (len .) 4 -}}
<span class="int">{{ index . 0 }}.{{ index . 1 }}</span>
<span class="int">
{{- if gt (len (index . 1)) 0 -}}
{{ index . 0 }}.{{index . 1 }}
{{- else -}}
{{index . 0 }}
{{- end -}}
</span>
{{- if gt (len (index . 2)) 0 -}}
<span class="decimal">{{ index . 2 }}</span>
{{- /* trailing zeros */ -}}
Expand Down

0 comments on commit 80898ad

Please sign in to comment.