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
|
||||
|
||||
Reference in New Issue
Block a user