diff --git a/lnbits/extensions/copilot/lnurl.py b/lnbits/extensions/copilot/lnurl.py index 0ca9b3b17..d3c37ab95 100644 --- a/lnbits/extensions/copilot/lnurl.py +++ b/lnbits/extensions/copilot/lnurl.py @@ -71,13 +71,13 @@ async def lnurl_callback(cp_id): wallet_id=cp.wallet, amount=int(amount_received / 1000), memo=cp.lnurl_title, - webhook=url_for( + webhook=str(url_for( "copilot.api_copilot_hooker", copilot_id=cp_id, amount=int(amount_received / 1000), comment=comment, - _external=False, - ), + _external=True, + ))[:-1], description_hash=hashlib.sha256( ( LnurlPayMetadata(json.dumps([["text/plain", str(cp.lnurl_title)]])) @@ -92,12 +92,12 @@ async def lnurl_callback(cp_id): routes=[], ) print( - url_for( + str(url_for( "copilot.api_copilot_hooker", copilot_id=cp_id, amount=int(amount_received / 1000), comment=comment, - _external=False, - ) + _external=True, + ))[:-1] ) return jsonify(resp.dict()) diff --git a/lnbits/extensions/copilot/templates/copilot/compose.html b/lnbits/extensions/copilot/templates/copilot/compose.html index 8da66be34..a841a8a5d 100644 --- a/lnbits/extensions/copilot/templates/copilot/compose.html +++ b/lnbits/extensions/copilot/templates/copilot/compose.html @@ -239,6 +239,7 @@ if (res[1].substring(0, 3) == 'htt') { document.getElementById('iframe_main').src = res[1] } + console.log(res[2]) if (res[2] != 'none') { this.showNotif(res[2]) }