this should fix double notify bug
This commit is contained in:
parent
adc1a4f353
commit
7f33e87c21
2 changed files with 5 additions and 10 deletions
|
|
@ -467,7 +467,7 @@ function processTxStatus (tx) {
|
|||
}
|
||||
|
||||
function notifyConfirmation (tx) {
|
||||
logger.debug('notifyConfirmation\n%j', tx)
|
||||
logger.debug('notifyConfirmation')
|
||||
|
||||
const phone = tx.phone
|
||||
const rec = {
|
||||
|
|
@ -482,7 +482,7 @@ function notifyConfirmation (tx) {
|
|||
}
|
||||
|
||||
function monitorLiveIncoming () {
|
||||
const statuses = ['notSeen', 'published']
|
||||
const statuses = ['notSeen', 'published', 'insufficientFunds']
|
||||
db.fetchOpenTxs(statuses, STALE_INCOMING_TX_AGE, function (err, txs) {
|
||||
if (err) return
|
||||
txs.forEach(processTxStatus)
|
||||
|
|
@ -490,13 +490,10 @@ function monitorLiveIncoming () {
|
|||
}
|
||||
|
||||
function monitorIncoming () {
|
||||
const statuses = ['notSeen', 'published', 'authorized', 'instant', 'rejected']
|
||||
const statuses = ['notSeen', 'published', 'authorized', 'instant', 'rejected', 'insufficientFunds']
|
||||
db.fetchOpenTxs(statuses, STALE_INCOMING_TX_AGE, function (err, txs) {
|
||||
if (err) return
|
||||
const promises = txs.map(tx => processTxStatus(tx))
|
||||
|
||||
return Promise.all(promises)
|
||||
.then(monitorUnnotified)
|
||||
txs.forEach(processTxStatus)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -555,7 +552,6 @@ function stopTrader (cryptoCode) {
|
|||
}
|
||||
|
||||
function pollBalance (cryptoCode, cb) {
|
||||
console.trace('pollBalance')
|
||||
logger.debug('[%s] collecting balance', cryptoCode)
|
||||
|
||||
var walletPlugin = walletPlugins[cryptoCode]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue