fix usd value on address page

pull/1588/head
Ayrat Badykov 6 years ago
parent fdc94c8bb8
commit 0bd202eda5
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 6
      apps/block_scout_web/lib/block_scout_web/templates/address/_balance_card.html.eex

@ -4,17 +4,13 @@
<h2 class="card-title text-white balance-card-title"><%= gettext "Balance" %></h2> <h2 class="card-title text-white balance-card-title"><%= gettext "Balance" %></h2>
<div class="text-right"> <div class="text-right">
<h3 class="text-white" data-test="address_balance"><%= balance(@address) %></h3> <h3 class="text-white" data-test="address_balance"><%= balance(@address) %></h3>
<%= unless match?({:pending, _}, @coin_balance_status) do %> <%= if !match?({:pending, _}, @coin_balance_status) && !empty_exchange_rate?(@exchange_rate) do %>
<span class="text-white text-faded"> <span class="text-white text-faded">
<span class="current-balance-in-wei" <span class="current-balance-in-wei"
data-wei-value="<%= if @address.fetched_coin_balance, do: @address.fetched_coin_balance.value %>" data-wei-value="<%= if @address.fetched_coin_balance, do: @address.fetched_coin_balance.value %>"
<% if !empty_exchange_rate?(@exchange_rate) do %>
data-usd-exchange-rate="<%= @exchange_rate.usd_value %>"> data-usd-exchange-rate="<%= @exchange_rate.usd_value %>">
<% end %>
</spanc> </spanc>
<% if !empty_exchange_rate?(@exchange_rate) do %>
<small>(@ <span data-usd-unit-price="<%= @exchange_rate.usd_value %>"></span>/<%= gettext("Ether") %>)</small> <small>(@ <span data-usd-unit-price="<%= @exchange_rate.usd_value %>"></span>/<%= gettext("Ether") %>)</small>
<% end %>
<br> <br>
</span> </span>
<% end %> <% end %>

Loading…
Cancel
Save