get the contract_address_hash straight from the pattern matching

pull/699/head
Gustavo Santos Ferreira 6 years ago
parent 85770c547d
commit fe91cb3e47
  1. 4
      apps/block_scout_web/lib/block_scout_web/views/address_view.ex

@ -70,8 +70,8 @@ defmodule BlockScoutWeb.AddressView do
def contract?(nil), do: true def contract?(nil), do: true
def token_title(token = %Token{name: nil}) do def token_title(%Token{name: nil, contract_address_hash: contract_address_hash}) do
token.contract_address_hash contract_address_hash
|> to_string |> to_string
|> String.slice(-6..-1) |> String.slice(-6..-1)
end end

Loading…
Cancel
Save