From ceb9bab651a921f7691de050602df45d23b6aee4 Mon Sep 17 00:00:00 2001 From: Nikita Pozdniakov Date: Fri, 22 Sep 2023 14:29:43 +0300 Subject: [PATCH] Handle ':error.types/0 is undefined' error --- apps/explorer/lib/explorer/chain/transaction.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/explorer/lib/explorer/chain/transaction.ex b/apps/explorer/lib/explorer/chain/transaction.ex index c40d87769f..82967c0c06 100644 --- a/apps/explorer/lib/explorer/chain/transaction.ex +++ b/apps/explorer/lib/explorer/chain/transaction.ex @@ -756,12 +756,12 @@ defmodule Explorer.Chain.Transaction do end defp find_and_decode(abi, data, hash) do - result = - abi - |> ABI.parse_specification() - |> ABI.find_and_decode(data) - - {:ok, result} + with {%FunctionSelector{}, _mapping} = result <- + abi + |> ABI.parse_specification() + |> ABI.find_and_decode(data) do + {:ok, result} + end rescue e -> Logger.warn(fn ->