Merge branch 'release-8.6' into feat-add-aveiro-admin-ui-8.5
This commit is contained in:
commit
189aff31d7
25 changed files with 134 additions and 44 deletions
|
|
@ -25,7 +25,7 @@ case
|
|||
else 'Pending'
|
||||
end`
|
||||
|
||||
module.exports = {post, monitorPending, cancel, PENDING_INTERVAL, TRANSACTION_STATES}
|
||||
module.exports = { post, monitorPending, cancel, PENDING_INTERVAL, TRANSACTION_STATES }
|
||||
|
||||
function post (machineTx, pi) {
|
||||
logger.silly('Updating cashin tx:', machineTx)
|
||||
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -180,9 +180,9 @@ function doesTxReuseAddress (tx) {
|
|||
}
|
||||
|
||||
function getWalletScore (tx, pi) {
|
||||
pi.isWalletScoringEnabled(tx)
|
||||
return pi.isWalletScoringEnabled(tx)
|
||||
.then(isEnabled => {
|
||||
if(!isEnabled) return null
|
||||
if (!isEnabled) return null
|
||||
if (!tx.fiat || tx.fiat.isZero()) {
|
||||
return pi.rateWallet(tx.cryptoCode, tx.toAddress)
|
||||
}
|
||||
|
|
@ -223,7 +223,8 @@ function cancel (txId) {
|
|||
const updateRec = {
|
||||
error: 'Operator cancel',
|
||||
error_code: 'operatorCancel',
|
||||
operator_completed: true
|
||||
operator_completed: true,
|
||||
batch_id: null
|
||||
}
|
||||
|
||||
return Promise.resolve()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue