### Ethers Version 5.6.8 ### Search Terms nonce manager, increment nonce ### Describe the Problem `nonceManager.incrementTransactionCount(0)` increments nonce by 1. The bug is on this line https://github.com/ethers-io/ethers.js/blob/master/packages/experimental/src.ts/nonce-manager.ts#L49 It should be changed to: ```ts this._deltaCount += (count ?? 1); ``` ### Code Snippet ```shell import { NonceManager } from "@ethersproject/experimental" import { VoidSigner } from "ethers" ;(async () => { const manager = new NonceManager(new VoidSigner('')) manager.setTransactionCount(10) console.log(await manager.getTransactionCount('pending')) // 10 manager.incrementTransactionCount(0) console.log(await manager.getTransactionCount('pending')) // 11 })() ``` ### Contract ABI _No response_ ### Errors _No response_ ### Environment _No response_ ### Environment (Other) _No response_
Activity
[-]Bug Report Title[/-][+]NonceManager.incrementTransactionCount(0) bug[/+]Fix NonceManager for increment 0 and provided nonce (#3062, #3085).
ricmoo commentedon Jun 18, 2022
This has been fixed in 5.6.9. Let me know if you still have any problems.
Thanks! :)
Fix NonceManager for increment 0 and provided nonce (ethers-io#3062, e…