aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-08 02:37:20 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-08 02:37:20 +0800
commitfb9866b4e10c823e987d4cee9fc499673d664a8a (patch)
treee526beac1bd33e38d93650adc1ced57483b4cf3a /app/scripts/lib
parent08f49ab35f5a78fba6921a2957a92e0a2e5b065a (diff)
downloadtangerine-wallet-browser-fb9866b4e10c823e987d4cee9fc499673d664a8a.tar.gz
tangerine-wallet-browser-fb9866b4e10c823e987d4cee9fc499673d664a8a.tar.zst
tangerine-wallet-browser-fb9866b4e10c823e987d4cee9fc499673d664a8a.zip
fix spelling
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/pending-tx-watchers.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/scripts/lib/pending-tx-watchers.js b/app/scripts/lib/pending-tx-watchers.js
index 4158e8bb5..5b23cc67c 100644
--- a/app/scripts/lib/pending-tx-watchers.js
+++ b/app/scripts/lib/pending-tx-watchers.js
@@ -19,7 +19,7 @@ const sufficientBalance = require('./util').sufficientBalance
*/
-module.exports = class PendingTransactionWatcher extends EventEmitter {
+module.exports = class PendingTransactionWatchers extends EventEmitter {
constructor (config) {
super()
this.query = new EthQuery(config.provider)
@@ -101,11 +101,8 @@ module.exports = class PendingTransactionWatcher extends EventEmitter {
// if the value of the transaction is greater then the balance, fail.
if (!sufficientBalance(txMeta.txParams, balance)) {
- const message = 'Insufficient balance during rebroadcast.'
- txMeta.warning = {
- message,
- }
- this.emit('txWarning', txMeta)
+ const insufficientFundsError = new Error('Insufficient balance during rebroadcast.')
+ this.emit('txFailed', txMeta.id, insufficientFundsError)
log.error(message)
return
}