Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] hash check #54

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,20 @@ async def create_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(
"SELECT * FROM withdraw.hash_check WHERE id = :id", {"id": the_hash}, HashCheck
"""
SELECT id as hash, lnurl_id as lnurl
FROM withdraw.hash_check WHERE id = :id
""",
{"id": the_hash},
HashCheck,
)
hash_check_lnurl = await db.fetchone(
"SELECT * FROM withdraw.hash_check WHERE lnurl_id = :id",
"""
SELECT id as hash, lnurl_id as lnurl
FROM withdraw.hash_check WHERE lnurl_id = :id
""",
{"id": lnurl_id},
HashCheck,
)
Expand Down