Merge pull request #1761 from MetaMask/resubmimtErrors

add "Gateway timeout"
This commit is contained in:
kumavis 2017-07-11 12:05:00 -07:00 committed by GitHub
commit 0eee232e26
1 changed files with 6 additions and 4 deletions

View File

@ -426,11 +426,13 @@ module.exports = class TransactionController extends EventEmitter {
const errorMessage = err.message.toLowerCase()
const isKnownTx = (
// geth
errorMessage === 'replacement transaction underpriced'
|| errorMessage.startsWith('known transaction')
errorMessage.includes('replacement transaction underpriced')
|| errorMessage.includes('known transaction')
// parity
|| errorMessage === 'gas price too low to replace'
|| errorMessage === 'transaction with the same hash was already imported.'
|| errorMessage.includes('gas price too low to replace')
|| errorMessage.includes('transaction with the same hash was already imported')
// other
|| errorMessage.includes('gateway timeout')
)
// ignore resubmit warnings, return early
if (isKnownTx) return