g.nursery -> current_app.nursery

This commit is contained in:
fiatjaf
2021-05-06 12:41:44 -03:00
parent d5f5c9473f
commit 2b21a4f479
3 changed files with 6 additions and 9 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ from os import path
from http import HTTPStatus
from quart import (
g,
current_app,
abort,
jsonify,
request,
@@ -154,7 +155,7 @@ async def lnurl_full_withdraw_callback():
async def pay():
await pay_invoice(wallet_id=wallet.id, payment_request=pr)
g.nursery.start_soon(pay)
current_app.nursery.start_soon(pay)
balance_notify = request.args.get("balanceNotify")
if balance_notify:
@@ -197,7 +198,7 @@ async def lnurlwallet():
user = await get_user(account.id, conn=conn)
wallet = await create_wallet(user_id=user.id, conn=conn)
g.nursery.start_soon(
current_app.nursery.start_soon(
redeem_lnurl_withdraw,
wallet.id,
request.args.get("lightning"),