Add sms/email notifications on transactions (#198)

* Add sms/email notifications on transactions

* Add configuration for transaction notification

* Add notification on provision address error

* Remove unneeded noop from promises
This commit is contained in:
Rafael Taranto 2018-11-06 10:49:12 -02:00 committed by Josh Harvey
parent 272127518d
commit 809bf5a2a9
7 changed files with 155 additions and 5 deletions

View file

@ -80,7 +80,11 @@ function postProcess (r, pi) {
sendPending
}
})
.then(sendRec => logAction(sendRec, r.tx))
.then(sendRec => {
pi.notifyOperator(r.tx, sendRec)
.catch((err) => logger.error('Failure sending transaction notification', err))
return logAction(sendRec, r.tx)
})
}
function monitorPending (settings) {