diff --git a/lib/cash-out/cash-out-tx.js b/lib/cash-out/cash-out-tx.js index 34077546..c7236b91 100644 --- a/lib/cash-out/cash-out-tx.js +++ b/lib/cash-out/cash-out-tx.js @@ -137,9 +137,15 @@ function getWalletScore (tx, pi) { dispense: true }) }) + .catch(() => _.assign(tx, { + walletScore: 10, + error: 'Ciphertrace services not available', + errorCode: 'operatorCancel', + dispense: true + })) } - if (tx.status !== 'notSeen' && !_.isNil(tx.walletScore)) { + if (_.includes(tx.status, statuses) && !_.isNil(tx.walletScore)) { return pi.isValidWalletScore(tx.walletScore) .then(isValid => isValid ? tx : _.assign(tx, { error: 'Ciphertrace score is above defined threshold',