diff --git a/app/core/_secrets.py b/app/core/_secrets.py index 4f6451f..b29ffe7 100644 --- a/app/core/_secrets.py +++ b/app/core/_secrets.py @@ -9,6 +9,7 @@ from tonsdk.utils import Address from app.core._blockchain.ton.wallet_v3cr3 import WalletV3CR3 from app.core.logger import make_log from sqlalchemy import create_engine, text +from typing import Optional def _load_seed_from_env_or_generate() -> bytes: @@ -44,7 +45,7 @@ def _init_seed_via_db() -> bytes: if time.time() - start > 120: raise TimeoutError("service_config table not available") - def read_seed() -> bytes | None: + def read_seed() -> Optional[bytes]: row = conn.execute(text("SELECT packed_value FROM service_config WHERE key = :k LIMIT 1"), {"k": "private_key"}).first() if not row: return None