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 use BlockScoutWeb, :controller
import BlockScoutWeb.Chain, only: [next_page_params: 3, paging_options: 1, split_list_by_page: 1] 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 BlockScoutWeb.{AccessHelpers, AddressTokenView, Controller}
alias Explorer.{Chain, Market} alias Explorer.{Chain, Market}
@ -74,7 +76,8 @@ defmodule BlockScoutWeb.AddressTokenController do
current_path: Controller.current_full_path(conn), current_path: Controller.current_full_path(conn),
coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address), coin_balance_status: CoinBalanceOnDemand.trigger_fetch(address),
exchange_rate: Market.get_exchange_rate(Explorer.coin()) || Token.null(), 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 else
{:restricted_access, _} -> {: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 %> <% 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} %> <% {: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 %> <% 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 %> <%= render BlockScoutWeb.Advertisement.TextAdView, "index.html", conn: @conn %>
<section class="fs-14" data-page="transaction-details" data-page-transaction-hash="<%= @transaction %>"> <section class="fs-14" data-page="transaction-details" data-page-transaction-hash="<%= @transaction %>">
<div class="row"> <div class="row">
@ -207,6 +206,7 @@
clipboard_text: from_address_hash, clipboard_text: from_address_hash,
aria_label: gettext("Copy From Address"), aria_label: gettext("Copy From Address"),
title: gettext("Copy From Address") %> title: gettext("Copy From Address") %>
<%= render BlockScoutWeb.AddressView, "_labels.html", tags: @from_tags %>
</dd> </dd>
</dl> </dl>
<!-- To --> <!-- To -->

@ -1184,7 +1184,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr
msgstr "" msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42 #: 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 #, elixir-autogen, elixir-format
msgid "IN" msgid "IN"
msgstr "" msgstr ""
@ -1571,7 +1571,7 @@ msgid "Number of transfers to/from this address."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40 #: 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 #, elixir-autogen, elixir-format
msgid "OUT" msgid "OUT"
msgstr "" msgstr ""
@ -1951,7 +1951,7 @@ msgid "Success"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21 #: 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 #, elixir-autogen, elixir-format
msgid "TX Fee" msgid "TX Fee"
msgstr "" msgstr ""
@ -2379,7 +2379,7 @@ msgstr ""
msgid "Transaction Burnt Fee" msgid "Transaction Burnt Fee"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "Transaction Details" msgid "Transaction Details"
msgstr "" msgstr ""
@ -2627,12 +2627,12 @@ msgstr ""
msgid "View Contract" msgid "View Contract"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "View Less Transfers" msgid "View Less Transfers"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "View More Transfers" msgid "View More Transfers"
msgstr "" msgstr ""

@ -1184,7 +1184,7 @@ msgid "IMPORTANT: This information is a best guess based on similar functions fr
msgstr "" msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:42 #: 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 #, elixir-autogen, elixir-format
msgid "IN" msgid "IN"
msgstr "" msgstr ""
@ -1571,7 +1571,7 @@ msgid "Number of transfers to/from this address."
msgstr "" msgstr ""
#: lib/block_scout_web/templates/internal_transaction/_tile.html.eex:40 #: 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 #, elixir-autogen, elixir-format
msgid "OUT" msgid "OUT"
msgstr "" msgstr ""
@ -1951,7 +1951,7 @@ msgid "Success"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/transaction/_pending_tile.html.eex:21 #: 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 #, elixir-autogen, elixir-format
msgid "TX Fee" msgid "TX Fee"
msgstr "" msgstr ""
@ -2379,7 +2379,7 @@ msgstr ""
msgid "Transaction Burnt Fee" msgid "Transaction Burnt Fee"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "Transaction Details" msgid "Transaction Details"
msgstr "" msgstr ""
@ -2627,12 +2627,12 @@ msgstr ""
msgid "View Contract" msgid "View Contract"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "View Less Transfers" msgid "View Less Transfers"
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "View More Transfers" msgid "View More Transfers"
msgstr "" msgstr ""

Loading…
Cancel
Save