aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/lib/nonce-tracker.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js
index d44f9c858..dab6ace1f 100644
--- a/app/scripts/lib/nonce-tracker.js
+++ b/app/scripts/lib/nonce-tracker.js
@@ -139,11 +139,9 @@ class NonceTracker {
}
_getHighestNonce (txList) {
- const nonces = txList.map((txMeta) => txMeta.txParams.nonce)
- const nonceHex = nonces.reduce((highestNonce, nonce) => {
- return parseInt(nonce, 16) > parseInt(highestNonce, 16) ? nonce : highestNonce
- }, '0x0')
- return parseInt(nonceHex, 16)
+ const nonces = txList.map((txMeta) => parseInt(txMeta.txParams.nonce, 16))
+ const highestNonce = Math.max.apply(null, nonces)
+ return highestNonce
}
// this is a hotfix for the fact that the blockTracker will