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 => { .catch(err => {
// Important: We don't know what kind of error this is // Important: We don't know what kind of error this is
// so not safe to assume that funds weren't sent. // 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 // Setting sendPending to true ensures that the transaction gets
// not to send. // silently terminated and no retries are done
const sendPending = err.name !== 'InsufficientFundsError'
return { return {
sendTime: 'now()^', sendTime: 'now()^',
error: err.message, error: err.message,
errorCode: err.name, errorCode: err.name,
sendPending sendPending: true
} }
}) })
.then(sendRec => { .then(sendRec => {