fix validation bug in admin

This commit is contained in:
Josh Harvey 2017-05-04 01:22:04 +03:00
parent 9c0d21f66d
commit 1488a60a60
4 changed files with 29 additions and 16 deletions

View file

@ -53,9 +53,7 @@ function post (machineTx, pi) {
return postProcess(txVector, pi)
.then(_.tap(pp('DEBUG99')))
.then(changes => update(updatedTx, changes))
.then(_.tap(pp('DEBUG100')))
.then(tx => _.set('bills', machineTx.bills, tx))
.then(_.tap(pp('DEBUG101')))
})
}
@ -86,9 +84,6 @@ function ensureRatchet (oldField, newField, fieldKey) {
return true
}
const tt = r => Object.prototype.toString.call(r)
console.log('DEBUG100: %j', [tt(oldField), tt(newField)])
if (oldField.toString() === newField.toString()) return true
logger.error('This field [%s] should never change', fieldKey)
@ -218,7 +213,7 @@ function registerTrades (pi, newBills) {
function logAction (rec, tx) {
const action = {
tx_id: tx.id,
action: tx.sendCompleted ? 'sendCoins' : 'sendCoinsError',
action: rec.sendConfirmed ? 'sendCoins' : 'sendCoinsError',
error: rec.error,
error_code: rec.errorCode,
tx_hash: rec.txHash