Guard against nil in Parity.Trace.Action input

Fixes #1115
pull/1316/head
Luke Imhoff 6 years ago
parent 71558ad877
commit dbb9ecad8b
  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