Tests: hold invoice tests pending during payment (#1839)
* tests: hold invoice tests pending during payment * sigh... * ok * hash preimage * preimage_hash == payment_hash * should error * check that payment is gone * cancel task while in-flight * lnbits endpoing return error * return error * add both options * fix list * respond to error * return false if payment status errors * outgoing invoice should be deleted after one status check * test api_payments_create error
This commit is contained in:
@@ -99,7 +99,7 @@ class LNbitsWallet(Wallet):
|
||||
|
||||
if r.is_error:
|
||||
error_message = r.json()["detail"]
|
||||
return PaymentResponse(None, None, None, None, error_message)
|
||||
return PaymentResponse(False, None, None, None, error_message)
|
||||
else:
|
||||
data = r.json()
|
||||
checking_id = data["payment_hash"]
|
||||
@@ -124,7 +124,7 @@ class LNbitsWallet(Wallet):
|
||||
r = await self.client.get(url=f"/api/v1/payments/{checking_id}")
|
||||
|
||||
if r.is_error:
|
||||
return PaymentStatus(None)
|
||||
return PaymentStatus(False)
|
||||
data = r.json()
|
||||
if "paid" not in data and "details" not in data:
|
||||
return PaymentStatus(None)
|
||||
|
||||
Reference in New Issue
Block a user