From b823a06c8efbda4ca12e99f9cc3d01d92ae801b4 Mon Sep 17 00:00:00 2001 From: slightlycyborg Date: Thu, 15 Aug 2019 09:37:38 +0000 Subject: [PATCH] fixed history_chart legend txs number formatting --- apps/block_scout_web/assets/js/pages/chain.js | 2 +- .../lib/block_scout_web/templates/chain/show.html.eex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/assets/js/pages/chain.js b/apps/block_scout_web/assets/js/pages/chain.js index 31bde04dfd..dca9796765 100644 --- a/apps/block_scout_web/assets/js/pages/chain.js +++ b/apps/block_scout_web/assets/js/pages/chain.js @@ -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')) } } }, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index 09e0db4654..318e0bdf83 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -72,7 +72,7 @@ <%= gettext "Tx/day" %> - <%= Enum.at(@transaction_stats, 0).number_of_transactions %> + <%= Cldr.Number.to_string!(Enum.at(@transaction_stats, 0).number_of_transactions, format: "#,###") %> <% end %>