From 453337cb2c058a4fa6442fe7e637bca6cb8a8cf1 Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Sun, 5 Apr 2026 00:36:59 +0200 Subject: [PATCH] update default payout --- routstr/auth.py | 1 + routstr/wallet.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/routstr/auth.py b/routstr/auth.py index c8df2fbe..808bd7c4 100644 --- a/routstr/auth.py +++ b/routstr/auth.py @@ -27,6 +27,7 @@ logger = get_logger(__name__) ROUTSTR_FEE_PERCENT: float = 2.1 ROUTSTR_LN_ADDRESS: str = "npub130mznv74rxs032peqym6g3wqavh472623mt3z5w73xq9r6qqdufs7ql29s@npub.cash" ROUTSTR_FEE_PAYOUT_INTERVAL_SECONDS: int = 900 +ROUTSTR_FEE_DEFAULT_PAYOUT: int = 200 # TODO: implement prepaid api key (not like it was before) # PREPAID_API_KEY = os.environ.get("PREPAID_API_KEY", None) diff --git a/routstr/wallet.py b/routstr/wallet.py index 9c7fb829..0707e2f2 100644 --- a/routstr/wallet.py +++ b/routstr/wallet.py @@ -560,7 +560,11 @@ async def periodic_refund_sweep() -> None: async def periodic_routstr_fee_payout() -> None: - from .auth import ROUTSTR_FEE_PAYOUT_INTERVAL_SECONDS, ROUTSTR_LN_ADDRESS + from .auth import ( + ROUTSTR_FEE_DEFAULT_PAYOUT, + ROUTSTR_FEE_PAYOUT_INTERVAL_SECONDS, + ROUTSTR_LN_ADDRESS, + ) if not ROUTSTR_LN_ADDRESS: logger.info("ROUTSTR_LN_ADDRESS not set, skipping fee payout") @@ -571,7 +575,7 @@ async def periodic_routstr_fee_payout() -> None: async with db.create_session() as session: fee = await db.get_routstr_fee(session) accumulated_sats = fee.accumulated_msats // 1000 - if accumulated_sats >= 10: + if accumulated_sats >= ROUTSTR_FEE_DEFAULT_PAYOUT: wallet = await get_wallet(settings.primary_mint, "sat") proofs = get_proofs_per_mint_and_unit( wallet, settings.primary_mint, "sat", not_reserved=True