|
1 | 1 | from __future__ import annotations
|
2 | 2 |
|
3 |
| -from collections.abc import Sequence |
4 | 3 | from typing import Any, Optional, Union, cast
|
5 | 4 |
|
6 | 5 | from chia_rs.sized_bytes import bytes32
|
|
36 | 35 | CreateOfferForIDsResponse,
|
37 | 36 | CreateSignedTransactionsResponse,
|
38 | 37 | DeleteKey,
|
| 38 | + DeleteNotifications, |
39 | 39 | DeleteUnconfirmedTransactions,
|
40 | 40 | DIDCreateBackupFile,
|
41 | 41 | DIDCreateBackupFileResponse,
|
@@ -1117,14 +1117,8 @@ async def get_notifications(self, request: GetNotifications) -> GetNotifications
|
1117 | 1117 | response = await self.fetch("get_notifications", request.to_json_dict())
|
1118 | 1118 | return json_deserialize_with_clvm_streamable(response, GetNotificationsResponse)
|
1119 | 1119 |
|
1120 |
| - async def delete_notifications(self, ids: Optional[Sequence[bytes32]] = None) -> bool: |
1121 |
| - request = {} |
1122 |
| - if ids is not None: |
1123 |
| - request["ids"] = [id.hex() for id in ids] |
1124 |
| - response = await self.fetch("delete_notifications", request) |
1125 |
| - # TODO: casting due to lack of type checked deserialization |
1126 |
| - result = cast(bool, response["success"]) |
1127 |
| - return result |
| 1120 | + async def delete_notifications(self, request: DeleteNotifications) -> None: |
| 1121 | + await self.fetch("delete_notifications", request.to_json_dict()) |
1128 | 1122 |
|
1129 | 1123 | async def send_notification(
|
1130 | 1124 | self,
|
|
0 commit comments