5151 CATSpend ,
5252 CATSpendResponse ,
5353 ClawbackPuzzleDecoratorOverride ,
54+ CreateNewWallet ,
55+ CreateNewWalletType ,
5456 CreateOfferForIDs ,
5557 CreateOfferForIDsResponse ,
5658 DeleteUnconfirmedTransactions ,
8385 TakeOffer ,
8486 TakeOfferResponse ,
8587 TransactionRecordWithMetadata ,
88+ WalletCreationMode ,
8689 WalletInfoResponse ,
8790)
8891from chia .wallet .wallet_spend_bundle import WalletSpendBundle
@@ -707,10 +710,6 @@ def test_add_token(capsys: object, get_test_cli_clients: tuple[TestRpcClients, P
707710
708711 # set RPC Client
709712 class AddTokenRpcClient (TestWalletRpcClient ):
710- async def create_wallet_for_existing_cat (self , asset_id : bytes ) -> dict [str , int ]:
711- self .add_to_log ("create_wallet_for_existing_cat" , (asset_id ,))
712- return {"wallet_id" : 3 }
713-
714713 async def set_cat_name (self , request : CATSetName ) -> CATSetNameResponse :
715714 self .add_to_log ("set_cat_name" , (request .wallet_id , request .name ))
716715 return CATSetNameResponse (wallet_id = request .wallet_id )
@@ -728,7 +727,19 @@ async def set_cat_name(self, request: CATSetName) -> CATSetNameResponse:
728727
729728 expected_calls : logType = {
730729 "cat_asset_id_to_name" : [(get_bytes32 (1 ),), (bytes32 ([1 , 2 ] * 16 ),)],
731- "create_wallet_for_existing_cat" : [(bytes32 ([1 , 2 ] * 16 ),)],
730+ "create_new_wallet" : [
731+ (
732+ CreateNewWallet (
733+ wallet_type = CreateNewWalletType .CAT_WALLET ,
734+ mode = WalletCreationMode .EXISTING ,
735+ asset_id = bytes32 ([1 , 2 ] * 16 ),
736+ push = True ,
737+ ),
738+ DEFAULT_TX_CONFIG ,
739+ tuple (),
740+ ConditionValidTimes (),
741+ )
742+ ],
732743 "set_cat_name" : [(2 , "examplecat" ), (3 , "examplecat" )],
733744 }
734745 test_rpc_clients .wallet_rpc_client .check_log (expected_calls )
0 commit comments