fix some of mypy complaints.
This commit is contained in:
@@ -106,7 +106,7 @@ async def create_bleskomat_lnurl(
|
||||
return bleskomat_lnurl
|
||||
|
||||
|
||||
async def get_bleskomat_lnurl(secret: str) -> BleskomatLnurl:
|
||||
async def get_bleskomat_lnurl(secret: str) -> Optional[BleskomatLnurl]:
|
||||
hash = generate_bleskomat_lnurl_hash(secret)
|
||||
row = await db.fetchone("SELECT * FROM bleskomat_lnurls WHERE hash = ?", (hash,))
|
||||
return BleskomatLnurl(**row) if row else None
|
||||
|
||||
@@ -91,8 +91,8 @@ class BleskomatLnurl(NamedTuple):
|
||||
wallet_id=self.wallet,
|
||||
payment_request=query["pr"],
|
||||
)
|
||||
except Exception as exc:
|
||||
raise LnurlValidationError(f"Failed to pay invoice: {exc.message}")
|
||||
except Exception:
|
||||
raise LnurlValidationError("Failed to pay invoice")
|
||||
if not payment_hash:
|
||||
raise LnurlValidationError("Failed to pay invoice")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user