From 43b48376bb778ebc9eb71e6b541c49003f89b3d5 Mon Sep 17 00:00:00 2001 From: calle <93376500+callebtc@users.noreply.github.com> Date: Thu, 9 Dec 2021 00:26:08 +0100 Subject: [PATCH] lndrest fees for fastapi (#459) --- lnbits/wallets/lndrest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnbits/wallets/lndrest.py b/lnbits/wallets/lndrest.py index e3addfd6..4f7ee526 100644 --- a/lnbits/wallets/lndrest.py +++ b/lnbits/wallets/lndrest.py @@ -117,8 +117,9 @@ class LndRestWallet(Wallet): data = r.json() payment_hash = data["payment_hash"] checking_id = payment_hash + fee_msat = int(data["payment_route"]["total_fees_msat"]) preimage = base64.b64decode(data["payment_preimage"]).hex() - return PaymentResponse(True, checking_id, 0, preimage, None) + return PaymentResponse(True, checking_id, fee_msat, preimage, None) async def get_invoice_status(self, checking_id: str) -> PaymentStatus: checking_id = checking_id.replace("_", "/")