fix: silly logs resulted in errors inserting into the DB

This commit is contained in:
siiky 2022-10-31 14:12:32 +00:00
parent f1c1ddac5d
commit f7fb1ec481

View file

@ -36,8 +36,8 @@ function selfPost (tx, pi) {
}
function post (tx, pi, fromClient = true) {
logger.silly('Updating cashout -- tx:', tx)
logger.silly('Updating cashout -- fromClient:', fromClient)
logger.silly('Updating cashout -- tx:', JSON.stringify(tx))
logger.silly('Updating cashout -- fromClient:', JSON.stringify(fromClient))
return cashOutAtomic.atomic(tx, pi, fromClient)
.then(txVector => {
const [, newTx, justAuthorized] = txVector
@ -64,7 +64,7 @@ function postProcess (txVector, justAuthorized, pi) {
fiat: newTx.fiat
})
const bills = billMath.makeChange(cassettes.cassettes, newTx.fiat)
logger.silly('Bills to dispense:', bills)
logger.silly('Bills to dispense:', JSON.stringify(bills))
if (!bills) throw httpError('Out of bills', INSUFFICIENT_FUNDS_CODE)
return bills