fix lamassu-cancel

This commit is contained in:
Josh Harvey 2017-05-20 16:03:04 +03:00
parent 8cdad0bc15
commit b28c99aabb
3 changed files with 29 additions and 13 deletions

View file

@ -215,8 +215,6 @@ function preProcess (oldTx, newTx, pi) {
return Promise.resolve(updateStatus(oldTx, newTx))
.then(updatedTx => {
if (!oldTx) return updatedTx
if (updatedTx.status !== oldTx.status) {
const isZeroConf = pi.isZeroConf(updatedTx)
if (wasJustAuthorized(oldTx, updatedTx, isZeroConf)) pi.sell(updatedTx)
@ -351,8 +349,8 @@ function monitorUnnotified (settings) {
function cancel (txId) {
const updateRec = {
'dispense_time': 'now()^',
error: 'Operator cancel',
error_code: 'operatorCancel',
dispense: true
}