diff --git a/lib/tx.js b/lib/tx.js index 219ec5cf..92e1dea6 100644 --- a/lib/tx.js +++ b/lib/tx.js @@ -82,7 +82,7 @@ function customerHistory (customerId, thresholdDays) { FROM cash_out_txs txOut WHERE txOut.customer_id = $1 AND txOut.created > now() - interval $2 - AND (error_code IS NULL OR error_code NOT IN ('operatorCancel', 'scoreThresholdReached', 'walletScoringError', 'ciphertraceError')) + AND (error_code IS NULL OR error_code NOT IN ('operatorCancel', 'scoreThresholdReached', 'walletScoringError')) AND fiat > 0 ) ch WHERE NOT ch.expired ORDER BY ch.created` diff --git a/migrations/1716974904249-ciphertrace-error-code.js b/migrations/1716974904249-ciphertrace-error-code.js new file mode 100644 index 00000000..e845d97d --- /dev/null +++ b/migrations/1716974904249-ciphertrace-error-code.js @@ -0,0 +1,13 @@ +const db = require('./db') + +exports.up = function (next) { + let sql = [ + `UPDATE cash_out_txs SET error_code = 'walletScoringError' WHERE error_code = 'ciphertraceError'` + ] + + db.multi(sql, next) +} + +exports.down = function (next) { + next() +} diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index 74c5451f..cd40af4b 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -185,11 +185,7 @@ const DetailsRow = ({ it: tx, timezone }) => { const hasChainAnalysisError = tx => !R.isNil(tx.errorCode) && - R.includes(tx.errorCode, [ - 'scoreThresholdReached', - 'walletScoringError', - 'ciphertraceError' - ]) + R.includes(tx.errorCode, ['scoreThresholdReached', 'walletScoringError']) const errorElements = ( <> diff --git a/test/stress/queries-performance-analyzer.js b/test/stress/queries-performance-analyzer.js index c0ab7441..d235ff62 100644 --- a/test/stress/queries-performance-analyzer.js +++ b/test/stress/queries-performance-analyzer.js @@ -4,7 +4,7 @@ const _ = require('lodash/fp') const cashInTx = require('../../lib/cash-in/cash-in-tx') const { CASH_OUT_TRANSACTION_STATES, REDEEMABLE_AGE } = require('../../lib/cash-out/cash-out-helper') -const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel', 'scoreThresholdReached', 'ciphertraceError'] +const TX_PASSTHROUGH_ERROR_CODES = ['operatorCancel', 'scoreThresholdReached'] function filterTransaction () { const sql = `EXPLAIN ANALYZE