diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a36b6fa53..ba198a9966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#3888](https://github.com/blockscout/blockscout/pull/3888) - EIP-1967 contract proxy pattern detection fix ### Chore +- [#3902](https://github.com/blockscout/blockscout/pull/3902) - Increase number of left symbols in short address view - [#3894](https://github.com/blockscout/blockscout/pull/3894) - Refactoring: replace inline style display: none with d-none class - [#3893](https://github.com/blockscout/blockscout/pull/3893) - Add left/right paddings in tx tile - [#3870](https://github.com/blockscout/blockscout/pull/3870) - Manage token balance on-demand fetcher threshold via env var 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 4db6f9b1ae..dcb4cd39bc 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 @@ -266,7 +266,7 @@ defmodule BlockScoutWeb.AddressView do end def trimmed_hash(address) when is_binary(address) do - "#{String.slice(address, 0..5)}–#{String.slice(address, -6..-1)}" + "#{String.slice(address, 0..7)}–#{String.slice(address, -6..-1)}" end def trimmed_hash(_), do: "" @@ -406,6 +406,8 @@ defmodule BlockScoutWeb.AddressView do short_string(token_id, max_length) end + def short_string(nil, _max_length), do: "" + def short_string(name, max_length) do part_length = Kernel.trunc(max_length / 4)