fix /lnurlwallet again. db.commit() and wait 3 seconds.
should finally fix https://github.com/lnbits/lnbits/issues/103
This commit is contained in:
parent
1eac618a25
commit
5ead82f57c
1 changed files with 6 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import trio # type: ignore
|
||||||
import httpx
|
import httpx
|
||||||
from os import path
|
from os import path
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
|
|
@ -122,7 +123,11 @@ async def lnurlwallet():
|
||||||
account = create_account()
|
account = create_account()
|
||||||
user = get_user(account.id)
|
user = get_user(account.id)
|
||||||
wallet = create_wallet(user_id=user.id)
|
wallet = create_wallet(user_id=user.id)
|
||||||
|
g.db.commit()
|
||||||
|
|
||||||
run_on_pseudo_request(redeem_lnurl_withdraw, wallet.id, withdraw_res, "LNbits initial funding: voucher redeem.")
|
await run_on_pseudo_request(
|
||||||
|
redeem_lnurl_withdraw, wallet.id, withdraw_res, "LNbits initial funding: voucher redeem."
|
||||||
|
)
|
||||||
|
await trio.sleep(3)
|
||||||
|
|
||||||
return redirect(url_for("core.wallet", usr=user.id, wal=wallet.id))
|
return redirect(url_for("core.wallet", usr=user.id, wal=wallet.id))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue