Merge pull request #4669 from MetaMask/removeNonceTrackerFunction

Remove unsued nonce tracker function
feature/default_network_editable
Thomas Huang 6 years ago committed by GitHub
commit 5a45df72c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      app/scripts/controllers/transactions/nonce-tracker.js

@ -129,19 +129,6 @@ class NonceTracker {
return Number.isInteger(highest) ? highest + 1 : 0 return Number.isInteger(highest) ? highest + 1 : 0
} }
_reduceTxListToUniqueNonces (txList) {
const reducedTxList = txList.reduce((reducedList, txMeta, index) => {
if (!index) return [txMeta]
const nonceMatches = txList.filter((txData) => {
return txMeta.txParams.nonce === txData.txParams.nonce
})
if (nonceMatches.length > 1) return reducedList
reducedList.push(txMeta)
return reducedList
}, [])
return reducedTxList
}
_getHighestNonce (txList) { _getHighestNonce (txList) {
const nonces = txList.map((txMeta) => { const nonces = txList.map((txMeta) => {
const nonce = txMeta.txParams.nonce const nonce = txMeta.txParams.nonce

Loading…
Cancel
Save