Fix errors with tags

account
Oleg Sovetnik 3 years ago committed by Viktor Baranov
parent 5b731926be
commit 0f12a39bf1
  1. 5
      apps/block_scout_web/lib/block_scout_web/controllers/address_token_controller.ex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
  3. 12
      apps/block_scout_web/priv/gettext/default.pot
  4. 12
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -2,6 +2,8 @@ defmodule BlockScoutWeb.AddressTokenController do
use BlockScoutWeb, :controller
import BlockScoutWeb.Chain, only: [next_page_params: 3, paging_options: 1, split_list_by_page: 1]
import BlockScoutWeb.Account.AuthController, only: [current_user: 1]
import GetAddressTags, only: [get_address_tags: 2]
alias BlockScoutWeb.{AccessHelpers, AddressTokenView, Controller}
alias Explorer.{Chain, Market}
@ -74,7 +76,8 @@ defmodule BlockScoutWeb.AddressTokenController do
current_path: Controller.current_full_path(conn),
coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address),
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(),
counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)})
counters_path: address_path(conn, :address_counters, %{"id" => Address.checksum(address_hash)}),
tags: get_address_tags(address_hash, current_user(conn))
)
else
{:restricted_access, _} ->

@ -26,7 +26,6 @@
<% address_hash_str = if to_address_hash, do: "0x" <> Base.encode16(to_address_hash.bytes, case: :lower), else: nil %>
<% {:ok, created_from_address} = if to_address_hash, do: Chain.hash_to_address(to_address_hash), else: {:ok, nil} %>
<% created_from_address_hash_str = if from_address_hash(created_from_address), do: "0x" <> Base.encode16(from_address_hash(created_from_address).bytes, case: :lower), else: nil %>
<% tags = if assigns[:tags], do: @tags, else: %{common_tags: [], personal_tags: [], watchlist_names: []} %>
<%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
<section class="fs-14" data-page="transaction-details" data-page-transaction-hash="<%= @transaction %>">
<div class="row">
@ -207,6 +206,7 @@
clipboard_text: from_address_hash,
aria_label: gettext("Copy From Address"),
title: gettext("Copy From Address") %>
<%= render BlockScoutWeb.AddressView, "_labels.html", tags: @from_tags %>
</dd>
</dl>
<!-- To -->

@ -1184,7 +1184,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr
msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42
#: lib/block_scout_web/templates/transaction/_tile.html.eex:95
#: lib/block_scout_web/templates/transaction/_tile.html.eex:92
#, elixir-autogen, elixir-format
msgid "IN"
msgstr ""
@ -1571,7 +1571,7 @@ msgid "Number of transfers to/from this address."
msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40
#: lib/block_scout_web/templates/transaction/_tile.html.eex:91
#: lib/block_scout_web/templates/transaction/_tile.html.eex:88
#, elixir-autogen, elixir-format
msgid "OUT"
msgstr ""
@ -1951,7 +1951,7 @@ msgid "Success"
msgstr ""
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21
#: lib/block_scout_web/templates/transaction/_tile.html.eex:55
#: lib/block_scout_web/templates/transaction/_tile.html.eex:52
#, elixir-autogen, elixir-format
msgid "TX Fee"
msgstr ""
@ -2379,7 +2379,7 @@ msgstr ""
msgid "Transaction Burnt Fee"
msgstr ""
#: lib/block_scout_web/templates/transaction/overview.html.eex:50
#: lib/block_scout_web/templates/transaction/overview.html.eex:49
#, elixir-autogen, elixir-format
msgid "Transaction Details"
msgstr ""
@ -2627,12 +2627,12 @@ msgstr ""
msgid "View Contract"
msgstr ""
#: lib/block_scout_web/templates/transaction/_tile.html.eex:76
#: lib/block_scout_web/templates/transaction/_tile.html.eex:73
#, elixir-autogen, elixir-format
msgid "View Less Transfers"
msgstr ""
#: lib/block_scout_web/templates/transaction/_tile.html.eex:75
#: lib/block_scout_web/templates/transaction/_tile.html.eex:72
#, elixir-autogen, elixir-format
msgid "View More Transfers"
msgstr ""

@ -1184,7 +1184,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr
msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42
#: lib/block_scout_web/templates/transaction/_tile.html.eex:95
#: lib/block_scout_web/templates/transaction/_tile.html.eex:92
#, elixir-autogen, elixir-format
msgid "IN"
msgstr ""
@ -1571,7 +1571,7 @@ msgid "Number of transfers to/from this address."
msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40
#: lib/block_scout_web/templates/transaction/_tile.html.eex:91
#: lib/block_scout_web/templates/transaction/_tile.html.eex:88
#, elixir-autogen, elixir-format
msgid "OUT"
msgstr ""
@ -1951,7 +1951,7 @@ msgid "Success"
msgstr ""
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21
#: lib/block_scout_web/templates/transaction/_tile.html.eex:55
#: lib/block_scout_web/templates/transaction/_tile.html.eex:52
#, elixir-autogen, elixir-format
msgid "TX Fee"
msgstr ""
@ -2379,7 +2379,7 @@ msgstr ""
msgid "Transaction Burnt Fee"
msgstr ""
#: lib/block_scout_web/templates/transaction/overview.html.eex:50
#: lib/block_scout_web/templates/transaction/overview.html.eex:49
#, elixir-autogen, elixir-format
msgid "Transaction Details"
msgstr ""
@ -2627,12 +2627,12 @@ msgstr ""
msgid "View Contract"
msgstr ""
#: lib/block_scout_web/templates/transaction/_tile.html.eex:76
#: lib/block_scout_web/templates/transaction/_tile.html.eex:73
#, elixir-autogen, elixir-format
msgid "View Less Transfers"
msgstr ""
#: lib/block_scout_web/templates/transaction/_tile.html.eex:75
#: lib/block_scout_web/templates/transaction/_tile.html.eex:72
#, elixir-autogen, elixir-format
msgid "View More Transfers"
msgstr ""

Loading…
Cancel
Save