Add unit price to address details page

pull/1113/head
l1h3r 6 years ago
parent d3b0824f18
commit 58ca93da13
  1. 22
      apps/block_scout_web/lib/block_scout_web/templates/address/_balance_card.html.eex
  2. 10
      apps/block_scout_web/priv/gettext/default.pot
  3. 10
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -4,10 +4,24 @@
<span></span>
<div class="text-right">
<h3 class="text-white" data-test="address_balance"><%= balance(@address) %></h3>
<span class="text-white text-faded"
data-wei-value="<%= if @address.fetched_coin_balance, do: @address.fetched_coin_balance.value %>"
data-usd-exchange-rate="<%= @exchange_rate.usd_value %>">
</span>
<div class="text-white">
<span><%= gettext("Price") %> - </span>
<span
class="text-faded"
data-wei-value="<%= if @address.fetched_coin_balance, do: @address.fetched_coin_balance.value %>"
data-usd-exchange-rate="<%= @exchange_rate.usd_value %>"
></span>
</div>
<div class="text-white">
<span><%= gettext("Unit Price") %> - </span>
<span
class="text-faded"
data-wei-value="<%= Explorer.Chain.Wei.from(Decimal.new(1), :ether).value %>"
data-usd-exchange-rate="<%= @exchange_rate.usd_value %>"
></span>
</div>
<div class="mt-3" data-token-balance-dropdown data-api_path="<%= address_token_balance_path(BlockScoutWeb.Endpoint, :index, @address.hash) %>">
<div data-loading class="mb-0 text-white text-faded">

@ -387,7 +387,7 @@ msgid "Enter the Solidity Contract Code below"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:22
#: lib/block_scout_web/templates/address/_balance_card.html.eex:36
msgid "Error trying to fetch balances."
msgstr ""
@ -421,7 +421,7 @@ msgid "Execute"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:18
#: lib/block_scout_web/templates/address/_balance_card.html.eex:32
msgid "Fetching tokens..."
msgstr ""
@ -699,6 +699,7 @@ msgid "Position %{index}"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:9
#: lib/block_scout_web/templates/chain/show.html.eex:11
#: lib/block_scout_web/templates/layout/app.html.eex:50
msgid "Price"
@ -1322,3 +1323,8 @@ msgstr ""
#: lib/block_scout_web/views/internal_transaction_view.ex:24
msgid "Static Call"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:18
msgid "Unit Price"
msgstr ""

@ -387,7 +387,7 @@ msgid "Enter the Solidity Contract Code below"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:22
#: lib/block_scout_web/templates/address/_balance_card.html.eex:36
msgid "Error trying to fetch balances."
msgstr ""
@ -421,7 +421,7 @@ msgid "Execute"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:18
#: lib/block_scout_web/templates/address/_balance_card.html.eex:32
msgid "Fetching tokens..."
msgstr ""
@ -699,6 +699,7 @@ msgid "Position %{index}"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:9
#: lib/block_scout_web/templates/chain/show.html.eex:11
#: lib/block_scout_web/templates/layout/app.html.eex:50
msgid "Price"
@ -1322,3 +1323,8 @@ msgstr ""
#: lib/block_scout_web/views/internal_transaction_view.ex:24
msgid "Static Call"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/address/_balance_card.html.eex:18
msgid "Unit Price"
msgstr ""

Loading…
Cancel
Save