From 3645e0ac38420754d942b47984f0e938318b4593 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 29 Aug 2020 13:04:01 -0300 Subject: [PATCH] fix: lnpay invoices with description_hash. --- lnbits/wallets/lnpay.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lnbits/wallets/lnpay.py b/lnbits/wallets/lnpay.py index 553661e..e77817e 100644 --- a/lnbits/wallets/lnpay.py +++ b/lnbits/wallets/lnpay.py @@ -1,4 +1,3 @@ -import base64 from os import getenv from requests import get, post @@ -20,11 +19,7 @@ class LNPayWallet(Wallet): r = post( url=f"{self.endpoint}/user/wallet/{self.auth_invoice}/invoice", headers=self.auth_api, - json={ - "num_satoshis": f"{amount}", - "memo": memo, - "description_hash": base64.b64encode(description_hash).decode("ascii"), - }, + json={"num_satoshis": f"{amount}", "memo": memo, "description_hash": description_hash.hex(),}, ) ok, checking_id, payment_request, error_message = r.status_code == 201, None, None, r.text