fix no-exchange issue

This commit is contained in:
Josh Harvey 2017-05-10 23:05:19 +03:00
parent a60a4f8793
commit f23d17b357
7 changed files with 29 additions and 17 deletions

View file

@ -250,7 +250,7 @@ function postProcess (txVector, pi) {
return pi.buildAvailableCassettes(newTx.id)
.then(cassettes => {
const bills = billMath.makeChange(cassettes.cassettes, newTx.fiat)
console.log('DEBUG130: %j', cassettes.cassettes)
if (!bills) throw httpError('Out of bills', INSUFFICIENT_FUNDS_CODE)
return bills
})