Skip to content

Commit

Permalink
dispense error hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
lidio601 authored and joshmh committed Aug 24, 2018
1 parent e95e3e0 commit 91ea647
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/brain.js
Original file line number Diff line number Diff line change
Expand Up @@ -2602,12 +2602,17 @@ Brain.prototype._physicalDispense = function _physicalDispense () {
// update tx and keep track of the
// dispensed bills
// and the error code (if any)
this.fastUpdateTx({
bills: this.tx.bills,
error: _.join(' ', _.reject(_.isEmpty, [result.name, result.message, result.err, result.error])),
errorCode: result.err,
dispenseConfirmed
})
this.fastUpdateTx(_.extend(
{
bills: this.tx.bills,
dispenseConfirmed,
},
!dispenseConfirmed
? {
error: _.join(' ', _.reject(_.isEmpty, [result.name, result.message, result.err, result.error])),
errorCode: result.err,
}
: {}))

if (!dispenseConfirmed) {
console.log('dispense error5', result)
Expand Down

0 comments on commit 91ea647

Please sign in to comment.