Browse Source

fix opennode stupid syntax errors.

atmext
fiatjaf 4 years ago
parent
commit
39c331a7b9
  1. 6
      lnbits/wallets/opennode.py

6
lnbits/wallets/opennode.py

@ -42,7 +42,7 @@ class OpenNodeWallet(Wallet):
data = r.json()["data"]
checking_id = data["id"]
payment_request = data["lightning_invoice"]["payreq"]
return InvoiceResponse(True, checking_id, payment_request, error_message)
return InvoiceResponse(True, checking_id, payment_request, None)
def pay_invoice(self, bolt11: str) -> PaymentResponse:
r = httpx.post(
@ -54,9 +54,9 @@ class OpenNodeWallet(Wallet):
return PaymentResponse(False, None, 0, error_message)
data = r.json()["data"]
checking_id, fee_msat = data["id"]
checking_id = data["id"]
fee_msat = data["fee"] * 1000
return PaymentResponse(True, checking_id, fee_msat, error_message)
return PaymentResponse(True, checking_id, fee_msat, None)
def get_invoice_status(self, checking_id: str) -> PaymentStatus:
r = httpx.get(f"{self.endpoint}/v1/charge/{checking_id}", headers=self.auth_invoice)

Loading…
Cancel
Save