fix: add missing block timestamp in election rewards for address response (#10907)

dependabot/hex/dialyxir-1.4.4
Fedor Ivanov 1 month ago committed by GitHub
parent 84247986b6
commit 7573eb3ae6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      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(

Loading…
Cancel
Save