From 364ab472d278efbede19b4380c236dbb3cdb870f Mon Sep 17 00:00:00 2001 From: Arc <33088785+arcbtc@users.noreply.github.com> Date: Thu, 16 Jan 2020 12:37:33 +0000 Subject: [PATCH] Update opennode.py --- lnbits/wallets/opennode.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lnbits/wallets/opennode.py b/lnbits/wallets/opennode.py index a87009801..aa02f44e1 100644 --- a/lnbits/wallets/opennode.py +++ b/lnbits/wallets/opennode.py @@ -1,6 +1,6 @@ from requests import Response, get, post from flask import jsonify -from .base import InvoiceResponse, TxStatus, Wallet +from .base import InvoiceResponse, TxStatus, Wallet, PaymentResponse import json class OpenNodeWallet(Wallet): @@ -24,11 +24,11 @@ class OpenNodeWallet(Wallet): return InvoiceResponse(r, payment_hash, payment_request) - def pay_invoice(self, bolt11: str) -> Response: - return post( - url=f"{self.endpoint}/v2/withdrawals", headers=self.auth_admin, json={"type": "ln", "address": bolt11} - ) + def pay_invoice(self, bolt11: str) -> PaymentResponse: + r = post(url=f"{self.endpoint}/v2/withdrawals", headers=self.auth_admin, json={"type": "ln","address": bolt11}) + + return PaymentResponse(r) def get_invoice_status(self, payment_hash: str) -> TxStatus: