mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 20:42:32 +02:00
fixed payment threshold webhook
This commit is contained in:
@@ -71,13 +71,13 @@ async def lnurl_callback(cp_id):
|
|||||||
wallet_id=cp.wallet,
|
wallet_id=cp.wallet,
|
||||||
amount=int(amount_received / 1000),
|
amount=int(amount_received / 1000),
|
||||||
memo=cp.lnurl_title,
|
memo=cp.lnurl_title,
|
||||||
webhook=url_for(
|
webhook=str(url_for(
|
||||||
"copilot.api_copilot_hooker",
|
"copilot.api_copilot_hooker",
|
||||||
copilot_id=cp_id,
|
copilot_id=cp_id,
|
||||||
amount=int(amount_received / 1000),
|
amount=int(amount_received / 1000),
|
||||||
comment=comment,
|
comment=comment,
|
||||||
_external=False,
|
_external=True,
|
||||||
),
|
))[:-1],
|
||||||
description_hash=hashlib.sha256(
|
description_hash=hashlib.sha256(
|
||||||
(
|
(
|
||||||
LnurlPayMetadata(json.dumps([["text/plain", str(cp.lnurl_title)]]))
|
LnurlPayMetadata(json.dumps([["text/plain", str(cp.lnurl_title)]]))
|
||||||
@@ -92,12 +92,12 @@ async def lnurl_callback(cp_id):
|
|||||||
routes=[],
|
routes=[],
|
||||||
)
|
)
|
||||||
print(
|
print(
|
||||||
url_for(
|
str(url_for(
|
||||||
"copilot.api_copilot_hooker",
|
"copilot.api_copilot_hooker",
|
||||||
copilot_id=cp_id,
|
copilot_id=cp_id,
|
||||||
amount=int(amount_received / 1000),
|
amount=int(amount_received / 1000),
|
||||||
comment=comment,
|
comment=comment,
|
||||||
_external=False,
|
_external=True,
|
||||||
)
|
))[:-1]
|
||||||
)
|
)
|
||||||
return jsonify(resp.dict())
|
return jsonify(resp.dict())
|
||||||
|
@@ -239,6 +239,7 @@
|
|||||||
if (res[1].substring(0, 3) == 'htt') {
|
if (res[1].substring(0, 3) == 'htt') {
|
||||||
document.getElementById('iframe_main').src = res[1]
|
document.getElementById('iframe_main').src = res[1]
|
||||||
}
|
}
|
||||||
|
console.log(res[2])
|
||||||
if (res[2] != 'none') {
|
if (res[2] != 'none') {
|
||||||
this.showNotif(res[2])
|
this.showNotif(res[2])
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user