disable usd value in transaction if there no exchange_rate

pull/1846/head
saneery 6 years ago
parent c85e9d9bbe
commit 0fa216dc35
  1. 2
      apps/block_scout_web/lib/block_scout_web/templates/address/_balance_card.html.eex
  2. 9
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex
  3. 6
      apps/block_scout_web/priv/gettext/default.pot
  4. 6
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -9,7 +9,7 @@
<span class="current-balance-in-wei"
data-wei-value="<%= if @address.fetched_coin_balance, do: @address.fetched_coin_balance.value %>"
data-usd-exchange-rate="<%= @exchange_rate.usd_value %>">
</spanc>
</span>
<small>(@ <span data-usd-unit-price="<%= @exchange_rate.usd_value %>"></span>/<%= gettext("Ether") %>)</small>
<br>
</span>

@ -75,7 +75,7 @@
<%= formatted_fee(@transaction, denomination: :ether) %>
<%= if !empty_exchange_rate?(@exchange_rate) do %>
(<span data-wei-value=<%= fee(@transaction) %> data-usd-exchange-rate=<%= @exchange_rate.usd_value %>></span>)
(<span data-wei-value=<%= fee(@transaction) %> data-usd-exchange-rate=<%= @exchange_rate.usd_value %>></span>)
<% end %>
</dd>
</dl>
@ -183,7 +183,12 @@
<h3 class="text-white">
<%= value(@transaction) %>
</h3>
<span class="text-white text-faded" data-wei-value=<%= @transaction.value.value %> data-usd-exchange-rate=<%= @exchange_rate.usd_value %>></span>
<%= if !empty_exchange_rate?(@exchange_rate) do %>
<span class="text-white text-faded"
data-wei-value=<%= @transaction.value.value %>
data-usd-exchange-rate=<%= @exchange_rate.usd_value %>>
</span>
<% end %>
</div>
</div>
</div>

@ -431,7 +431,7 @@ msgid "GET"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:194
#: lib/block_scout_web/templates/transaction/overview.html.eex:199
msgid "Gas"
msgstr ""
@ -513,7 +513,7 @@ msgid "Less than"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:206
#: lib/block_scout_web/templates/transaction/overview.html.eex:211
msgid "Limit"
msgstr ""
@ -995,7 +995,7 @@ msgid "Unique Token"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:199
#: lib/block_scout_web/templates/transaction/overview.html.eex:204
msgid "Used"
msgstr ""

@ -431,7 +431,7 @@ msgid "GET"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:194
#: lib/block_scout_web/templates/transaction/overview.html.eex:199
msgid "Gas"
msgstr ""
@ -513,7 +513,7 @@ msgid "Less than"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:206
#: lib/block_scout_web/templates/transaction/overview.html.eex:211
msgid "Limit"
msgstr ""
@ -995,7 +995,7 @@ msgid "Unique Token"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:199
#: lib/block_scout_web/templates/transaction/overview.html.eex:204
msgid "Used"
msgstr ""

Loading…
Cancel
Save