Merge pull request #1431 from josepfo/fix/mock-scoring-flag
Fix: mock scoring flag
This commit is contained in:
commit
d0b57cfded
7 changed files with 80 additions and 38 deletions
|
|
@ -179,16 +179,20 @@ function doesTxReuseAddress (tx) {
|
|||
}
|
||||
|
||||
function getWalletScore (tx, pi) {
|
||||
if (!tx.fiat || tx.fiat.isZero()) {
|
||||
return pi.rateWallet(tx.cryptoCode, tx.toAddress)
|
||||
}
|
||||
// Passthrough the previous result
|
||||
return pi.isValidWalletScore(tx.walletScore)
|
||||
.then(isValid => ({
|
||||
address: tx.toAddress,
|
||||
score: tx.walletScore,
|
||||
isValid
|
||||
}))
|
||||
pi.isWalletScoringEnabled(tx)
|
||||
.then(isEnabled => {
|
||||
if(!isEnabled) return null
|
||||
if (!tx.fiat || tx.fiat.isZero()) {
|
||||
return pi.rateWallet(tx.cryptoCode, tx.toAddress)
|
||||
}
|
||||
// Passthrough the previous result
|
||||
return pi.isValidWalletScore(tx.walletScore)
|
||||
.then(isValid => ({
|
||||
address: tx.toAddress,
|
||||
score: tx.walletScore,
|
||||
isValid
|
||||
}))
|
||||
})
|
||||
}
|
||||
|
||||
function monitorPending (settings) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue