diff --git a/apps/indexer/lib/indexer/block/reward/fetcher.ex b/apps/indexer/lib/indexer/block/reward/fetcher.ex index fe1d5d2bf2..0c190f9719 100644 --- a/apps/indexer/lib/indexer/block/reward/fetcher.ex +++ b/apps/indexer/lib/indexer/block/reward/fetcher.ex @@ -177,18 +177,20 @@ defmodule Indexer.Block.Reward.Fetcher do |> Enum.map(& &1.block_hash) |> Chain.gas_payment_by_block_hash() - beneficiaries_params - |> Enum.map(fn %{block_hash: block_hash} = beneficiary -> - case gas_payment_by_block_hash do - %{^block_hash => gas_payment} -> - {:ok, minted} = Wei.cast(beneficiary.reward) - %{beneficiary | reward: Wei.sum(minted, gas_payment)} - - _ -> - beneficiary + Enum.map(beneficiaries_params, fn %{block_hash: block_hash, address_type: address_type} = beneficiary -> + if address_type == :validator do + case gas_payment_by_block_hash do + %{^block_hash => gas_payment} -> + {:ok, minted} = Wei.cast(beneficiary.reward) + %{beneficiary | reward: Wei.sum(minted, gas_payment)} + + _ -> + beneficiary + end + else + beneficiary end end) - |> Enum.uniq() end defp import_block_reward_params(block_rewards_params) when is_list(block_rewards_params) do