diff --git a/lib/new-admin/services/transactions.js b/lib/new-admin/services/transactions.js index 6a64b148..3fc65671 100644 --- a/lib/new-admin/services/transactions.js +++ b/lib/new-admin/services/transactions.js @@ -62,6 +62,7 @@ function batch ( AND ($11 is null or txs.crypto_code = $11) AND ($12 is null or txs.to_address = $12) AND ($13 is null or txs.txStatus = $13) + AND (fiat > 0) ORDER BY created DESC limit $4 offset $5` const cashOutSql = `SELECT 'cashOut' AS tx_class, @@ -90,6 +91,7 @@ function batch ( AND ($11 is null or txs.crypto_code = $11) AND ($12 is null or txs.to_address = $12) AND ($13 is null or txs.txStatus = $13) + AND (fiat > 0) ORDER BY created DESC limit $4 offset $5` return Promise.all([ diff --git a/lib/tx.js b/lib/tx.js index dd5283d7..ca2e7333 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -74,7 +74,7 @@ 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 = true OR error_code != 'operatorCancel' OR fiat > 0) ORDER BY created;` const days = _.isNil(thresholdDays) ? 0 : thresholdDays