fix: properly check outgoing payments in phoenixd (#3355)
This commit is contained in:
parent
36fc911b88
commit
c312d70e63
2 changed files with 3 additions and 7 deletions
|
|
@ -226,9 +226,7 @@ class PhoenixdWallet(Wallet):
|
||||||
)
|
)
|
||||||
|
|
||||||
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
|
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
|
||||||
r = await self.client.get(
|
r = await self.client.get(f"/payments/incoming/{checking_id}")
|
||||||
f"/payments/incoming/{checking_id}?all=true&limit=1000"
|
|
||||||
)
|
|
||||||
if r.is_error:
|
if r.is_error:
|
||||||
if r.status_code == 404:
|
if r.status_code == 404:
|
||||||
# invoice does not exist in phoenixd, so it was never paid
|
# invoice does not exist in phoenixd, so it was never paid
|
||||||
|
|
@ -260,9 +258,7 @@ class PhoenixdWallet(Wallet):
|
||||||
return PaymentPendingStatus()
|
return PaymentPendingStatus()
|
||||||
|
|
||||||
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
|
||||||
r = await self.client.get(
|
r = await self.client.get(f"/payments/outgoingbyhash/{checking_id}")
|
||||||
f"/payments/outgoing/{checking_id}?all=true&limit=1000"
|
|
||||||
)
|
|
||||||
if r.is_error:
|
if r.is_error:
|
||||||
if r.status_code == 404:
|
if r.status_code == 404:
|
||||||
# payment does not exist in phoenixd, so it was never paid
|
# payment does not exist in phoenixd, so it was never paid
|
||||||
|
|
|
||||||
|
|
@ -2474,7 +2474,7 @@
|
||||||
},
|
},
|
||||||
"phoenixd": {
|
"phoenixd": {
|
||||||
"get_payment_status_endpoint": {
|
"get_payment_status_endpoint": {
|
||||||
"uri": "/payments/outgoing/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
|
"uri": "/payments/outgoingbyhash/e35526a43d04e985594c0dfab848814f524b1c786598ec9a63beddb2d726ac96",
|
||||||
"headers": {
|
"headers": {
|
||||||
"Authorization": "Basic OmYxNzFiYTAyMmE3NjRlNjc5ZWVmOTUwYjIxZmIxYzA0ZjE3MWJhMDIyYTc2NGU2NzllZWY5NTBiMjFmYjFjMDQ=",
|
"Authorization": "Basic OmYxNzFiYTAyMmE3NjRlNjc5ZWVmOTUwYjIxZmIxYzA0ZjE3MWJhMDIyYTc2NGU2NzllZWY5NTBiMjFmYjFjMDQ=",
|
||||||
"User-Agent": "LNbits/Tests"
|
"User-Agent": "LNbits/Tests"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue