Merge pull request #1206 from poanetwork/fix-displayed-address-length

Fix displayed address length when a primary name presents
pull/1218/head
Andrew Cravenho 6 years ago committed by GitHub
commit a247b47275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex

@ -1,11 +1,6 @@
<span class="<%= if @contract do %>contract-address<% end %>" data-address-hash="<%= @address.hash %>"> <span class="<%= if @contract do %>contract-address<% end %>" data-address-hash="<%= @address.hash %>">
<%= if name = primary_name(@address) do %> <%= if name = primary_name(@address) do %>
<%= if assigns[:truncate] do %> <span data-toggle="tooltip" data-placement="top" title="<%= @address.hash %>"><%= name %> (<%= short_hash(@address) %>...)</span>
<span data-toggle="tooltip" data-placement="top" title="<%= @address.hash %>"><%= name %> (<%= short_hash(@address) %>...)</span>
<% else %>
<span class="d-none d-md-none d-lg-inline" data-toggle="tooltip" data-placement="top" title="<%= @address.hash %>"><%= name %> (<%= @address.hash %>)</span>
<span class="d-md-inline-block d-lg-none" data-toggle="tooltip" data-placement="top" title="<%= @address.hash %>"><%= name %> (<%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %>)</span>
<% end %>
<% else %> <% else %>
<%= if assigns[:truncate] do %> <%= if assigns[:truncate] do %>
<%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %> <%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %>

Loading…
Cancel
Save