1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

add "Gateway timeout" to ignored errors when resubmiting and use .includes over .startsWith

This commit is contained in:
frankiebee 2017-07-11 11:57:42 -07:00
parent 2d1b7c0ee1
commit 11d57adc5c

View File

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