diff --git a/.env.example b/.env.example index 2c7c7b4..4a3e01c 100644 --- a/.env.example +++ b/.env.example @@ -12,6 +12,8 @@ export ZCASHD_PORT=8232 export ZCASHD_USERNAME=zcash export ZCASHD_PASSWORD=changeme +# mainly used in templates to show ZEC / TAZ +export zcash_network: "mainnet" # config for the Docker container that will be running zecwallet-light-cli ( For Viewing Key ) diff --git a/config/releases.exs b/config/releases.exs index a061564..9be4bc8 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -78,7 +78,7 @@ config :zcash_explorer, ZcashExplorerWeb.Endpoint, check_origin: [ "http://127.0.0.1:4000", "//zcashblockexplorer.com", - "//testnet.zcashblockexplorer.com" + "//testnet.zcashblockexplorer.com", "//zcashfgzdzxwiy7yq74uejvo2ykppu4pzgioplcvdnpmc6gcu5k6vwyd.onion" ] diff --git a/lib/zcash_explorer_web/live/blockchain_info_live.ex b/lib/zcash_explorer_web/live/blockchain_info_live.ex index 985b068..e329b80 100644 --- a/lib/zcash_explorer_web/live/blockchain_info_live.ex +++ b/lib/zcash_explorer_web/live/blockchain_info_live.ex @@ -1,9 +1,10 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do - use ZcashExplorerWeb, :live_view import Phoenix.LiveView.Helpers @impl true def render(assigns) do + currency = if(assigns.blockchain_info["chain"] == "main", do: "ZEC", else: "TAZ") + ~L"""
@@ -39,7 +40,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do Sprout pool
- <%= sprout_value(@blockchain_info["valuePools"]) %> ZEC + <%= sprout_value(@blockchain_info["valuePools"]) %> <%= currency %>
@@ -48,7 +49,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do Sapling pool
- <%= sapling_value(@blockchain_info["valuePools"]) %> ZEC + <%= sapling_value(@blockchain_info["valuePools"]) %> <%= currency %>
@@ -57,9 +58,9 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do Orchard pool
- <%= orchard_value(@blockchain_info["valuePools"]) %> ZEC + <%= orchard_value(@blockchain_info["valuePools"]) %> <%= currency %>
- +
diff --git a/lib/zcash_explorer_web/templates/layout/footer.html.heex b/lib/zcash_explorer_web/templates/layout/footer.html.heex index 5ff2c90..6f9e58a 100644 --- a/lib/zcash_explorer_web/templates/layout/footer.html.heex +++ b/lib/zcash_explorer_web/templates/layout/footer.html.heex @@ -7,11 +7,15 @@
+ + <%= if assigns[:zcash_network] != "testnet" do %>
Onion V3
+ <% end %> +