aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-10-03 06:00:23 +0800
committerkumavis <aaron@kumavis.me>2017-10-03 06:00:23 +0800
commit22eaf92ec2c948ed88df30bc3a3b26f140359f09 (patch)
treeb64b9f146245b9a1b3bbfa485fdb35cc4b6d66c8
parent7af696bfbe721db74efad91ca916b18198070e76 (diff)
downloadtangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar.gz
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar.bz2
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar.lz
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar.xz
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.tar.zst
tangerine-wallet-browser-22eaf92ec2c948ed88df30bc3a3b26f140359f09.zip
pending tx tracker - resubmit - warn dont error on unknown error
-rw-r--r--app/scripts/lib/pending-tx-tracker.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js
index 48d1e1d06..dcaa1d716 100644
--- a/app/scripts/lib/pending-tx-tracker.js
+++ b/app/scripts/lib/pending-tx-tracker.js
@@ -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)
}))
}