mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-25 19:36:15 +02:00
fix: properly check outgoing payments in phoenixd (#3355)
This commit is contained in:
@@ -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
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user