Revert to_address_current_token_balances function update

pull/3902/head
Viktor Baranov 4 years ago
parent 0b11e14a70
commit 3ec4b4d99c
  1. 5
      apps/indexer/lib/indexer/token_balances.ex

@ -55,10 +55,9 @@ defmodule Indexer.TokenBalances do
address_token_balances
|> Enum.group_by(fn %{
address_hash: address_hash,
token_contract_address_hash: token_contract_address_hash,
token_id: token_id
token_contract_address_hash: token_contract_address_hash
} ->
{address_hash, token_contract_address_hash, token_id}
{address_hash, token_contract_address_hash}
end)
|> Enum.map(fn {_, grouped_address_token_balances} ->
Enum.max_by(grouped_address_token_balances, fn %{block_number: block_number} -> block_number end)

Loading…
Cancel
Save