mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 17:26:15 +01:00
reduce max string length
This commit is contained in:
parent
0af22a6256
commit
0b596c00ca
5 changed files with 13 additions and 7 deletions
2
.flake8
2
.flake8
|
@ -1,5 +1,5 @@
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 300
|
max-line-length = 150
|
||||||
exclude = lnbits/wallets/lnd_grpc_files/, lnbits/extensions/
|
exclude = lnbits/wallets/lnd_grpc_files/, lnbits/extensions/
|
||||||
ignore =
|
ignore =
|
||||||
# E402: module level import not at top of file
|
# E402: module level import not at top of file
|
||||||
|
|
|
@ -428,7 +428,10 @@ class Formatter:
|
||||||
self.padding = 0
|
self.padding = 0
|
||||||
self.minimal_fmt: str = "<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level}</level> | <level>{message}</level>\n"
|
self.minimal_fmt: str = "<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level}</level> | <level>{message}</level>\n"
|
||||||
if settings.debug:
|
if settings.debug:
|
||||||
self.fmt: str = "<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level: <4}</level> | <cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> | <level>{message}</level>\n"
|
self.fmt: str = (
|
||||||
|
"<green>{time:YYYY-MM-DD HH:mm:ss.SS}</green> | <level>{level: <4}</level> | "
|
||||||
|
"<cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> | <level>{message}</level>\n"
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
self.fmt: str = self.minimal_fmt
|
self.fmt: str = self.minimal_fmt
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,8 @@ async def m004_ensure_fees_are_always_negative(db):
|
||||||
|
|
||||||
async def m005_balance_check_balance_notify(db):
|
async def m005_balance_check_balance_notify(db):
|
||||||
"""
|
"""
|
||||||
Keep track of balanceCheck-enabled lnurl-withdrawals to be consumed by an LNbits wallet and of balanceNotify URLs supplied by users to empty their wallets.
|
Keep track of balanceCheck-enabled lnurl-withdrawals to be consumed by an
|
||||||
|
LNbits wallet and of balanceNotify URLs supplied by users to empty their wallets.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
await db.execute(
|
await db.execute(
|
||||||
|
|
|
@ -334,7 +334,8 @@ async def perform_lnurlauth(
|
||||||
|
|
||||||
def encode_strict_der(r: int, s: int, order: int):
|
def encode_strict_der(r: int, s: int, order: int):
|
||||||
# if s > order/2 verification will fail sometimes
|
# if s > order/2 verification will fail sometimes
|
||||||
# so we must fix it here (see https://github.com/indutny/elliptic/blob/e71b2d9359c5fe9437fbf46f1f05096de447de57/lib/elliptic/ec/index.js#L146-L147)
|
# so we must fix it here see:
|
||||||
|
# https://github.com/indutny/elliptic/blob/e71b2d9359c5fe9437fbf46f1f05096de447de57/lib/elliptic/ec/index.js#L146-L147
|
||||||
if s > order // 2:
|
if s > order // 2:
|
||||||
s = order - s
|
s = order - s
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,10 @@ class VoidWallet(Wallet):
|
||||||
raise Unsupported("")
|
raise Unsupported("")
|
||||||
|
|
||||||
async def status(self) -> StatusResponse:
|
async def status(self) -> StatusResponse:
|
||||||
logger.warning(
|
logger.warning((
|
||||||
"This backend does nothing, it is here just as a placeholder, you must configure an actual backend before being able to do anything useful with LNbits."
|
"This backend does nothing, it is here just as a placeholder, you must configure an "
|
||||||
)
|
"actual backend before being able to do anything useful with LNbits."
|
||||||
|
))
|
||||||
return StatusResponse(None, 0)
|
return StatusResponse(None, 0)
|
||||||
|
|
||||||
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
|
async def pay_invoice(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
|
||||||
|
|
Loading…
Add table
Reference in a new issue