diff --git a/lib/cash-in/cash-in-tx.js b/lib/cash-in/cash-in-tx.js index 19363b04..f76c6fab 100644 --- a/lib/cash-in/cash-in-tx.js +++ b/lib/cash-in/cash-in-tx.js @@ -19,7 +19,7 @@ const WALLET_SCORE_THRESHOLD = 10 const TRANSACTION_STATES = ` case - when operator_completed then 'Cancelled' + when operator_completed and error = 'Operator cancel' then 'Cancelled' when error is not null then 'Error' when send_confirmed then 'Sent' when ((not send_confirmed) and (created <= now() - interval '${PENDING_INTERVAL}')) then 'Expired' diff --git a/lib/cash-out/cash-out-helper.js b/lib/cash-out/cash-out-helper.js index 2620c23c..f43bf62c 100644 --- a/lib/cash-out/cash-out-helper.js +++ b/lib/cash-out/cash-out-helper.js @@ -7,7 +7,8 @@ const BN = require('../bn') const REDEEMABLE_AGE = T.day const CASH_OUT_TRANSACTION_STATES = ` -case +case + when error = 'Operator cancel' then 'Cancelled' when error is not null then 'Error' when dispense then 'Success' when (extract(epoch from (now() - greatest(created, confirmed_at))) * 1000) >= ${REDEEMABLE_AGE} then 'Expired'