aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-07-12 02:57:42 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-07-12 02:57:42 +0800
commit11d57adc5c6fa124cbb83a907a55a0aa733bb1cc (patch)
tree4bfe7abab25eba9aa5d0eba5640957fdcdd34458
parent2d1b7c0ee152c38ebb0f3a63bd9f2daef18ded36 (diff)
downloadtangerine-wallet-browser-11d57adc5c6fa124cbb83a907a55a0aa733bb1cc.tar.gz
tangerine-wallet-browser-11d57adc5c6fa124cbb83a907a55a0aa733bb1cc.tar.zst
tangerine-wallet-browser-11d57adc5c6fa124cbb83a907a55a0aa733bb1cc.zip
add "Gateway timeout" to ignored errors when resubmiting and use .includes over .startsWith
-rw-r--r--app/scripts/controllers/transactions.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js
index 18bb245de..933c079d2 100644
--- a/app/scripts/controllers/transactions.js
+++ b/app/scripts/controllers/transactions.js
@@ -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