Merge pull request #1737 from RafaelTaranto/backport/retry-on-txs
LAM-489 fix: remove cash-in transaction retry
This commit is contained in:
commit
04de0a199c
1 changed files with 6 additions and 7 deletions
|
|
@ -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 => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue