|
|
@ -37,7 +37,12 @@ class LndRestWallet(Wallet): |
|
|
|
else: |
|
|
|
data["memo"] = memo or "" |
|
|
|
|
|
|
|
r = httpx.post(url=f"{self.endpoint}/v1/invoices", headers=self.auth_invoice, verify=self.auth_cert, json=data,) |
|
|
|
r = httpx.post( |
|
|
|
url=f"{self.endpoint}/v1/invoices", |
|
|
|
headers=self.auth_invoice, |
|
|
|
verify=self.auth_cert, |
|
|
|
json=data, |
|
|
|
) |
|
|
|
|
|
|
|
if r.is_error: |
|
|
|
error_message = r.text |
|
|
@ -78,7 +83,9 @@ class LndRestWallet(Wallet): |
|
|
|
def get_invoice_status(self, checking_id: str) -> PaymentStatus: |
|
|
|
checking_id = checking_id.replace("_", "/") |
|
|
|
r = httpx.get( |
|
|
|
url=f"{self.endpoint}/v1/invoice/{checking_id}", headers=self.auth_invoice, verify=self.auth_cert, |
|
|
|
url=f"{self.endpoint}/v1/invoice/{checking_id}", |
|
|
|
headers=self.auth_invoice, |
|
|
|
verify=self.auth_cert, |
|
|
|
) |
|
|
|
|
|
|
|
if r.is_error or not r.json().get("settled"): |
|
|
|