From b944d936cf07c39d363ddce7ecdd165120b33d76 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Fri, 9 Aug 2019 15:34:27 +0300 Subject: [PATCH] fix style --- .../assets/js/lib/coin_balance_history_chart.js | 12 ++++++------ .../lib/explorer/chain/address/coin_balance.ex | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/coin_balance_history_chart.js b/apps/block_scout_web/assets/js/lib/coin_balance_history_chart.js index a3bd66b867..d6dc074529 100644 --- a/apps/block_scout_web/assets/js/lib/coin_balance_history_chart.js +++ b/apps/block_scout_web/assets/js/lib/coin_balance_history_chart.js @@ -18,13 +18,13 @@ export function createCoinBalanceHistoryChart (el) { y: balance.value })) - var step_size = 3 + var stepSize = 3 if (data.length > 2) { - console.log(data[0].date) - var diff = Math.abs(new Date(data[0].date) - new Date(data[1].date)); - var period_in_days = diff / (1000 * 60 * 60 * 24) - step_size = period_in_days + var diff = Math.abs(new Date(data[0].date) - new Date(data[1].date)) + var periodInDays = diff / (1000 * 60 * 60 * 24) + console.log(periodInDays) + stepSize = periodInDays } return new Chart(el, { type: 'line', @@ -44,7 +44,7 @@ export function createCoinBalanceHistoryChart (el) { type: 'time', time: { unit: 'day', - stepSize: step_size + stepSize: stepSize } }], yAxes: [{ diff --git a/apps/explorer/lib/explorer/chain/address/coin_balance.ex b/apps/explorer/lib/explorer/chain/address/coin_balance.ex index 8d7b47e8da..c218f109cd 100644 --- a/apps/explorer/lib/explorer/chain/address/coin_balance.ex +++ b/apps/explorer/lib/explorer/chain/address/coin_balance.ex @@ -115,7 +115,6 @@ defmodule Explorer.Chain.Address.CoinBalance do |> select([cb, b], %{timestamp: b.timestamp}) end - def changeset(%__MODULE__{} = balance, params) do balance |> cast(params, @allowed_fields)