Merge pull request #1162 from ubavic/logging-for-wallet-score
fix: adress score error message
This commit is contained in:
commit
0a162a48e6
1 changed files with 4 additions and 4 deletions
|
|
@ -139,14 +139,14 @@ function getWalletScore (tx, pi) {
|
||||||
? _.assign(tx, { walletScore: highestScore.score })
|
? _.assign(tx, { walletScore: highestScore.score })
|
||||||
: _.assign(tx, {
|
: _.assign(tx, {
|
||||||
walletScore: highestScore.score,
|
walletScore: highestScore.score,
|
||||||
error: 'Ciphertrace score is above defined threshold',
|
error: 'Address score is above defined threshold',
|
||||||
errorCode: 'operatorCancel',
|
errorCode: 'operatorCancel',
|
||||||
dispense: true
|
dispense: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => _.assign(tx, {
|
.catch(error => _.assign(tx, {
|
||||||
walletScore: 10,
|
walletScore: 10,
|
||||||
error: 'Ciphertrace services not available',
|
error: `Failure getting address score: ${error?.message}`,
|
||||||
errorCode: 'operatorCancel',
|
errorCode: 'operatorCancel',
|
||||||
dispense: true
|
dispense: true
|
||||||
}))
|
}))
|
||||||
|
|
@ -155,7 +155,7 @@ function getWalletScore (tx, pi) {
|
||||||
if (_.includes(tx.status, statuses) && !_.isNil(tx.walletScore)) {
|
if (_.includes(tx.status, statuses) && !_.isNil(tx.walletScore)) {
|
||||||
return pi.isValidWalletScore(tx.walletScore)
|
return pi.isValidWalletScore(tx.walletScore)
|
||||||
.then(isValid => isValid ? tx : _.assign(tx, {
|
.then(isValid => isValid ? tx : _.assign(tx, {
|
||||||
error: 'Ciphertrace score is above defined threshold',
|
error: 'Address score is above defined threshold',
|
||||||
errorCode: 'operatorCancel',
|
errorCode: 'operatorCancel',
|
||||||
dispense: true
|
dispense: true
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue