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_USERNAME=zcash
|
||||||
export ZCASHD_PASSWORD=changeme
|
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 )
|
# 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: [
|
check_origin: [
|
||||||
"http://127.0.0.1:4000",
|
"http://127.0.0.1:4000",
|
||||||
"//zcashblockexplorer.com",
|
"//zcashblockexplorer.com",
|
||||||
"//testnet.zcashblockexplorer.com"
|
"//testnet.zcashblockexplorer.com",
|
||||||
"//zcashfgzdzxwiy7yq74uejvo2ykppu4pzgioplcvdnpmc6gcu5k6vwyd.onion"
|
"//zcashfgzdzxwiy7yq74uejvo2ykppu4pzgioplcvdnpmc6gcu5k6vwyd.onion"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
||||||
|
|
||||||
use ZcashExplorerWeb, :live_view
|
use ZcashExplorerWeb, :live_view
|
||||||
import Phoenix.LiveView.Helpers
|
import Phoenix.LiveView.Helpers
|
||||||
@impl true
|
@impl true
|
||||||
def render(assigns) do
|
def render(assigns) do
|
||||||
|
currency = if(assigns.blockchain_info["chain"] == "main", do: "ZEC", else: "TAZ")
|
||||||
|
|
||||||
~L"""
|
~L"""
|
||||||
<div>
|
<div>
|
||||||
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
<dl class="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-3">
|
||||||
|
@ -39,7 +40,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
||||||
Sprout pool
|
Sprout pool
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
<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>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
||||||
Sapling pool
|
Sapling pool
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
<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>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -57,7 +58,7 @@ defmodule ZcashExplorerWeb.BlockChainInfoLive do
|
||||||
Orchard pool
|
Orchard pool
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-3xl font-semibold text-gray-900 dark:text-white">
|
<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>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,15 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<%= if assigns[:zcash_network] != "testnet" do %>
|
||||||
<div class="px-5 py-2">
|
<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">
|
<a href="http://zcashfgzdzxwiy7yq74uejvo2ykppu4pzgioplcvdnpmc6gcu5k6vwyd.onion/" class="text-base text-gray-500 hover:text-gray-900 dark:hover:text-slate-100">
|
||||||
Onion V3
|
Onion V3
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
<div class="mt-8 flex justify-center space-x-6">
|
<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">
|
<a href="https://twitter.com/ZcashExplorer" class="text-gray-400 hover:text-gray-500" target="_blank" rel="noreferrer">
|
||||||
|
|
Loading…
Reference in New Issue