trimmed verification link

pull/1890/head
Victor Baranov 6 years ago
parent 7760cc7e7e
commit 8a872407f8
  1. 9
      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

Loading…
Cancel
Save