Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45a0657828 | ||
|
|
1c4414d311 |
@@ -302,7 +302,7 @@ async def melt_coins(
|
|||||||
await ledger._set_proofs_pending(proofs)
|
await ledger._set_proofs_pending(proofs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ledger._verify_proofs(proofs)
|
await ledger._verify_proofs(proofs)
|
||||||
|
|
||||||
total_provided = sum([p["amount"] for p in proofs])
|
total_provided = sum([p["amount"] for p in proofs])
|
||||||
invoice_obj = bolt11.decode(invoice)
|
invoice_obj = bolt11.decode(invoice)
|
||||||
@@ -343,13 +343,13 @@ async def melt_coins(
|
|||||||
else:
|
else:
|
||||||
logger.debug(f"Cashu: Payment failed for {invoice_obj.payment_hash}")
|
logger.debug(f"Cashu: Payment failed for {invoice_obj.payment_hash}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug(f"Cashu: Exception for {invoice_obj.payment_hash}: {str(e)}")
|
logger.debug(f"Cashu: Exception: {str(e)}")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.BAD_REQUEST,
|
status_code=HTTPStatus.BAD_REQUEST,
|
||||||
detail=f"Cashu: {str(e)}",
|
detail=f"Cashu: {str(e)}",
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
logger.debug(f"Cashu: Unset pending for {invoice_obj.payment_hash}")
|
logger.debug(f"Cashu: Unset pending")
|
||||||
# delete proofs from pending list
|
# delete proofs from pending list
|
||||||
await ledger._unset_proofs_pending(proofs)
|
await ledger._unset_proofs_pending(proofs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user