From e3fd6b4ff1f19b750b852a0bb0814cd259db948c Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Wed, 5 Feb 2020 13:04:43 +0000 Subject: [PATCH] Update views_api.py --- lnbits/extensions/withdraw/views_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnbits/extensions/withdraw/views_api.py b/lnbits/extensions/withdraw/views_api.py index ea1ec0c9..b86b78b0 100644 --- a/lnbits/extensions/withdraw/views_api.py +++ b/lnbits/extensions/withdraw/views_api.py @@ -110,7 +110,9 @@ def api_lnurlwithdraw(rand): header = {"Content-Type": "application/json", "Grpc-Metadata-macaroon": str(user_fau[0][4])} data = {"payment_request": pr} - r = requests.post(url="https://lnbits.com/api/v1/channels/transactions", headers=header, data=json.dumps(data)) + #this works locally but not being served over host, bug, needs fixing + #r = requests.post(url="https://lnbits.com/api/v1/channels/transactions", headers=header, data=json.dumps(data)) + r = requests.post(url=url_for("api_transactions", _external=True), headers=header, data=json.dumps(data)) r_json = r.json() if "ERROR" in r_json: