From 8f63b55ff30071a11af13f5b8133f5c11eec718f Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Thu, 5 Jan 2023 12:56:32 +0100 Subject: [PATCH] fix mypy --- lnbits/extensions/lnurlp/crud.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lnbits/extensions/lnurlp/crud.py b/lnbits/extensions/lnurlp/crud.py index 26cf2849..d5963b95 100644 --- a/lnbits/extensions/lnurlp/crud.py +++ b/lnbits/extensions/lnurlp/crud.py @@ -7,7 +7,7 @@ from .models import CreatePayLinkData, PayLink async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink: - link_id = urlsafe_short_hash()[:5] + link_id = urlsafe_short_hash()[:6] result = await db.execute( f""" @@ -29,7 +29,6 @@ async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink: fiat_base_multiplier ) VALUES (?, ?, ?, ?, ?, 0, 0, ?, ?, ?, ?, ?, ?, ?, ?) - {returning} """, ( link_id, @@ -53,7 +52,7 @@ async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink: return link -async def get_pay_link(link_id: int) -> Optional[PayLink]: +async def get_pay_link(link_id: str) -> Optional[PayLink]: row = await db.fetchone("SELECT * FROM lnurlp.pay_links WHERE id = ?", (link_id,)) return PayLink.from_row(row) if row else None