From e4ed4882840cfc0de3dd8b216154b05d8c8243db Mon Sep 17 00:00:00 2001 From: nikitosing Date: Sat, 5 Mar 2022 17:13:48 +0300 Subject: [PATCH] Fix coin-balances/by-day bug --- CHANGELOG.md | 1 + apps/explorer/lib/explorer/chain/address/coin_balance.ex | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25e7a8e26..7f2278850a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#5259](https://github.com/blockscout/blockscout/pull/5259) - Fix `coin-balances/by-day` bug ### Chore diff --git a/apps/explorer/lib/explorer/chain/address/coin_balance.ex b/apps/explorer/lib/explorer/chain/address/coin_balance.ex index 1b99160889..8eeda72b79 100644 --- a/apps/explorer/lib/explorer/chain/address/coin_balance.ex +++ b/apps/explorer/lib/explorer/chain/address/coin_balance.ex @@ -178,6 +178,7 @@ defmodule Explorer.Chain.Address.CoinBalance do cb in subquery(coin_balance_query), inner_join: b in Block, on: cb.block_number == b.number, + where: b.consensus, select: %{timestamp: b.timestamp, value: cb.value} ) end