Fix no function clause matching in BENS.item_to_address_hash_strings/1 (#9640)

pull/9638/head
nikitosing 8 months ago committed by GitHub
parent 208192d918
commit 010758fc0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 14
      apps/explorer/lib/explorer/microservice_interfaces/bens.ex

@ -19,6 +19,7 @@
### Fixes
- [#9640](https://github.com/blockscout/blockscout/pull/9640) - Fix no function clause matching in `BENS.item_to_address_hash_strings/1`
- [#9629](https://github.com/blockscout/blockscout/pull/9629) - Don't insert pbo for not inserted blocks
- [#9601](https://github.com/blockscout/blockscout/pull/9601) - Fix token instance transform for some unconventional tokens
- [#9597](https://github.com/blockscout/blockscout/pull/9597) - Update token transfers block_consensus by block_number

@ -293,17 +293,9 @@ defmodule Explorer.MicroserviceInterfaces.BENS do
defp parse_get_address_response(_), do: nil
defp item_to_address_hash_strings(%Transaction{
to_address_hash: nil,
created_contract_address_hash: created_contract_address_hash,
from_address_hash: from_address_hash
}) do
[to_string(created_contract_address_hash), to_string(from_address_hash)]
end
defp item_to_address_hash_strings(%Transaction{
to_address_hash: to_address_hash,
created_contract_address_hash: nil,
created_contract_address_hash: created_contract_address_hash,
from_address_hash: from_address_hash,
token_transfers: token_transfers
}) do
@ -316,7 +308,9 @@ defmodule Explorer.MicroserviceInterfaces.BENS do
[]
end
[to_string(to_address_hash), to_string(from_address_hash)] ++ token_transfers_addresses
([to_address_hash, created_contract_address_hash, from_address_hash]
|> Enum.reject(&is_nil/1)
|> Enum.map(&to_string/1)) ++ token_transfers_addresses
end
defp item_to_address_hash_strings(%TokenTransfer{

Loading…
Cancel
Save