From 7573eb3ae645a0aed645b9fef631a9326fafd97f Mon Sep 17 00:00:00 2001 From: Fedor Ivanov Date: Mon, 14 Oct 2024 17:07:53 +0300 Subject: [PATCH] fix: add missing block timestamp in election rewards for address response (#10907) --- .../lib/block_scout_web/views/api/v2/celo_view.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/api/v2/celo_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api/v2/celo_view.ex index 99241c6d4e..b013d67009 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api/v2/celo_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api/v2/celo_view.ex @@ -221,11 +221,12 @@ defmodule BlockScoutWeb.API.V2.CeloView do } end - defp prepare_election_reward(%ElectionReward{token: %Token{}} = reward) do + defp prepare_election_reward(%ElectionReward{token: %Token{}, block: %Block{}} = reward) do %{ amount: reward.amount, block_number: reward.block.number, block_hash: reward.block_hash, + block_timestamp: reward.block.timestamp, epoch_number: reward.block.number |> CeloHelper.block_number_to_epoch_number(), account: Helper.address_with_info(