refactor: don't send transactions' expired field

This commit is contained in:
siiky 2024-11-28 11:30:35 +00:00
parent ac35e5c006
commit 255ef6baf7

View file

@ -69,7 +69,7 @@ function cancel (txId) {
} }
function customerHistory (customerId, thresholdDays) { function customerHistory (customerId, thresholdDays) {
const sql = `SELECT * FROM ( const sql = `SELECT ch.id, ch.created, ch.fiat, ch.direction FROM (
SELECT txIn.id, txIn.created, txIn.fiat, 'cashIn' AS direction, SELECT txIn.id, txIn.created, txIn.fiat, 'cashIn' AS direction,
((NOT txIn.send_confirmed) AND (txIn.created <= now() - interval $3)) AS expired ((NOT txIn.send_confirmed) AND (txIn.created <= now() - interval $3)) AS expired
FROM cash_in_txs txIn FROM cash_in_txs txIn