diff options
author | Frankie <frankie.diamond@gmail.com> | 2018-03-29 05:38:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 05:38:40 +0800 |
commit | 650b716f55fcfa809b22708b9ad43c8a0716f9fc (patch) | |
tree | 8ee75c387fab20a6e60b14b078768d486eaf4d3a /app | |
parent | 8766420f19251b95211dd99ff9a45e60cf0177ad (diff) | |
parent | f50a7a8fe891a803e50cc256200e8ce8c903ea2e (diff) | |
download | tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar.gz tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar.bz2 tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar.lz tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar.xz tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.tar.zst tangerine-wallet-browser-650b716f55fcfa809b22708b9ad43c8a0716f9fc.zip |
Merge pull request #3782 from MetaMask/i3670-FixNonceBug
Add test for suspected nonce bug
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/nonce-tracker.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js index ed9dd3f11..5b1cd7f43 100644 --- a/app/scripts/lib/nonce-tracker.js +++ b/app/scripts/lib/nonce-tracker.js @@ -31,14 +31,13 @@ class NonceTracker { const networkNonceResult = await this._getNetworkNextNonce(address) const highestLocallyConfirmed = this._getHighestLocallyConfirmed(address) const nextNetworkNonce = networkNonceResult.nonce - const highestLocalNonce = highestLocallyConfirmed - const highestSuggested = Math.max(nextNetworkNonce, highestLocalNonce) + const highestSuggested = Math.max(nextNetworkNonce, highestLocallyConfirmed) const pendingTxs = this.getPendingTransactions(address) const localNonceResult = this._getHighestContinuousFrom(pendingTxs, highestSuggested) || 0 nonceDetails.params = { - highestLocalNonce, + highestLocallyConfirmed, highestSuggested, nextNetworkNonce, } |