Finalize bridged tokens

pull/3227/head
Victor Baranov 4 years ago
parent dd03109511
commit d0c78ca346
  1. 2
      apps/block_scout_web/lib/block_scout_web/templates/tokens/_tile.html.eex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/tokens/index.html.eex
  3. 6
      apps/block_scout_web/lib/block_scout_web/views/tokens_view.ex
  4. 8
      apps/block_scout_web/priv/gettext/default.pot
  5. 8
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -20,6 +20,7 @@
use_custom_tooltip: false
%>
</td>
<%= if bridged_tokens_enabled?() do %>
<td class="stakes-td">
<%= case @token.bridged do %>
<% nil -> %>
@ -29,6 +30,7 @@
<% false -> %>
<% end %>
</td>
<% end %>
<td class="stakes-td">
<%= if decimals?(@token) do %>
<span data-test="token_supply"><%= format_according_to_decimals(@token.total_supply, @token.decimals) %></span>

@ -19,9 +19,11 @@
<th class="stakes-table-th">
<div class="stakes-table-th-content">Address</div>
</th>
<%= if bridged_tokens_enabled?() do%>
<th class="stakes-table-th">
<div class="stakes-table-th-content">Bridged?</div>
</th>
<% end %>
<th class="stakes-table-th">
<div class="stakes-table-th-content">
Total Supply

@ -5,4 +5,10 @@ defmodule BlockScoutWeb.TokensView do
def decimals?(%Token{decimals: nil}), do: false
def decimals?(%Token{decimals: _}), do: true
def bridged_tokens_enabled? do
multi_token_bridge_mediator = Application.get_env(:block_scout_web, :multi_token_bridge_mediator)
multi_token_bridge_mediator && multi_token_bridge_mediator !== ""
end
end

@ -874,7 +874,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/tokens/holder/index.html.eex:15
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:9
#: lib/block_scout_web/views/tokens/overview_view.ex:36
#: lib/block_scout_web/views/tokens/overview_view.ex:38
msgid "Token Holders"
msgstr ""
@ -900,7 +900,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7
#: lib/block_scout_web/views/address_view.ex:344
#: lib/block_scout_web/views/tokens/instance/overview_view.ex:98
#: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/tokens/overview_view.ex:37
#: lib/block_scout_web/views/transaction_view.ex:394
msgid "Token Transfers"
msgstr ""
@ -949,7 +949,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:15
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:17
#: lib/block_scout_web/views/tokens/overview_view.ex:38
#: lib/block_scout_web/views/tokens/overview_view.ex:40
msgid "Inventory"
msgstr ""
@ -1842,7 +1842,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/_tabs.html.eex:62
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:25
#: lib/block_scout_web/views/address_view.ex:347
#: lib/block_scout_web/views/tokens/overview_view.ex:37
#: lib/block_scout_web/views/tokens/overview_view.ex:39
msgid "Read Contract"
msgstr ""

@ -874,7 +874,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/tokens/holder/index.html.eex:15
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:9
#: lib/block_scout_web/views/tokens/overview_view.ex:36
#: lib/block_scout_web/views/tokens/overview_view.ex:38
msgid "Token Holders"
msgstr ""
@ -900,7 +900,7 @@ msgstr ""
#: lib/block_scout_web/templates/transaction_token_transfer/index.html.eex:7
#: lib/block_scout_web/views/address_view.ex:344
#: lib/block_scout_web/views/tokens/instance/overview_view.ex:98
#: lib/block_scout_web/views/tokens/overview_view.ex:35
#: lib/block_scout_web/views/tokens/overview_view.ex:37
#: lib/block_scout_web/views/transaction_view.ex:394
msgid "Token Transfers"
msgstr ""
@ -949,7 +949,7 @@ msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/tokens/inventory/index.html.eex:15
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:17
#: lib/block_scout_web/views/tokens/overview_view.ex:38
#: lib/block_scout_web/views/tokens/overview_view.ex:40
msgid "Inventory"
msgstr ""
@ -1842,7 +1842,7 @@ msgstr ""
#: lib/block_scout_web/templates/address/_tabs.html.eex:62
#: lib/block_scout_web/templates/tokens/overview/_tabs.html.eex:25
#: lib/block_scout_web/views/address_view.ex:347
#: lib/block_scout_web/views/tokens/overview_view.ex:37
#: lib/block_scout_web/views/tokens/overview_view.ex:39
msgid "Read Contract"
msgstr ""

Loading…
Cancel
Save