Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions routstr/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ async def fetch_balance(


async def periodic_payout() -> None:
if not settings.receive_ln_address:
logger.error("RECEIVE_LN_ADDRESS is not set, skipping payout")
return
while True:
await asyncio.sleep(60 * 15)
try:
Expand All @@ -328,6 +325,12 @@ async def periodic_payout() -> None:
available_balance = proofs_balance - user_balance
min_amount = 210 if unit == "sat" else 210000
if available_balance > min_amount:
if not settings.receive_ln_address:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better outside the loop to not spam the logger, when multiple minsts are set

logger.error(
"RECEIVE_LN_ADDRESS is not set, skipping payout"
)
continue

amount_received = await raw_send_to_lnurl(
wallet,
proofs,
Expand Down
Loading