|
|
@ -177,8 +177,8 @@ defmodule Indexer.Block.Reward.Fetcher do |
|
|
|
|> Enum.map(& &1.block_hash) |
|
|
|
|> Enum.map(& &1.block_hash) |
|
|
|
|> Chain.gas_payment_by_block_hash() |
|
|
|
|> Chain.gas_payment_by_block_hash() |
|
|
|
|
|
|
|
|
|
|
|
beneficiaries_params |
|
|
|
Enum.map(beneficiaries_params, fn %{block_hash: block_hash, address_type: address_type} = beneficiary -> |
|
|
|
|> Enum.map(fn %{block_hash: block_hash} = beneficiary -> |
|
|
|
if address_type == :validator do |
|
|
|
case gas_payment_by_block_hash do |
|
|
|
case gas_payment_by_block_hash do |
|
|
|
%{^block_hash => gas_payment} -> |
|
|
|
%{^block_hash => gas_payment} -> |
|
|
|
{:ok, minted} = Wei.cast(beneficiary.reward) |
|
|
|
{:ok, minted} = Wei.cast(beneficiary.reward) |
|
|
@ -187,8 +187,10 @@ defmodule Indexer.Block.Reward.Fetcher do |
|
|
|
_ -> |
|
|
|
_ -> |
|
|
|
beneficiary |
|
|
|
beneficiary |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
beneficiary |
|
|
|
|
|
|
|
end |
|
|
|
end) |
|
|
|
end) |
|
|
|
|> Enum.uniq() |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
defp import_block_reward_params(block_rewards_params) when is_list(block_rewards_params) do |
|
|
|
defp import_block_reward_params(block_rewards_params) when is_list(block_rewards_params) do |
|
|
|