Skip to content

Commit 6f0ce10

Browse files
committed
Port get_default_cat_list
1 parent afb4e9c commit 6f0ce10

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

chia/wallet/wallet_rpc_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
CombineCoinsResponse,
119119
CreateNewDL,
120120
CreateNewDLResponse,
121+
DefaultCAT,
121122
DeleteKey,
122123
DeleteNotifications,
123124
DeleteUnconfirmedTransactions,
@@ -172,6 +173,7 @@
172173
GatherSigningInfo,
173174
GatherSigningInfoResponse,
174175
GenerateMnemonicResponse,
176+
GetCATListResponse,
175177
GetCoinRecordsByNames,
176178
GetCoinRecordsByNamesResponse,
177179
GetCurrentDerivationIndexResponse,
@@ -2092,8 +2094,9 @@ async def sign_message_by_id(self, request: SignMessageByID) -> SignMessageByIDR
20922094
# CATs and Trading
20932095
##########################################################################################
20942096

2095-
async def get_cat_list(self, request: dict[str, Any]) -> EndpointResult:
2096-
return {"cat_list": list(DEFAULT_CATS.values())}
2097+
@marshal
2098+
async def get_cat_list(self, request: Empty) -> GetCATListResponse:
2099+
return GetCATListResponse([DefaultCAT.from_json_dict(default_cat) for default_cat in DEFAULT_CATS.values()])
20972100

20982101
async def cat_set_name(self, request: dict[str, Any]) -> EndpointResult:
20992102
wallet_id = uint32(request["wallet_id"])

0 commit comments

Comments
 (0)