From 1ff386826fa453093629ba73f6233b7e209c01ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Fri, 23 Jul 2021 18:11:07 +0100 Subject: [PATCH] fix: add fiat filter to cash in txs --- lib/tx.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tx.js b/lib/tx.js index ca2e7333..b35fccdd 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -69,6 +69,7 @@ function customerHistory (customerId, thresholdDays) { FROM cash_in_txs txIn WHERE txIn.customer_id = $1 AND txIn.created > now() - interval $2 + AND fiat > 0 UNION SELECT txOut.id, txOut.created, txOut.fiat, 'cashOut' AS direction FROM cash_out_txs txOut