fix coin serialization

This commit is contained in:
Matt Hauff 2022-07-18 08:36:32 -05:00
parent 447a09d884
commit 849336f307
No known key found for this signature in database
GPG Key ID: 3CBA6CFC81A00E46
2 changed files with 2 additions and 2 deletions

View File

@ -907,7 +907,7 @@ class NFTWallet:
"0x"
+ royalty_coin.parent_coin_info.hex()
+ royalty_coin.puzzle_hash.hex()
+ bytes(royalty_coin.amount).hex()
+ bytes(uint64(royalty_coin.amount)).hex()
)
parent_spend_hex: str = "0x" + bytes(parent_spend).hex()
solver = Solver(

View File

@ -42,7 +42,7 @@ def test_cat_outer_puzzle() -> None:
child_coin = Coin(parent_coin.name(), double_cat_puzzle.get_tree_hash(), uint64(100))
parent_spend = CoinSpend(parent_coin, double_cat_puzzle.to_serialized_program(), Program.to([]))
child_coin_as_hex: str = (
"0x" + child_coin.parent_coin_info.hex() + child_coin.puzzle_hash.hex() + bytes(child_coin.amount).hex()
"0x" + child_coin.parent_coin_info.hex() + child_coin.puzzle_hash.hex() + bytes(uint64(child_coin.amount)).hex()
)
parent_spend_as_hex: str = "0x" + bytes(parent_spend).hex()
inner_solution = Program.to([[51, ACS.get_tree_hash(), 100]])