Fixed burned_fees manual reward calculation

pull/5560/head
Qwerty5Uiop 3 years ago
parent b79f8d8377
commit cc6b679d62
  1. 1
      apps/explorer/lib/explorer/chain.ex
  2. 2
      apps/explorer/test/explorer/chain_test.exs

@ -824,7 +824,6 @@ defmodule Explorer.Chain do
burned_fee_counter =
transactions
|> Enum.filter(fn tx -> not is_nil(Map.get(tx, :max_priority_fee_per_gas)) end)
|> Enum.reduce(Decimal.new(0), fn %{gas_used: gas_used}, acc ->
gas_used
|> Decimal.new()

@ -3436,7 +3436,7 @@ defmodule Explorer.ChainTest do
)
expected_txn_fees = %Wei{value: Decimal.new(6)}
expected_burned_fees = %Wei{value: Decimal.new(15)}
expected_burned_fees = %Wei{value: Decimal.new(30)}
expected_uncle_reward = %Wei{value: Decimal.new(0)}
assert %{

Loading…
Cancel
Save