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]
|
||||
|
|
|
|||
3
todo.txt
3
todo.txt
|
|
@ -1,7 +1,6 @@
|
|||
- change satoshis to crypto_atoms in db (ask neal about this)
|
||||
|
||||
- on upgrade, make sure we're not sending out lots of notifications
|
||||
- fix plugin reloading, in current version (v) and master
|
||||
- sending two notifications on confirmation
|
||||
- reproduce by setting db record to uncomfirmed, etc
|
||||
- reproduce by setting db record to unconfirmed, etc
|
||||
- something is being called twice, especially notifyConfirmation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue