aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-07-27 01:15:35 +0800
committerkumavis <aaron@kumavis.me>2017-07-27 01:15:35 +0800
commitf16802e2d4f7e917e894e3ec38a716255f6b0942 (patch)
tree023b21524640943c7482990eaea702297c6b9fc4
parenta929fb2387de87619192ea0a86fe1ead4f7a0361 (diff)
downloadtangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar.gz
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar.bz2
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar.lz
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar.xz
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.tar.zst
tangerine-wallet-browser-f16802e2d4f7e917e894e3ec38a716255f6b0942.zip
nonce-tracker - validation - add validation failing value to error message
-rw-r--r--app/scripts/lib/nonce-tracker.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/nonce-tracker.js b/app/scripts/lib/nonce-tracker.js
index b76dac4e8..4bba1f1a8 100644
--- a/app/scripts/lib/nonce-tracker.js
+++ b/app/scripts/lib/nonce-tracker.js
@@ -31,12 +31,12 @@ class NonceTracker {
const currentBlock = await this._getCurrentBlock()
const pendingTransactions = this.getPendingTransactions(address)
const pendingCount = pendingTransactions.length
- assert(Number.isInteger(pendingCount), 'nonce-tracker - pendingCount is an integer')
+ assert(Number.isInteger(pendingCount), `nonce-tracker - pendingCount is not an integer - got: "${pendingCount}"`)
const baseCountHex = await this._getTxCount(address, currentBlock)
const baseCount = parseInt(baseCountHex, 16)
- assert(Number.isInteger(baseCount), 'nonce-tracker - baseCount is an integer')
+ assert(Number.isInteger(baseCount), `nonce-tracker - baseCount is not an integer - got: "${baseCount}"`)
const nextNonce = baseCount + pendingCount
- assert(Number.isInteger(nextNonce), 'nonce-tracker - nextNonce is an integer')
+ assert(Number.isInteger(nextNonce), `nonce-tracker - nextNonce is not an integer - got: "${nextNonce}"`)
// return next nonce and release cb
return { nextNonce, releaseLock }
}