1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

tx cont - remove old cb from async fn

This commit is contained in:
kumavis 2017-07-25 13:16:46 -07:00
parent 9b24ab0e70
commit 5b9a6bd367

View File

@ -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