take extra care on check_internal()
This commit is contained in:
parent
a8e1aa3154
commit
487f082eb2
1 changed files with 7 additions and 1 deletions
|
|
@ -284,7 +284,13 @@ def delete_payment(checking_id: str) -> None:
|
||||||
|
|
||||||
def check_internal(payment_hash: str) -> Optional[str]:
|
def check_internal(payment_hash: str) -> Optional[str]:
|
||||||
with open_db() as db:
|
with open_db() as db:
|
||||||
row = db.fetchone("SELECT checking_id FROM apipayments WHERE hash = ?", (payment_hash,))
|
row = db.fetchone(
|
||||||
|
"""
|
||||||
|
SELECT checking_id FROM apipayments
|
||||||
|
WHERE hash = ? AND pending AND amount > 0
|
||||||
|
""",
|
||||||
|
(payment_hash,),
|
||||||
|
)
|
||||||
if not row:
|
if not row:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue