Support for testnet
This commit is contained in:
parent
a3d6ad0702
commit
9ebb652db6
|
@ -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 )
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
|
||||
|
|
|
@ -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"""
|
||||
<div>
|
||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||
|
@ -39,7 +40,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
|||
Sprout pool
|
||||
</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
||||
<%= sprout_value(@blockchain_info["valuePools"]) %> ZEC
|
||||
<%= sprout_value(@blockchain_info["valuePools"]) %> <%= currency %>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
|
@ -48,7 +49,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
|||
Sapling pool
|
||||
</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
||||
<%= sapling_value(@blockchain_info["valuePools"]) %> ZEC
|
||||
<%= sapling_value(@blockchain_info["valuePools"]) %> <%= currency %>
|
||||
</dd>
|
||||
</div>
|
||||
|
||||
|
@ -57,9 +58,9 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
|||
Orchard pool
|
||||
</dt>
|
||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
||||
<%= orchard_value(@blockchain_info["valuePools"]) %> ZEC
|
||||
<%= orchard_value(@blockchain_info["valuePools"]) %> <%= currency %>
|
||||
</dd>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 dark:bg-gray-800">
|
||||
<dt class="text-sm font-medium text-gray-500 truncate">
|
||||
|
|
|
@ -7,11 +7,15 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<%= if assigns[:zcash_network] != "testnet" do %>
|
||||
<div class="px-5 py-2">
|
||||
<a href="http://zcashfgzdzxwiy7yq74uejvo2ykppu4pzgioplcvdnpmc6gcu5k6vwyd.onion/" class="text-base text-gray-500 hover:text-gray-900 dark:hover:text-slate-100">
|
||||
Onion V3
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</nav>
|
||||
<div class="mt-8 flex justify-center space-x-6">
|
||||
<a href="https://twitter.com/ZcashExplorer" class="text-gray-400 hover:text-gray-500" target="_blank" rel="noreferrer">
|
||||
|
|
Loading…
Reference in New Issue