From c8c46a605d2067eeb708a1bf1d5effa10a788aa3 Mon Sep 17 00:00:00 2001 From: Matt Hauff Date: Mon, 13 Jun 2022 07:32:04 -0700 Subject: [PATCH] Add test that transfer program remains default --- tests/wallet/nft_wallet/test_nft_lifecycle.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/wallet/nft_wallet/test_nft_lifecycle.py b/tests/wallet/nft_wallet/test_nft_lifecycle.py index c36d87629a11..80066421916b 100644 --- a/tests/wallet/nft_wallet/test_nft_lifecycle.py +++ b/tests/wallet/nft_wallet/test_nft_lifecycle.py @@ -140,7 +140,7 @@ async def test_ownership_layer(setup_sim: Tuple[SpendSim, SimClient]) -> None: try: TARGET_OWNER = bytes32([0] * 32) - TARGET_TP = Program.to([]) + TARGET_TP = Program.to([8]) # (x) # (c 19 (c 43 (c 5 ()))) or (mod (_ _ (new_owner new_tp)) (list new_owner new_tp ())) transfer_program = Program.to([4, 19, [4, 43, [4, [], []]]]) @@ -155,6 +155,19 @@ async def test_ownership_layer(setup_sim: Tuple[SpendSim, SimClient]) -> None: 0 ].coin + generic_spend = CoinSpend( + ownership_coin, + ownership_puzzle, + Program.to([[[51, ACS_PH, 1], [-10, [], []]]]), + ) + generic_bundle = SpendBundle([generic_spend], G2Element()) + result = await sim_client.push_tx(generic_bundle) + assert result == (MempoolInclusionStatus.SUCCESS, None) + await sim.farm_block() + ownership_coin = (await sim_client.get_coin_records_by_puzzle_hash(ownership_ph, include_spent_coins=False))[ + 0 + ].coin + skip_tp_spend = CoinSpend( ownership_coin, ownership_puzzle,