Prior to the Testnet reset, the transaction nonce on an EVM account was being picked up correctly.
However, after the Testnet reset, there is a discrepancy:
eth_getTransactionCount(address, 'latest')returns a low number (0before sending my first transaction after the reset)eth_getTransactionCount(address, 'pending')returns a high number (140in my case, which probably was the nonce prior to the reset)
(Using a DApp, connected through Metamask)
Metamask caches the transaction nonce for accounts.
Therefore after the reset, you need to clear its cache. To do so:
Metamask --> Settings --> Clear activity tab data
After this, your nonce should reset to
0, and theeth_getTransactionCountdiscrepancy should stop happening.