feat: filter by txs with fiat lt 0
This commit is contained in:
parent
2040c388b8
commit
56fc312520
2 changed files with 3 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ function batch (
|
||||||
AND ($11 is null or txs.crypto_code = $11)
|
AND ($11 is null or txs.crypto_code = $11)
|
||||||
AND ($12 is null or txs.to_address = $12)
|
AND ($12 is null or txs.to_address = $12)
|
||||||
AND ($13 is null or txs.txStatus = $13)
|
AND ($13 is null or txs.txStatus = $13)
|
||||||
|
AND (fiat > 0)
|
||||||
ORDER BY created DESC limit $4 offset $5`
|
ORDER BY created DESC limit $4 offset $5`
|
||||||
|
|
||||||
const cashOutSql = `SELECT 'cashOut' AS tx_class,
|
const cashOutSql = `SELECT 'cashOut' AS tx_class,
|
||||||
|
|
@ -90,6 +91,7 @@ function batch (
|
||||||
AND ($11 is null or txs.crypto_code = $11)
|
AND ($11 is null or txs.crypto_code = $11)
|
||||||
AND ($12 is null or txs.to_address = $12)
|
AND ($12 is null or txs.to_address = $12)
|
||||||
AND ($13 is null or txs.txStatus = $13)
|
AND ($13 is null or txs.txStatus = $13)
|
||||||
|
AND (fiat > 0)
|
||||||
ORDER BY created DESC limit $4 offset $5`
|
ORDER BY created DESC limit $4 offset $5`
|
||||||
|
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,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 (timedout = true OR error_code != 'operatorCancel')
|
AND (timedout = true OR error_code != 'operatorCancel' OR fiat > 0)
|
||||||
ORDER BY created;`
|
ORDER BY created;`
|
||||||
|
|
||||||
const days = _.isNil(thresholdDays) ? 0 : thresholdDays
|
const days = _.isNil(thresholdDays) ? 0 : thresholdDays
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue