fix: cashout flow out of reach catch
This commit is contained in:
parent
ae8c86a6a7
commit
72610e7376
1 changed files with 7 additions and 1 deletions
|
|
@ -137,9 +137,15 @@ function getWalletScore (tx, pi) {
|
||||||
dispense: true
|
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)
|
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: 'Ciphertrace score is above defined threshold',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue