1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00

pending tx tracker - resubmit - warn dont error on unknown error

This commit is contained in:
kumavis 2017-10-02 15:00:23 -07:00
parent 7af696bfbe
commit 22eaf92ec2

View File

@ -86,12 +86,15 @@ module.exports = class PendingTransactionTracker extends EventEmitter {
// other
|| errorMessage.includes('gateway timeout')
|| errorMessage.includes('nonce too low')
|| txMeta.retryCount > 1
)
// ignore resubmit warnings, return early
if (isKnownTx) return
// encountered real error - transition to error state
this.emit('tx:failed', txMeta.id, err)
txMeta.warning = {
error: errorMessage,
message: 'There was an error when resubmitting this transaction.',
}
this.emit('tx:warning', txMeta)
}))
}