From 5f67ba227925085c2ac4c0df4617d042b6171d15 Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Thu, 4 Nov 2021 18:47:59 +0100 Subject: [PATCH] feat: Chia blocks need more precision Block rewards of Chia blockchain were fixed to 1.75 XCH. Now, they include a variable transaction fee. This commit sets the precision to 6 digits after the floating point, like Ethereum block rewards. Signed-off-by: Julien Riou --- templates/block.tmpl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/templates/block.tmpl b/templates/block.tmpl index 397abc4..94dcca1 100644 --- a/templates/block.tmpl +++ b/templates/block.tmpl @@ -1,6 +1 @@ -🎉 *{{ convertAction .Pool.Coin }}* [#{{ .Block.Number }}]({{ formatBlockURL .Pool.Coin .Block.Hash }}) _ -{{- if (eq .Pool.Coin "xch") -}} - {{ printf "%.2f" (convertCurrency .Pool.Coin .Block.Reward) }} - {{- else -}} - {{ printf "%.6f" (convertCurrency .Pool.Coin .Block.Reward) }} - {{- end }} {{ upper .Pool.Coin }}_ \ No newline at end of file +🎉 *{{ convertAction .Pool.Coin }}* [#{{ .Block.Number }}]({{ formatBlockURL .Pool.Coin .Block.Hash }}) _{{ printf "%.6f" (convertCurrency .Pool.Coin .Block.Reward) }} {{ upper .Pool.Coin }}_