diff --git a/lib/tx.js b/lib/tx.js index 52a39906..8db3424f 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -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') + AND timedout IS false + AND error_code IS DISTINCT FROM 'operatorCancel' AND fiat > 0 ORDER BY created;`