Skip to content

Commit

Permalink
fix(rpc): handle nil value in preapply result
Browse files Browse the repository at this point in the history
  • Loading branch information
Awea committed Oct 21, 2024
1 parent f84e791 commit ca55393
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rpc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ defmodule Tezex.Rpc do

defp do_preapply_operation(%Rpc{} = rpc, payload) do
case post(rpc, "/blocks/head/helpers/preapply/operations", payload) do
{:ok, [%{"contents" => preapplied_operations}]} ->
{:ok, [%{"contents" => preapplied_operations}]} when is_list(preapplied_operations) ->
applied? =
Enum.all?(
preapplied_operations,
Expand Down

0 comments on commit ca55393

Please sign in to comment.