fix: properly check outgoing payments in phoenixd (#3355)

This commit is contained in:
dni ⚡
2025-09-12 11:26:32 +02:00
committed by GitHub
parent 36fc911b88
commit c312d70e63
2 changed files with 3 additions and 7 deletions

View File

@@ -226,9 +226,7 @@ class PhoenixdWallet(Wallet):
)
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
r = await self.client.get(
f"/payments/incoming/{checking_id}?all=true&limit=1000"
)
r = await self.client.get(f"/payments/incoming/{checking_id}")
if r.is_error:
if r.status_code == 404:
# invoice does not exist in phoenixd, so it was never paid
@@ -260,9 +258,7 @@ class PhoenixdWallet(Wallet):
return PaymentPendingStatus()
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
r = await self.client.get(
f"/payments/outgoing/{checking_id}?all=true&limit=1000"
)
r = await self.client.get(f"/payments/outgoingbyhash/{checking_id}")
if r.is_error:
if r.status_code == 404:
# payment does not exist in phoenixd, so it was never paid

View File

@@ -2474,7 +2474,7 @@
},
"phoenixd": {
"get_payment_status_endpoint": {
"uri": "/payments/outgoing/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"uri": "/payments/outgoingbyhash/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
"headers": {
"Authorization": "Basic OmYxNzFiYTAyMmE3NjRlNjc5ZWVmOTUwYjIxZmIxYzA0ZjE3MWJhMDIyYTc2NGU2NzllZWY5NTBiMjFmYjFjMDQ=",
"User-Agent": "LNbits/Tests"