Merge pull request #1737 from RafaelTaranto/backport/retry-on-txs

LAM-489 fix: remove cash-in transaction retry
This commit is contained in:
Rafael Taranto 2024-11-29 08:26:33 +00:00 committed by GitHub
commit 04de0a199c

View file

@ -148,18 +148,17 @@ 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'
// Important: We don't know what kind of error this is
// so not safe to assume that funds weren't sent.
// 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 => {