fix: cash-out transaction history fetching when error_code value was null

This commit is contained in:
Sérgio Salgado 2022-12-06 01:18:44 +00:00
parent f6550c9921
commit 17e3cc11c7

View file

@ -83,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 NOT IN ('operatorCancel', 'scoreThresholdReached', 'ciphertraceError') AND (error_code IS NULL OR 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`