Skip to content

Commit

Permalink
minor fix for make_spend function (#18131)
Browse files Browse the repository at this point in the history
  • Loading branch information
trepca committed Jun 12, 2024
1 parent f8bfd63 commit a5be6eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chia/types/coin_spend.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ def make_spend(
pr = puzzle_reveal
elif isinstance(puzzle_reveal, Program):
pr = SerializedProgram.from_program(puzzle_reveal)

else:
raise ValueError("Only [SerializedProgram, Program] supported for puzzle reveal")
if isinstance(solution, SerializedProgram):
sol = solution
elif isinstance(solution, Program):
sol = SerializedProgram.from_program(solution)
else:
raise ValueError("Only [SerializedProgram, Program] supported for solution")

return CoinSpend(coin, pr, sol)

Expand Down

0 comments on commit a5be6eb

Please sign in to comment.