cashu: add more logging
This commit is contained in:
parent
4e8014a177
commit
090cf414e7
1 changed files with 7 additions and 1 deletions
|
|
@ -299,14 +299,20 @@ async def melt_coins(
|
||||||
cashu.wallet, invoice_obj.payment_hash
|
cashu.wallet, invoice_obj.payment_hash
|
||||||
)
|
)
|
||||||
if status.paid == True:
|
if status.paid == True:
|
||||||
logger.debug("Cashu: Payment successful, invalidating proofs")
|
logger.debug(
|
||||||
|
f"Cashu: Payment successful, invalidating proofs for {invoice_obj.payment_hash}"
|
||||||
|
)
|
||||||
await ledger._invalidate_proofs(proofs)
|
await ledger._invalidate_proofs(proofs)
|
||||||
|
else:
|
||||||
|
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}: {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}: {e}")
|
||||||
# delete proofs from pending list
|
# delete proofs from pending list
|
||||||
await ledger._unset_proofs_pending(proofs)
|
await ledger._unset_proofs_pending(proofs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue