|
|
|
@ -177,8 +177,8 @@ 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 -> |
|
|
|
|
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) |
|
|
|
@ -187,8 +187,10 @@ defmodule Indexer.Block.Reward.Fetcher do |
|
|
|
|
_ -> |
|
|
|
|
beneficiary |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
beneficiary |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|> Enum.uniq() |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
defp import_block_reward_params(block_rewards_params) when is_list(block_rewards_params) do |
|
|
|
|