fix: lnpay invoices with description_hash.
This commit is contained in:
parent
0c7284be31
commit
3645e0ac38
1 changed files with 1 additions and 6 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
import base64
|
|
||||||
from os import getenv
|
from os import getenv
|
||||||
from requests import get, post
|
from requests import get, post
|
||||||
|
|
||||||
|
|
@ -20,11 +19,7 @@ class LNPayWallet(Wallet):
|
||||||
r = post(
|
r = post(
|
||||||
url=f"{self.endpoint}/user/wallet/{self.auth_invoice}/invoice",
|
url=f"{self.endpoint}/user/wallet/{self.auth_invoice}/invoice",
|
||||||
headers=self.auth_api,
|
headers=self.auth_api,
|
||||||
json={
|
json={"num_satoshis": f"{amount}", "memo": memo, "description_hash": description_hash.hex(),},
|
||||||
"num_satoshis": f"{amount}",
|
|
||||||
"memo": memo,
|
|
||||||
"description_hash": base64.b64encode(description_hash).decode("ascii"),
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
ok, checking_id, payment_request, error_message = r.status_code == 201, None, None, r.text
|
ok, checking_id, payment_request, error_message = r.status_code == 201, None, None, r.text
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue