fix: set new risk score errors as passable error codes
This commit is contained in:
parent
4d520f2c24
commit
03ae3b74e7
3 changed files with 3 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ const sms = require('./sms')
|
||||||
const settingsLoader = require('./new-settings-loader')
|
const settingsLoader = require('./new-settings-loader')
|
||||||
const logger = require('./logger')
|
const logger = require('./logger')
|
||||||
|
|
||||||
const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel']
|
const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel', 'scoreThresholdReached', 'ciphertraceError']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add new customer
|
* Add new customer
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ function cancel (txId) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function customerHistory (customerId, thresholdDays) {
|
function customerHistory (customerId, thresholdDays) {
|
||||||
const sql = `SELECT * FROM (
|
const sql = `SELECT * FROM (
|
||||||
SELECT txIn.id, txIn.created, txIn.fiat, 'cashIn' AS direction,
|
SELECT txIn.id, txIn.created, txIn.fiat, 'cashIn' AS direction,
|
||||||
|
|
@ -84,7 +83,7 @@ function customerHistory (customerId, thresholdDays) {
|
||||||
FROM cash_out_txs txOut
|
FROM cash_out_txs txOut
|
||||||
WHERE txOut.customer_id = $1
|
WHERE txOut.customer_id = $1
|
||||||
AND txOut.created > now() - interval $2
|
AND txOut.created > now() - interval $2
|
||||||
AND error_code IS DISTINCT FROM 'operatorCancel'
|
AND error_code NOT IN ('operatorCancel', 'scoreThresholdReached', 'ciphertraceError')
|
||||||
AND fiat > 0
|
AND fiat > 0
|
||||||
) ch WHERE NOT ch.expired ORDER BY ch.created`
|
) ch WHERE NOT ch.expired ORDER BY ch.created`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ const _ = require('lodash/fp')
|
||||||
const cashInTx = require('../../lib/cash-in/cash-in-tx')
|
const cashInTx = require('../../lib/cash-in/cash-in-tx')
|
||||||
const { CASH_OUT_TRANSACTION_STATES, REDEEMABLE_AGE } = require('../../lib/cash-out/cash-out-helper')
|
const { CASH_OUT_TRANSACTION_STATES, REDEEMABLE_AGE } = require('../../lib/cash-out/cash-out-helper')
|
||||||
|
|
||||||
const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel']
|
const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel', 'scoreThresholdReached', 'ciphertraceError']
|
||||||
|
|
||||||
function filterTransaction () {
|
function filterTransaction () {
|
||||||
const sql = `EXPLAIN ANALYZE
|
const sql = `EXPLAIN ANALYZE
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue