Merge pull request #1162 from ubavic/logging-for-wallet-score

fix: adress score error message
This commit is contained in:
Rafael Taranto 2022-03-18 15:27:44 +00:00 committed by GitHub
commit 0a162a48e6

View file

@ -139,14 +139,14 @@ function getWalletScore (tx, pi) {
? _.assign(tx, { walletScore: highestScore.score })
: _.assign(tx, {
walletScore: highestScore.score,
error: 'Ciphertrace score is above defined threshold',
error: 'Address score is above defined threshold',
errorCode: 'operatorCancel',
dispense: true
})
})
.catch(() => _.assign(tx, {
.catch(error => _.assign(tx, {
walletScore: 10,
error: 'Ciphertrace services not available',
error: `Failure getting address score: ${error?.message}`,
errorCode: 'operatorCancel',
dispense: true
}))
@ -155,7 +155,7 @@ function getWalletScore (tx, pi) {
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',
error: 'Address score is above defined threshold',
errorCode: 'operatorCancel',
dispense: true
}))