fix: remove cash-in transaction retry

This commit is contained in:
Sérgio Salgado 2022-05-24 18:32:38 +01:00 committed by Rafael
parent a29f3fc13c
commit 7d9c468242

View file

@ -150,16 +150,15 @@ function postProcess (r, pi, isBlacklisted, addressReuse, walletScore) {
.catch(err => {
// Important: We don't know what kind of error this is
// so not safe to assume that funds weren't sent.
// Therefore, don't set sendPending to false except for
// errors (like InsufficientFundsError) that are guaranteed
// not to send.
const sendPending = err.name !== 'InsufficientFundsError'
// Setting sendPending to true ensures that the transaction gets
// silently terminated and no retries are done
return {
sendTime: 'now()^',
error: err.message,
errorCode: err.name,
sendPending
sendPending: true
}
})
.then(sendRec => {