Merge pull request #1316 from poanetwork/1115

Guard against nil in Parity.Trace.Action input
pull/1318/head
Luke Imhoff 6 years ago committed by GitHub
commit 02a1b46e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/parity/trace/action.ex

@ -44,8 +44,8 @@ defmodule EthereumJSONRPC.Parity.Trace.Action do
Enum.into(action, %{}, &entry_to_elixir/1) Enum.into(action, %{}, &entry_to_elixir/1)
end end
defp entry_to_elixir({key, _} = entry) defp entry_to_elixir({key, value} = entry)
when key in ~w(address callType from init input refundAddress to), when key in ~w(address callType from init input refundAddress to) and is_binary(value),
do: entry do: entry
defp entry_to_elixir({key, quantity}) when key in ~w(balance gas value) do defp entry_to_elixir({key, quantity}) when key in ~w(balance gas value) do

Loading…
Cancel
Save