diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-08-24 11:31:03 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-08-24 11:43:47 +0800 |
commit | 855f4eeacbcf7b3e056cf7956edea2c84fa256d5 (patch) | |
tree | 4e9abd4ec6dd2de2822ea5490789c6a92003c89d /test | |
parent | 04d40b114dd12237710f605fe2f0a5f2c337d2cb (diff) | |
download | tangerine-wallet-browser-855f4eeacbcf7b3e056cf7956edea2c84fa256d5.tar.gz tangerine-wallet-browser-855f4eeacbcf7b3e056cf7956edea2c84fa256d5.tar.zst tangerine-wallet-browser-855f4eeacbcf7b3e056cf7956edea2c84fa256d5.zip |
Pass nonce tests
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/nonce-tracker-test.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index c5a71d6c8..758bf9eb6 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -55,7 +55,7 @@ describe('Nonce Tracker', function () { txParams: { nonce: '0x01' }, }, { count: 5 }) - nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs) + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x0') }) it('should return nonce after those', async function () { @@ -69,14 +69,14 @@ describe('Nonce Tracker', function () { describe('when local confirmed count is higher than network nonce', function () { beforeEach(function () { const txGen = new MockTxGen() - confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 2 }) - nonceTracker = generateNonceTrackerWith([], confirmedTxs) + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) + nonceTracker = generateNonceTrackerWith([], confirmedTxs, '0x1') }) it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '2', `nonce should be 2 got ${nonceLock.nextNonce}`) + assert.equal(nonceLock.nextNonce, '3', `nonce should be 3 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) |