diff options
author | kumavis <aaron@kumavis.me> | 2017-07-26 04:16:46 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2017-07-26 04:16:46 +0800 |
commit | 5b9a6bd367173330d8bcfd973278eeba6f31ec06 (patch) | |
tree | 3399e340236231b1ede5b52735d70fb6b169bc20 /app/scripts/controllers | |
parent | 9b24ab0e70d72471ddc928a763bc2096790ab966 (diff) | |
download | tangerine-wallet-browser-5b9a6bd367173330d8bcfd973278eeba6f31ec06.tar.gz tangerine-wallet-browser-5b9a6bd367173330d8bcfd973278eeba6f31ec06.tar.zst tangerine-wallet-browser-5b9a6bd367173330d8bcfd973278eeba6f31ec06.zip |
tx cont - remove old cb from async fn
Diffstat (limited to 'app/scripts/controllers')
-rw-r--r-- | app/scripts/controllers/transactions.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 5f3d84ebe..fc91bdf4d 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -458,7 +458,7 @@ module.exports = class TransactionController extends EventEmitter { })) } - async _resubmitTx (txMeta, cb) { + async _resubmitTx (txMeta) { const address = txMeta.txParams.from const balance = this.ethStore.getState().accounts[address].balance if (!('retryCount' in txMeta)) txMeta.retryCount = 0 @@ -467,17 +467,17 @@ module.exports = class TransactionController extends EventEmitter { if (!this.txProviderUtils.sufficientBalance(txMeta.txParams, balance)) { const message = 'Insufficient balance.' this.setTxStatusFailed(txMeta.id, { message }) - cb() - return log.error(message) + log.error(message) + return } // Only auto-submit already-signed txs: - if (!('rawTx' in txMeta)) return cb() + if (!('rawTx' in txMeta)) return // Increment a try counter. txMeta.retryCount++ const rawTx = txMeta.rawTx - return await this.txProviderUtils.publishTransaction(rawTx, cb) + return await this.txProviderUtils.publishTransaction(rawTx) } // checks the network for signed txs and |