improve incoming tx status updating
This commit is contained in:
parent
2dc332cf1a
commit
38e562bdd6
3 changed files with 49 additions and 17 deletions
|
|
@ -406,12 +406,7 @@ function processTxStatus (tx) {
|
|||
return resolve() // Resolve on error because we ignore errors
|
||||
}
|
||||
|
||||
var status = res.status
|
||||
if (tx.status === status) return resolve()
|
||||
|
||||
const confirm = (status === 'instant' && tx.status !== 'confirmed') ||
|
||||
(status === 'confirmed' && tx.status !== 'instant')
|
||||
db.updateTxStatus(tx, status, confirm).then(resolve).catch(reject)
|
||||
db.updateTxStatus(tx, res.status).then(resolve).catch(reject)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue