From 996377286455f30755f4e66cb6217c6096d593e8 Mon Sep 17 00:00:00 2001 From: Vamsi Krishna B Date: Thu, 12 May 2022 12:00:25 +0530 Subject: [PATCH] Orchard value pool info --- lib/zcash_explorer_web/live/blockchain_info_live.ex | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/zcash_explorer_web/live/blockchain_info_live.ex b/lib/zcash_explorer_web/live/blockchain_info_live.ex index 2674dc6..946ace8 100644 --- a/lib/zcash_explorer_web/live/blockchain_info_live.ex +++ b/lib/zcash_explorer_web/live/blockchain_info_live.ex @@ -52,6 +52,15 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do +
+
+ Orchard pool +
+
+ <%= orchard_value(@blockchain_info["valuePools"]) %> ZEC +
+
+
zcashd version @@ -99,6 +108,10 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do value_pools |> get_value_pools() |> Map.get("sapling") end + defp orchard_value(value_pools) do + value_pools |> get_value_pools |> Map.get("orchard") + end + defp get_value_pools(value_pools) do Enum.map(value_pools, fn %{"id" => name, "chainValue" => value} -> {name, value} end) |> Map.new()