diff --git a/lib/tx.js b/lib/tx.js index 063aa45f..f42f9b61 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -74,7 +74,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' ORDER BY created;` const days = _.isNil(thresholdDays) ? 0 : thresholdDays