Fix/duplicate payments (#973)

* check if wallet exists

* check wallet existence in key check

* fix duplicate removal
This commit is contained in:
calle
2022-09-18 16:27:03 +03:00
committed by GitHub
parent 232d50baaa
commit e7a6e86e7a
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -452,6 +452,15 @@ async def delete_payment(checking_id: str, conn: Optional[Connection] = None) ->
)
async def delete_wallet_payment(
checking_id: str, wallet_id: str, conn: Optional[Connection] = None
) -> None:
await (conn or db).execute(
"DELETE FROM apipayments WHERE checking_id = ? AND wallet = ?",
(checking_id, wallet_id),
)
async def check_internal(
payment_hash: str, conn: Optional[Connection] = None
) -> Optional[str]: