@@ -1629,8 +1629,9 @@ async def assert_trade_tx_number(wallet_node: WalletNode, trade_id: bytes32, num
1629
1629
indirect = True ,
1630
1630
)
1631
1631
@pytest .mark .limit_consensus_modes (reason = "irrelevant" )
1632
+ @pytest .mark .parametrize ("wallet_type" , [CATWallet , RCATWallet ])
1632
1633
@pytest .mark .anyio
1633
- async def test_trade_cancellation (wallet_environments : WalletTestFramework ) -> None :
1634
+ async def test_trade_cancellation (wallet_environments : WalletTestFramework , wallet_type : type [ CATWallet ] ) -> None :
1634
1635
env_maker = wallet_environments .environments [0 ]
1635
1636
env_taker = wallet_environments .environments [1 ]
1636
1637
@@ -1645,16 +1646,15 @@ async def test_trade_cancellation(wallet_environments: WalletTestFramework) -> N
1645
1646
1646
1647
xch_to_cat_amount = uint64 (100 )
1647
1648
1648
- async with env_maker .wallet_state_manager .new_action_scope (
1649
- wallet_environments .tx_config , push = True
1650
- ) as action_scope :
1651
- cat_wallet_maker = await CATWallet .create_new_cat_wallet (
1652
- env_maker .wallet_state_manager ,
1653
- env_maker .xch_wallet ,
1654
- {"identifier" : "genesis_by_id" },
1655
- xch_to_cat_amount ,
1656
- action_scope ,
1657
- )
1649
+ cat_wallet_maker = await mint_cat (
1650
+ wallet_environments ,
1651
+ env_maker ,
1652
+ "xch" ,
1653
+ "cat" ,
1654
+ xch_to_cat_amount ,
1655
+ wallet_type ,
1656
+ "cat" ,
1657
+ )
1658
1658
1659
1659
await wallet_environments .process_pending_states (
1660
1660
[
@@ -1941,8 +1941,9 @@ async def test_trade_cancellation(wallet_environments: WalletTestFramework) -> N
1941
1941
indirect = True ,
1942
1942
)
1943
1943
@pytest .mark .limit_consensus_modes (reason = "irrelevant" )
1944
+ @pytest .mark .parametrize ("wallet_type" , [CATWallet , RCATWallet ])
1944
1945
@pytest .mark .anyio
1945
- async def test_trade_conflict (wallet_environments : WalletTestFramework ) -> None :
1946
+ async def test_trade_conflict (wallet_environments : WalletTestFramework , wallet_type : type [ CATWallet ] ) -> None :
1946
1947
env_maker = wallet_environments .environments [0 ]
1947
1948
env_taker = wallet_environments .environments [1 ]
1948
1949
env_trader = wallet_environments .environments [2 ]
@@ -1963,16 +1964,15 @@ async def test_trade_conflict(wallet_environments: WalletTestFramework) -> None:
1963
1964
xch_to_cat_amount = uint64 (100 )
1964
1965
fee = uint64 (10 )
1965
1966
1966
- async with env_maker .wallet_state_manager .new_action_scope (
1967
- wallet_environments .tx_config , push = True
1968
- ) as action_scope :
1969
- await CATWallet .create_new_cat_wallet (
1970
- env_maker .wallet_state_manager ,
1971
- env_maker .xch_wallet ,
1972
- {"identifier" : "genesis_by_id" },
1973
- xch_to_cat_amount ,
1974
- action_scope ,
1975
- )
1967
+ await mint_cat (
1968
+ wallet_environments ,
1969
+ env_maker ,
1970
+ "xch" ,
1971
+ "cat" ,
1972
+ xch_to_cat_amount ,
1973
+ wallet_type ,
1974
+ "cat" ,
1975
+ )
1976
1976
1977
1977
await wallet_environments .process_pending_states (
1978
1978
[
@@ -2138,8 +2138,9 @@ async def test_trade_conflict(wallet_environments: WalletTestFramework) -> None:
2138
2138
indirect = True ,
2139
2139
)
2140
2140
@pytest .mark .limit_consensus_modes (reason = "irrelevant" )
2141
+ @pytest .mark .parametrize ("wallet_type" , [CATWallet , RCATWallet ])
2141
2142
@pytest .mark .anyio
2142
- async def test_trade_bad_spend (wallet_environments : WalletTestFramework ) -> None :
2143
+ async def test_trade_bad_spend (wallet_environments : WalletTestFramework , wallet_type : type [ CATWallet ] ) -> None :
2143
2144
env_maker = wallet_environments .environments [0 ]
2144
2145
env_taker = wallet_environments .environments [1 ]
2145
2146
@@ -2154,16 +2155,15 @@ async def test_trade_bad_spend(wallet_environments: WalletTestFramework) -> None
2154
2155
2155
2156
xch_to_cat_amount = uint64 (100 )
2156
2157
2157
- async with env_maker .wallet_state_manager .new_action_scope (
2158
- wallet_environments .tx_config , push = True
2159
- ) as action_scope :
2160
- await CATWallet .create_new_cat_wallet (
2161
- env_maker .wallet_state_manager ,
2162
- env_maker .xch_wallet ,
2163
- {"identifier" : "genesis_by_id" },
2164
- xch_to_cat_amount ,
2165
- action_scope ,
2166
- )
2158
+ await mint_cat (
2159
+ wallet_environments ,
2160
+ env_maker ,
2161
+ "xch" ,
2162
+ "cat" ,
2163
+ xch_to_cat_amount ,
2164
+ wallet_type ,
2165
+ "cat" ,
2166
+ )
2167
2167
2168
2168
await wallet_environments .process_pending_states (
2169
2169
[
@@ -2260,8 +2260,9 @@ def check_wallet_cache_empty() -> bool:
2260
2260
indirect = True ,
2261
2261
)
2262
2262
@pytest .mark .limit_consensus_modes (reason = "irrelevant" )
2263
+ @pytest .mark .parametrize ("wallet_type" , [CATWallet , RCATWallet ])
2263
2264
@pytest .mark .anyio
2264
- async def test_trade_high_fee (wallet_environments : WalletTestFramework ) -> None :
2265
+ async def test_trade_high_fee (wallet_environments : WalletTestFramework , wallet_type : type [ CATWallet ] ) -> None :
2265
2266
env_maker = wallet_environments .environments [0 ]
2266
2267
env_taker = wallet_environments .environments [1 ]
2267
2268
@@ -2276,16 +2277,15 @@ async def test_trade_high_fee(wallet_environments: WalletTestFramework) -> None:
2276
2277
2277
2278
xch_to_cat_amount = uint64 (100 )
2278
2279
2279
- async with env_maker .wallet_state_manager .new_action_scope (
2280
- wallet_environments .tx_config , push = True
2281
- ) as action_scope :
2282
- await CATWallet .create_new_cat_wallet (
2283
- env_maker .wallet_state_manager ,
2284
- env_maker .xch_wallet ,
2285
- {"identifier" : "genesis_by_id" },
2286
- xch_to_cat_amount ,
2287
- action_scope ,
2288
- )
2280
+ await mint_cat (
2281
+ wallet_environments ,
2282
+ env_maker ,
2283
+ "xch" ,
2284
+ "cat" ,
2285
+ xch_to_cat_amount ,
2286
+ wallet_type ,
2287
+ "cat" ,
2288
+ )
2289
2289
2290
2290
await wallet_environments .process_pending_states (
2291
2291
[
@@ -2405,8 +2405,9 @@ async def test_trade_high_fee(wallet_environments: WalletTestFramework) -> None:
2405
2405
indirect = True ,
2406
2406
)
2407
2407
@pytest .mark .limit_consensus_modes (reason = "irrelevant" )
2408
+ @pytest .mark .parametrize ("wallet_type" , [CATWallet , RCATWallet ])
2408
2409
@pytest .mark .anyio
2409
- async def test_aggregated_trade_state (wallet_environments : WalletTestFramework ) -> None :
2410
+ async def test_aggregated_trade_state (wallet_environments : WalletTestFramework , wallet_type : type [ CATWallet ] ) -> None :
2410
2411
env_maker = wallet_environments .environments [0 ]
2411
2412
env_taker = wallet_environments .environments [1 ]
2412
2413
@@ -2421,16 +2422,15 @@ async def test_aggregated_trade_state(wallet_environments: WalletTestFramework)
2421
2422
2422
2423
xch_to_cat_amount = uint64 (100 )
2423
2424
2424
- async with env_maker .wallet_state_manager .new_action_scope (
2425
- wallet_environments .tx_config , push = True
2426
- ) as action_scope :
2427
- await CATWallet .create_new_cat_wallet (
2428
- env_maker .wallet_state_manager ,
2429
- env_maker .xch_wallet ,
2430
- {"identifier" : "genesis_by_id" },
2431
- xch_to_cat_amount ,
2432
- action_scope ,
2433
- )
2425
+ await mint_cat (
2426
+ wallet_environments ,
2427
+ env_maker ,
2428
+ "xch" ,
2429
+ "cat" ,
2430
+ xch_to_cat_amount ,
2431
+ wallet_type ,
2432
+ "cat" ,
2433
+ )
2434
2434
2435
2435
await wallet_environments .process_pending_states (
2436
2436
[
0 commit comments