diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_verify_other_explorers.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_verify_other_explorers.html.eex index ca87829ccb..542bdf74c3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_verify_other_explorers.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_verify_other_explorers.html.eex @@ -12,8 +12,8 @@
<%= link( - address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address), - to: address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address) + address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address, false), + to: address_link_to_other_explorer("https://blockchair.com/ethereum/address/", @address ,true) ) %>
@@ -27,8 +27,8 @@
<%= link( - address_link_to_other_explorer("https://www.etherchain.org/account/", @address), - to: address_link_to_other_explorer("https://www.etherchain.org/account/", @address) + address_link_to_other_explorer("https://www.etherchain.org/account/", @address, false), + to: address_link_to_other_explorer("https://www.etherchain.org/account/", @address, true) ) %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex index 49be29b2ad..b0dbfdd1ec 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex @@ -50,7 +50,9 @@ <% end %> - <%= render BlockScoutWeb.AddressView, "_verify_other_explorers.html", address: @transaction |> BlockScoutWeb.AddressView.address_partial_selector(:to, nil) |> BlockScoutWeb.RenderHelpers.render_partial() %> + <%= if contract_creation?(@transaction) do %> + <%= render BlockScoutWeb.AddressView, "_verify_other_explorers.html", address: to_address_hash(@transaction) %> + <% end %>
diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex index 2d07168088..c777fd74a7 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_view.ex @@ -256,15 +256,19 @@ defmodule BlockScoutWeb.AddressView do nil end - def address_link_to_other_explorer(link, address) do - link <> trimmed_hash(address) + def address_link_to_other_explorer(link, address, full) do + if full do + link <> to_string(address) + else + link <> trimmed_hash(address) + end end - def address_link_to_other_explorer(_, address), do: "" + def address_link_to_other_explorer(_, address, full), do: "" - def address_link_to_other_explorer(_, _), do: "" + def address_link_to_other_explorer(_, _, full), do: "" - def address_link_to_other_explorer(link, _), do: "" + def address_link_to_other_explorer(link, _, full), do: "" defp matching_address_check(%Address{hash: hash} = current_address, %Address{hash: hash}, contract?, truncate) do [