description_hash fix.
This commit is contained in:
parent
0de08dda0b
commit
0c7284be31
1 changed files with 5 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import hashlib
|
||||||
from flask import g, jsonify, request, url_for
|
from flask import g, jsonify, request, url_for
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from lnurl import LnurlPayResponse, LnurlPayActionResponse
|
from lnurl import LnurlPayResponse, LnurlPayActionResponse
|
||||||
|
|
@ -118,7 +119,10 @@ def api_lnurl_callback(link_id):
|
||||||
return jsonify({"status": "ERROR", "reason": "LNURL-pay not found."}), HTTPStatus.OK
|
return jsonify({"status": "ERROR", "reason": "LNURL-pay not found."}), HTTPStatus.OK
|
||||||
|
|
||||||
_, payment_request = create_invoice(
|
_, payment_request = create_invoice(
|
||||||
wallet_id=link.wallet, amount=link.amount, memo=None, description_hash=link.lnurlpay_metadata.encode("utf-8"),
|
wallet_id=link.wallet,
|
||||||
|
amount=link.amount,
|
||||||
|
memo=None,
|
||||||
|
description_hash=hashlib.sha256(link.lnurlpay_metadata.encode("utf-8")).digest(),
|
||||||
)
|
)
|
||||||
resp = LnurlPayActionResponse(pr=payment_request, success_action=None, routes=[])
|
resp = LnurlPayActionResponse(pr=payment_request, success_action=None, routes=[])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue