From 52da86bc864ab39b4e1c9f5c1f42b62e61d9e300 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Mon, 19 Jan 2026 11:05:26 +0200 Subject: [PATCH] fix countEvents --- basicswap/basicswap.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index 2859613..a5da0a5 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -3271,7 +3271,9 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp): self.log.debug(f"logBidEvent {self.log.id(bid_id)} {event_type}") self.logEvent(Concepts.BID, bid_id, event_type, event_msg, cursor) - def countEvents(self, linked_type: int, linked_id: bytes, event_type: int, cursor): + def countEvents( + self, linked_type: int, linked_id: bytes, event_type: int, cursor + ) -> int: q = cursor.execute( "SELECT COUNT(*) FROM eventlog WHERE linked_type = :linked_type AND linked_id = :linked_id AND event_type = :event_type", { @@ -3282,8 +3284,8 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp): ).fetchone() return q[0] - def countBidEvents(self, bid, event_type: int, cursor): - return self.countEvents(int(Concepts.BID), bid.bid_id, int(event_type)) + def countBidEvents(self, bid, event_type: int, cursor) -> int: + return self.countEvents(int(Concepts.BID), bid.bid_id, int(event_type), cursor) def getEvents(self, linked_type: int, linked_id: bytes): events = []