fix: silly logs resulted in errors inserting into the DB
This commit is contained in:
parent
f1c1ddac5d
commit
f7fb1ec481
1 changed files with 3 additions and 3 deletions
|
|
@ -36,8 +36,8 @@ function selfPost (tx, pi) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function post (tx, pi, fromClient = true) {
|
function post (tx, pi, fromClient = true) {
|
||||||
logger.silly('Updating cashout -- tx:', tx)
|
logger.silly('Updating cashout -- tx:', JSON.stringify(tx))
|
||||||
logger.silly('Updating cashout -- fromClient:', fromClient)
|
logger.silly('Updating cashout -- fromClient:', JSON.stringify(fromClient))
|
||||||
return cashOutAtomic.atomic(tx, pi, fromClient)
|
return cashOutAtomic.atomic(tx, pi, fromClient)
|
||||||
.then(txVector => {
|
.then(txVector => {
|
||||||
const [, newTx, justAuthorized] = txVector
|
const [, newTx, justAuthorized] = txVector
|
||||||
|
|
@ -64,7 +64,7 @@ function postProcess (txVector, justAuthorized, pi) {
|
||||||
fiat: newTx.fiat
|
fiat: newTx.fiat
|
||||||
})
|
})
|
||||||
const bills = billMath.makeChange(cassettes.cassettes, 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)
|
if (!bills) throw httpError('Out of bills', INSUFFICIENT_FUNDS_CODE)
|
||||||
return bills
|
return bills
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue