feat: block pay invoice (#2727)

This commit is contained in:
Vlad Stan
2024-10-01 17:17:42 +03:00
committed by GitHub
parent e85a78854e
commit a58deff70c
7 changed files with 61 additions and 14 deletions
+3 -1
View File
@@ -491,8 +491,10 @@ async def check_time_limit_between_transactions(conn, wallet_id):
async def check_wallet_daily_withdraw_limit(conn, wallet_id, amount_msat):
limit = settings.lnbits_wallet_limit_daily_max_withdraw
if not limit or limit <= 0:
if not limit:
return
if limit < 0:
raise ValueError("It is not allowed to spend funds from this server.")
payments = await get_payments(
since=int(time.time()) - 60 * 60 * 24,
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -194,7 +194,7 @@ window.localisation.en = {
rate_limiter: 'Rate Limiter',
wallet_limiter: 'Wallet Limiter',
wallet_limit_max_withdraw_per_day:
'Max daily wallet withdrawal in sats (0 to disable)',
'Max daily wallet withdrawal in sats (0 for no limit, -1 to block withdrawal)',
wallet_max_ballance: 'Wallet max balance in sats (0 to disable)',
wallet_limit_secs_between_trans:
'Min secs between transactions per wallet (0 to disable)',
+1 -1
View File
@@ -197,7 +197,7 @@ window.localisation.pi = {
rate_limiter: 'Rate Limiter',
wallet_limiter: 'Pouch Limitar',
wallet_limit_max_withdraw_per_day:
'Max daily wallet withdrawal in sats (0 ter disable)',
'Max daily wallet withdrawal in sats (0 for no limit, -1 to block withdrawal)',
wallet_max_ballance: 'Purse max heaviness in sats (0 fer scuttle)',
wallet_limit_secs_between_trans:
"Min secs 'tween transactions per wallet (0 to disable)",