diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-09-30 03:54:05 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-09-30 03:54:05 +0800 |
commit | ac80eaca1fc9923cd5696282ba2bc6bace22ff83 (patch) | |
tree | 72a69440c6b4ab213ff494ab8ee7344f8fb9cfec /app/scripts/lib | |
parent | 77963e84170ee39c9d227e7cc4097b19f947099b (diff) | |
download | tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.gz tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.bz2 tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.lz tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.xz tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.tar.zst tangerine-wallet-browser-ac80eaca1fc9923cd5696282ba2bc6bace22ff83.zip |
pending-tx - dont check the balance to rebrodcast
Diffstat (limited to 'app/scripts/lib')
-rw-r--r-- | app/scripts/lib/pending-tx-tracker.js | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/app/scripts/lib/pending-tx-tracker.js b/app/scripts/lib/pending-tx-tracker.js index b97cec9ce..3d358b00e 100644 --- a/app/scripts/lib/pending-tx-tracker.js +++ b/app/scripts/lib/pending-tx-tracker.js @@ -1,6 +1,5 @@ const EventEmitter = require('events') const EthQuery = require('ethjs-query') -const sufficientBalance = require('./util').sufficientBalance /* Utility class for tracking the transactions as they @@ -12,7 +11,6 @@ const sufficientBalance = require('./util').sufficientBalance requires a: { provider: //, nonceTracker: //see nonce tracker, - getBalnce: //(address) a function for getting balances, getPendingTransactions: //() a function for getting an array of transactions, publishTransaction: //(rawTx) a async function for publishing raw transactions, } @@ -25,7 +23,6 @@ module.exports = class PendingTransactionTracker extends EventEmitter { this.query = new EthQuery(config.provider) this.nonceTracker = config.nonceTracker this.retryLimit = config.retryLimit || Infinity - this.getBalance = config.getBalance this.getPendingTransactions = config.getPendingTransactions this.publishTransaction = config.publishTransaction } @@ -99,23 +96,11 @@ module.exports = class PendingTransactionTracker extends EventEmitter { } async _resubmitTx (txMeta) { - const address = txMeta.txParams.from - const balance = this.getBalance(address) - if (balance === undefined) return - if (txMeta.retryCount > this.retryLimit) { const err = new Error(`Gave up submitting after ${this.retryLimit} blocks un-mined.`) return this.emit('tx:failed', txMeta.id, err) } - // if the value of the transaction is greater then the balance, fail. - if (!sufficientBalance(txMeta.txParams, balance)) { - const insufficientFundsError = new Error('Insufficient balance during rebroadcast.') - this.emit('tx:failed', txMeta.id, insufficientFundsError) - log.error(insufficientFundsError) - return - } - // Only auto-submit already-signed txs: if (!('rawTx' in txMeta)) return |