From 129ea7bb7625237ee6b22d28893a827de80adcd2 Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Sun, 12 Jul 2026 23:33:22 +0200 Subject: [PATCH] fix mypy --- routstr/core/db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routstr/core/db.py b/routstr/core/db.py index 586f467e..9ebb87e9 100644 --- a/routstr/core/db.py +++ b/routstr/core/db.py @@ -287,7 +287,7 @@ async def store_cashu_transaction( created_at: int | None = None, source: str = "x-cashu", api_key_hashed_key: str | None = None, -) -> None: +) -> bool: try: async with create_session() as session: tx = CashuTransaction( @@ -304,11 +304,13 @@ async def store_cashu_transaction( ) session.add(tx) await session.commit() + return True except Exception as e: logger.warning( f"Failed to store cashu transaction: {e} (type={typ})", extra={"error": str(e), "type": typ}, ) + return False class UpstreamProviderRow(SQLModel, table=True): # type: ignore