Revert "API key check: assert that wallet exists (#961)" (#962)

This reverts commit 0930fca7ec.
This commit is contained in:
calle
2022-09-12 18:41:27 +03:00
committed by GitHub
parent 0930fca7ec
commit 57fffa0c7f
2 changed files with 41 additions and 27 deletions
+4
View File
@@ -402,6 +402,10 @@ async def subscribe(request: Request, wallet: Wallet):
async def api_payments_sse(
request: Request, wallet: WalletTypeInfo = Depends(get_key_type)
):
if wallet is None or wallet.wallet is None:
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="Wallet does not exist."
)
return EventSourceResponse(
subscribe(request, wallet.wallet), ping=20, media_type="text/event-stream"
)