Add Enum.uniq before sanitizing token transfers

pull/9437/head
Qwerty5Uiop 8 months ago
parent c2868df8cd
commit f997b67be8
  1. 1
      CHANGELOG.md
  2. 1
      apps/indexer/lib/indexer/transform/token_transfers.ex

@ -4,6 +4,7 @@
### Features
- [#9437](https://github.com/blockscout/blockscout/pull/9437) - Add Enum.uniq before sanitizing token transfers
- [#9403](https://github.com/blockscout/blockscout/pull/9403) - Null round handling
- [#9401](https://github.com/blockscout/blockscout/pull/9401) - Eliminate incorrect token transfers with empty token_ids
- [#9396](https://github.com/blockscout/blockscout/pull/9396) - More-Minimal Proxy support

@ -107,6 +107,7 @@ defmodule Indexer.Transform.TokenTransfers do
defp sanitize_token_types(tokens, token_transfers) do
existing_token_types_map =
tokens
|> Enum.uniq()
|> Enum.reduce([], fn %{contract_address_hash: address_hash}, acc ->
case Repo.get_by(Token, contract_address_hash: address_hash) do
%{type: type} -> [{address_hash, type} | acc]

Loading…
Cancel
Save