fix: add fiat filter inside a single AND clause

This commit is contained in:
José Oliveira 2021-07-23 18:31:05 +01:00 committed by Josh Harvey
parent 1ff386826f
commit 650ab5f809

View file

@ -75,7 +75,8 @@ function customerHistory (customerId, thresholdDays) {
FROM cash_out_txs txOut
WHERE txOut.customer_id = $1
AND txOut.created > now() - interval $2
AND (timedout = true OR error_code != 'operatorCancel' OR fiat > 0)
AND (timedout = true OR error_code != 'operatorCancel')
AND fiat > 0
ORDER BY created;`
const days = _.isNil(thresholdDays) ? 0 : thresholdDays