fix opennode stupid syntax errors.
This commit is contained in:
parent
6e6ce093f0
commit
39c331a7b9
1 changed files with 3 additions and 3 deletions
|
|
@ -42,7 +42,7 @@ class OpenNodeWallet(Wallet):
|
||||||
data = r.json()["data"]
|
data = r.json()["data"]
|
||||||
checking_id = data["id"]
|
checking_id = data["id"]
|
||||||
payment_request = data["lightning_invoice"]["payreq"]
|
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:
|
def pay_invoice(self, bolt11: str) -> PaymentResponse:
|
||||||
r = httpx.post(
|
r = httpx.post(
|
||||||
|
|
@ -54,9 +54,9 @@ class OpenNodeWallet(Wallet):
|
||||||
return PaymentResponse(False, None, 0, error_message)
|
return PaymentResponse(False, None, 0, error_message)
|
||||||
|
|
||||||
data = r.json()["data"]
|
data = r.json()["data"]
|
||||||
checking_id, fee_msat = data["id"]
|
checking_id = data["id"]
|
||||||
fee_msat = data["fee"] * 1000
|
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:
|
def get_invoice_status(self, checking_id: str) -> PaymentStatus:
|
||||||
r = httpx.get(f"{self.endpoint}/v1/charge/{checking_id}", headers=self.auth_invoice)
|
r = httpx.get(f"{self.endpoint}/v1/charge/{checking_id}", headers=self.auth_invoice)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue