fix: add missing return statement

This commit is contained in:
José Oliveira 2023-05-03 16:20:43 +01:00
parent 16554951a1
commit 0a62589d1e

View file

@ -26,7 +26,7 @@ case
end` 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) { function post (machineTx, pi) {
logger.silly('Updating cashin tx:', machineTx) logger.silly('Updating cashin tx:', machineTx)
return cashInAtomic.atomic(machineTx, pi) return cashInAtomic.atomic(machineTx, pi)
@ -180,9 +180,9 @@ function doesTxReuseAddress (tx) {
} }
function getWalletScore (tx, pi) { function getWalletScore (tx, pi) {
pi.isWalletScoringEnabled(tx) return pi.isWalletScoringEnabled(tx)
.then(isEnabled => { .then(isEnabled => {
if(!isEnabled) return null if (!isEnabled) return null
if (!tx.fiat || tx.fiat.isZero()) { if (!tx.fiat || tx.fiat.isZero()) {
return pi.rateWallet(tx.cryptoCode, tx.toAddress) return pi.rateWallet(tx.cryptoCode, tx.toAddress)
} }