Merge pull request #4840 from blockscout/vb-dedup-to-uniq

Dedup to Uniq
pull/4842/head
Victor Baranov 3 years ago committed by GitHub
commit ce866f8144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex
  3. 4
      apps/indexer/lib/indexer/transform/address_coin_balances_daily.ex
  4. 10
      apps/indexer/lib/indexer/transform/token_transfers.ex

@ -23,6 +23,7 @@
- [#4579](https://github.com/blockscout/blockscout/pull/4579) - Write contract page: Resize inputs; Improve multiplier selector
### Fixes
- [#4840](https://github.com/blockscout/blockscout/pull/4840) - Replace Enum.dedup with Enum.uniq where actually uniq items are expected
- [#4835](https://github.com/blockscout/blockscout/pull/4835) - Fix view for broken token icons
- [#4830](https://github.com/blockscout/blockscout/pull/4830) - Speed up txs per day chart data collection
- [#4818](https://github.com/blockscout/blockscout/pull/4818) - Fix for extract_omni_bridged_token_metadata_wrapper method

@ -221,7 +221,7 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactions do
block_numbers =
changes_list
|> Enum.map(& &1.block_number)
|> Enum.dedup()
|> Enum.uniq()
query =
from(

@ -41,7 +41,7 @@ defmodule Indexer.Transform.AddressCoinBalancesDaily do
coin_balances_daily_params_set =
coin_balances_daily_params_list
|> Enum.dedup()
|> Enum.uniq()
|> Enum.into(MapSet.new())
coin_balances_daily_params_set
@ -64,7 +64,7 @@ defmodule Indexer.Transform.AddressCoinBalancesDaily do
coin_balances_daily_params_set =
coin_balances_daily_params_list
|> Enum.dedup()
|> Enum.uniq()
|> Enum.into(MapSet.new())
coin_balances_daily_params_set

@ -41,17 +41,17 @@ defmodule Indexer.Transform.TokenTransfers do
|> Enum.map(fn token_transfer ->
token_transfer.token_contract_address_hash
end)
|> Enum.dedup()
|> Enum.uniq()
|> Enum.each(&update_token/1)
tokens_dedup = tokens |> Enum.dedup()
tokens_uniq = tokens |> Enum.uniq()
token_transfers_from_logs_dedup = %{
tokens: tokens_dedup,
token_transfers_from_logs_uniq = %{
tokens: tokens_uniq,
token_transfers: token_transfers
}
token_transfers_from_logs_dedup
token_transfers_from_logs_uniq
end
defp do_parse(log, %{tokens: tokens, token_transfers: token_transfers} = acc, type \\ :erc20_erc721) do

Loading…
Cancel
Save