fix: cash-out skips wallet rating in most status
This commit is contained in:
parent
3352a4d335
commit
16554951a1
2 changed files with 11 additions and 10 deletions
|
|
@ -25,8 +25,8 @@ case
|
|||
else 'Pending'
|
||||
end`
|
||||
|
||||
module.exports = {post, monitorPending, cancel, PENDING_INTERVAL, TRANSACTION_STATES}
|
||||
|
||||
module.exports = { post, monitorPending, cancel, PENDING_INTERVAL, TRANSACTION_STATES }
|
||||
// TODO: cash-in wallet score is not recorded in db
|
||||
function post (machineTx, pi) {
|
||||
logger.silly('Updating cashin tx:', machineTx)
|
||||
return cashInAtomic.atomic(machineTx, pi)
|
||||
|
|
@ -51,12 +51,12 @@ function post (machineTx, pi) {
|
|||
}
|
||||
return postProcess(r, pi, blacklisted, addressReuse, walletScore)
|
||||
})
|
||||
.then(changes => _.set('walletScore', _.isNil(walletScore) ? null : walletScore.score, changes))
|
||||
.then(changes => cashInLow.update(db, updatedTx, changes))
|
||||
.then(tx => _.set('bills', machineTx.bills, tx))
|
||||
.then(tx => _.set('blacklisted', blacklisted, tx))
|
||||
.then(tx => _.set('addressReuse', addressReuse, tx))
|
||||
.then(tx => _.set('validWalletScore', _.isNil(walletScore) ? true : walletScore.isValid, tx))
|
||||
.then(tx => _.set('walletScore', _.isNil(walletScore) ? null : walletScore.score, tx))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue