fixed history_chart legend txs number formatting

pull/2480/head
slightlycyborg 5 years ago
parent 4c55004986
commit b823a06c8e
  1. 2
      apps/block_scout_web/assets/js/pages/chain.js
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex

@ -199,7 +199,7 @@ const elements = {
'[data-selector="tx_per_day"]': {
render ($el, state, oldState) {
if (!(JSON.stringify(oldState.transactionStats) === JSON.stringify(state.transactionStats))) {
$el.empty().append(state.transactionStats[0].number_of_transactions)
$el.empty().append(numeral(state.transactionStats[0].number_of_transactions).format('0,0'))
}
}
},

@ -72,7 +72,7 @@
<%= gettext "Tx/day" %>
</span>
<span class="dashboard-banner-chart-legend-value" data-selector="tx_per_day">
<%= Enum.at(@transaction_stats, 0).number_of_transactions %>
<%= Cldr.Number.to_string!(Enum.at(@transaction_stats, 0).number_of_transactions, format: "#,###") %>
</span>
</div>
<% end %>

Loading…
Cancel
Save