1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 18:41:38 +01:00

firstRetryBlockNumber defaults to latestBlockNumber if undefined on txMeta in _resubmitTx

This commit is contained in:
Dan 2017-12-06 13:21:09 -03:30
parent ea23da9e75
commit f58aae3f2b

View File

@ -112,7 +112,7 @@ module.exports = class PendingTransactionTracker extends EventEmitter {
return this.emit('tx:failed', txMeta.id, err)
}
const firstRetryBlockNumber = txMeta.firstRetryBlockNumber
const firstRetryBlockNumber = txMeta.firstRetryBlockNumber || latestBlockNumber
const txBlockDistance = Number.parseInt(latestBlockNumber, 16) - Number.parseInt(firstRetryBlockNumber, 16)
const retryCount = txMeta.retryCount || 0