|
|
@ -127,6 +127,8 @@ defmodule Explorer.Chain.Address.MetadataPreloader do |
|
|
|
end) |
|
|
|
end) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp item_to_address_hash_strings(nil), do: [] |
|
|
|
|
|
|
|
|
|
|
|
defp item_to_address_hash_strings(%Transaction{ |
|
|
|
defp item_to_address_hash_strings(%Transaction{ |
|
|
|
to_address_hash: to_address_hash, |
|
|
|
to_address_hash: to_address_hash, |
|
|
|
created_contract_address_hash: created_contract_address_hash, |
|
|
|
created_contract_address_hash: created_contract_address_hash, |
|
|
@ -285,14 +287,16 @@ defmodule Explorer.Chain.Address.MetadataPreloader do |
|
|
|
alter_address(address, address.hash, names, field_to_put_info) |
|
|
|
alter_address(address, address.hash, names, field_to_put_info) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp alter_address(_, nil, _names, _field) do |
|
|
|
defp alter_address(address, nil, _names, _field), do: address |
|
|
|
nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp alter_address(%NotLoaded{}, address_hash, names, field) do |
|
|
|
defp alter_address(%NotLoaded{}, address_hash, names, field) do |
|
|
|
%{field => names[Address.checksum(address_hash)]} |
|
|
|
%{field => names[Address.checksum(address_hash)]} |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp alter_address(nil, address_hash, names, field) do |
|
|
|
|
|
|
|
%{field => names[Address.checksum(address_hash)]} |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp alter_address(%Address{} = address, address_hash, names, :ens_domain_name) do |
|
|
|
defp alter_address(%Address{} = address, address_hash, names, :ens_domain_name) do |
|
|
|
%Address{address | ens_domain_name: names[Address.checksum(address_hash)]} |
|
|
|
%Address{address | ens_domain_name: names[Address.checksum(address_hash)]} |
|
|
|
end |
|
|
|
end |
|
|
|