fix: usedb.one
This commit is contained in:
parent
403e593171
commit
2355cfccbb
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ function post (machineTx, pi) {
|
||||||
if (_.some(it => it.address === updatedTx.toAddress)(blacklistItems)) {
|
if (_.some(it => it.address === updatedTx.toAddress)(blacklistItems)) {
|
||||||
blacklisted = true
|
blacklisted = true
|
||||||
notifier.notifyIfActive('compliance', 'blacklistNotify', r.tx, false)
|
notifier.notifyIfActive('compliance', 'blacklistNotify', r.tx, false)
|
||||||
} else if (isReusedAddress[0].exists && rejectAddressReuse) {
|
} else if (isReusedAddress && rejectAddressReuse) {
|
||||||
notifier.notifyIfActive('compliance', 'blacklistNotify', r.tx, true)
|
notifier.notifyIfActive('compliance', 'blacklistNotify', r.tx, true)
|
||||||
addressReuse = true
|
addressReuse = true
|
||||||
}
|
}
|
||||||
|
|
@ -173,7 +173,7 @@ function doesTxReuseAddress (tx) {
|
||||||
SELECT to_address FROM cash_in_txs WHERE id != $1
|
SELECT to_address FROM cash_in_txs WHERE id != $1
|
||||||
) AS x WHERE to_address = $2
|
) AS x WHERE to_address = $2
|
||||||
)`
|
)`
|
||||||
return db.any(sql, [tx.id, tx.toAddress])
|
return db.one(sql, [tx.id, tx.toAddress]).then(({ exists }) => exists)
|
||||||
}
|
}
|
||||||
return Promise.resolve(false)
|
return Promise.resolve(false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue