fix: more return types

This commit is contained in:
Stefan Stammberger
2021-09-11 11:02:48 +02:00
parent d8d8c6b454
commit 63d0242685
6 changed files with 34 additions and 17 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
import json
import asyncio
from fastapi.exceptions import HTTPException
import httpx
from os import getenv
from http import HTTPStatus
@@ -133,7 +134,7 @@ class LNPayWallet(Wallet):
or "event" not in data
or data["event"].get("name") != "wallet_receive"
):
return "", HTTPStatus.NO_CONTENT
raise HTTPException(status_code=HTTPStatus.NO_CONTENT)
lntx_id = data["data"]["wtx"]["lnTx"]["id"]
async with httpx.AsyncClient() as client:
@@ -145,4 +146,5 @@ class LNPayWallet(Wallet):
if data["settled"]:
await self.queue.put(lntx_id)
return "", HTTPStatus.NO_CONTENT
raise HTTPException(status_code=HTTPStatus.NO_CONTENT)