fix qrcodes and type ignores

This commit is contained in:
dni ⚡ 2024-10-07 08:10:58 +02:00
commit d8eafa3e13
No known key found for this signature in database
GPG key ID: D1F416F29AD26E87
6 changed files with 25 additions and 32 deletions

10
crud.py
View file

@ -43,7 +43,7 @@ async def get_withdraw_link(link_id: str, num=0) -> Optional[WithdrawLink]:
link: WithdrawLink = await db.fetchone( link: WithdrawLink = await db.fetchone(
"SELECT * FROM withdraw.withdraw_link WHERE id = :id", "SELECT * FROM withdraw.withdraw_link WHERE id = :id",
{"id": link_id}, {"id": link_id},
WithdrawLink, WithdrawLink, # type: ignore
) )
if not link: if not link:
return None return None
@ -56,7 +56,7 @@ async def get_withdraw_link_by_hash(unique_hash: str, num=0) -> Optional[Withdra
link = await db.fetchone( link = await db.fetchone(
"SELECT * FROM withdraw.withdraw_link WHERE unique_hash = :hash", "SELECT * FROM withdraw.withdraw_link WHERE unique_hash = :hash",
{"hash": unique_hash}, {"hash": unique_hash},
WithdrawLink, WithdrawLink, # type: ignore
) )
if not link: if not link:
return None return None
@ -78,7 +78,7 @@ async def get_withdraw_links(
ORDER BY open_time DESC LIMIT :limit OFFSET :offset ORDER BY open_time DESC LIMIT :limit OFFSET :offset
""", """,
{"limit": limit, "offset": offset}, {"limit": limit, "offset": offset},
WithdrawLink, WithdrawLink, # type: ignore
) )
total = await db.fetchone( total = await db.fetchone(
@ -137,12 +137,12 @@ async def create_hash_check(the_hash: str, lnurl_id: str) -> HashCheck:
async def get_hash_check(the_hash: str, lnurl_id: str) -> HashCheck: async def get_hash_check(the_hash: str, lnurl_id: str) -> HashCheck:
hash_check = await db.fetchone( hash_check = await db.fetchone(
"SELECT * FROM withdraw.hash_check WHERE id = :id", {"id": the_hash}, HashCheck "SELECT * FROM withdraw.hash_check WHERE id = :id", {"id": the_hash}, HashCheck # type: ignore
) )
hash_check_lnurl = await db.fetchone( hash_check_lnurl = await db.fetchone(
"SELECT * FROM withdraw.hash_check WHERE lnurl_id = :id", "SELECT * FROM withdraw.hash_check WHERE lnurl_id = :id",
{"id": lnurl_id}, {"id": lnurl_id},
HashCheck, HashCheck, # type: ignore
) )
if not hash_check_lnurl: if not hash_check_lnurl:
await create_hash_check(the_hash, lnurl_id) await create_hash_check(the_hash, lnurl_id)

38
poetry.lock generated
View file

@ -768,21 +768,21 @@ files = [
[[package]] [[package]]
name = "dnspython" name = "dnspython"
version = "2.6.1" version = "2.7.0"
description = "DNS toolkit" description = "DNS toolkit"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.9"
files = [ files = [
{file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, {file = "dnspython-2.7.0-py3-none-any.whl", hash = "sha256:b4c34b7d10b51bcc3a5071e7b8dee77939f1e878477eeecc965e9835f63c6c86"},
{file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, {file = "dnspython-2.7.0.tar.gz", hash = "sha256:ce9c432eda0dc91cf618a5cedf1a4e142651196bbcd2c80e89ed5a907e5cfaf1"},
] ]
[package.extras] [package.extras]
dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "sphinx (>=7.2.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "hypercorn (>=0.16.0)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "quart-trio (>=0.11.0)", "sphinx (>=7.2.0)", "sphinx-rtd-theme (>=2.0.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"]
dnssec = ["cryptography (>=41)"] dnssec = ["cryptography (>=43)"]
doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"]
doq = ["aioquic (>=0.9.25)"] doq = ["aioquic (>=1.0.0)"]
idna = ["idna (>=3.6)"] idna = ["idna (>=3.7)"]
trio = ["trio (>=0.23)"] trio = ["trio (>=0.23)"]
wmi = ["wmi (>=1.5.1)"] wmi = ["wmi (>=1.5.1)"]
@ -1090,13 +1090,13 @@ cryptography = ">=2.5"
[[package]] [[package]]
name = "httpcore" name = "httpcore"
version = "1.0.5" version = "1.0.6"
description = "A minimal low-level HTTP client." description = "A minimal low-level HTTP client."
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
{file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"},
{file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"},
] ]
[package.dependencies] [package.dependencies]
@ -1107,7 +1107,7 @@ h11 = ">=0.13,<0.15"
asyncio = ["anyio (>=4.0,<5.0)"] asyncio = ["anyio (>=4.0,<5.0)"]
http2 = ["h2 (>=3,<5)"] http2 = ["h2 (>=3,<5)"]
socks = ["socksio (==1.*)"] socks = ["socksio (==1.*)"]
trio = ["trio (>=0.22.0,<0.26.0)"] trio = ["trio (>=0.22.0,<1.0)"]
[[package]] [[package]]
name = "httpx" name = "httpx"
@ -2246,13 +2246,13 @@ full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7
[[package]] [[package]]
name = "tomli" name = "tomli"
version = "2.0.1" version = "2.0.2"
description = "A lil' TOML parser" description = "A lil' TOML parser"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.8"
files = [ files = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"},
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"},
] ]
[[package]] [[package]]
@ -2348,13 +2348,13 @@ test = ["Cython (>=0.29.36,<0.30.0)", "aiohttp (==3.9.0b0)", "aiohttp (>=3.8.1)"
[[package]] [[package]]
name = "virtualenv" name = "virtualenv"
version = "20.26.5" version = "20.26.6"
description = "Virtual Python Environment builder" description = "Virtual Python Environment builder"
optional = false optional = false
python-versions = ">=3.7" python-versions = ">=3.7"
files = [ files = [
{file = "virtualenv-20.26.5-py3-none-any.whl", hash = "sha256:4f3ac17b81fba3ce3bd6f4ead2749a72da5929c01774948e243db9ba41df4ff6"}, {file = "virtualenv-20.26.6-py3-none-any.whl", hash = "sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2"},
{file = "virtualenv-20.26.5.tar.gz", hash = "sha256:ce489cac131aa58f4b25e321d6d186171f78e6cb13fafbf32a840cee67733ff4"}, {file = "virtualenv-20.26.6.tar.gz", hash = "sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48"},
] ]
[package.dependencies] [package.dependencies]

View file

@ -11,10 +11,7 @@
<q-responsive :ratio="1" class="q-mx-md"> <q-responsive :ratio="1" class="q-mx-md">
<lnbits-qrcode <lnbits-qrcode
:value="this.here + '/?lightning={{lnurl }}'" :value="this.here + '/?lightning={{lnurl }}'"
:options="{width: 800}" ></lnbits-qrcode>
class="rounded-borders"
>
</lnbits-qrcode>
</q-responsive> </q-responsive>
</a> </a>
</div> </div>

View file

@ -411,8 +411,6 @@
<q-responsive :ratio="1" class="q-mx-xl q-mb-md"> <q-responsive :ratio="1" class="q-mx-xl q-mb-md">
<lnbits-qrcode <lnbits-qrcode
:value="qrCodeDialog.data.url + '/?lightning=' + qrCodeDialog.data.lnurl" :value="qrCodeDialog.data.url + '/?lightning=' + qrCodeDialog.data.lnurl"
:options="{width: 800}"
class="rounded-borders"
></lnbits-qrcode> ></lnbits-qrcode>
{% raw %} {% raw %}
</q-responsive> </q-responsive>

View file

@ -12,7 +12,6 @@
<center> <center>
<lnbits-qrcode <lnbits-qrcode
:value="theurl + '/?lightning={{one}}'" :value="theurl + '/?lightning={{one}}'"
:options="{width: 150}"
></lnbits-qrcode> ></lnbits-qrcode>
</center> </center>
</td> </td>

View file

@ -11,7 +11,6 @@
<div class="lnurlw"> <div class="lnurlw">
<lnbits-qrcode <lnbits-qrcode
:value="theurl + '/?lightning={{one}}'" :value="theurl + '/?lightning={{one}}'"
:options="{width: 95, margin: 1}"
></lnbits-qrcode> ></lnbits-qrcode>
</div> </div>
</div> </div>