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 37073f0509..657873f6ba 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 @@ -232,6 +232,13 @@ defmodule BlockScoutWeb.AddressView do def trimmed_hash(_), do: "" + def trimmed_verify_link(hash) do + string_hash = to_string(hash) + "#{String.slice(string_hash, 0..21)}..." + end + + def trimmed_verify_link(_), do: "" + def transaction_hash(%Address{contracts_creation_internal_transaction: %InternalTransaction{}} = address) do address.contracts_creation_internal_transaction.transaction_hash end @@ -258,7 +265,7 @@ defmodule BlockScoutWeb.AddressView do if full do link <> to_string(address) else - link <> trimmed_hash(address) + trimmed_verify_link(link <> to_string(address)) end end