metamask-extension
                                
                                 metamask-extension copied to clipboard
                                
                                    metamask-extension copied to clipboard
                            
                            
                            
                        [Bug]: A cascade of issues happen when using Localhost with chainId 1, all seem related to loosing track of the Nonce
Describe the bug
Problem: a cascade of issues happen when I am using a localhost network with chainId 1 perform tx's and switch to another network. They seem related to not keeping track of the nonce and a mixed up of subsequent problems.
I identify 3 user-facing problems, but might be more on the background.
First issue: a transaction is being Queued, but it is displayed together with the Confirmed transactions.

Second issue: there is no default nonce anymore, when I try to perform another transaction

Third issue: when I am trying to Speed up or Cancel that transaction, new transactions entries are being created, with empty name and data.

This is the video of the complete flow and all 3 problems. This ticket could be split up in 3 tasks, even though, the reporting ticket is 1, as it is hard to decouple the 3 behaviors (it happens one after the other, not isolated).
https://user-images.githubusercontent.com/54408225/215997514-7998ec2d-6527-431e-b8f6-7245bf01c630.mp4
Steps to reproduce
- On a terminal, open a ganache server with chanId 1 forking mainnet ganache --fork https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID --chain.chainId 1
- On MM, edit Localhost to point to chainId 1
- Change network to Localhost
- On Advanced settings, enable Nonce toggle
- Go to Test Dapp
- Connect MM
- Click Create Token
- Accept tx on MM --- see nonce is correct
- Tx is successful
- Click again Create Token
- Change the default nonce to a higher value
- Confirm tx
- Open MM -- see Issue 1: transaction has status Queued, but it's on the Confirmed list
- Now change to Goerli network
- Go to test Dapp
- Refresh
- Click Create Token -- see Issue 2: there is no default nonce anymore
- Click Confirm
- Open MM
- Speed Up or cancel the tx several times -- see Issue 3: new tx entries keep appearing with empty data
Error messages or log output
No response
Version
10.24.1
Build type
None
Browser
Chrome
Operating system
Linux
Hardware wallet
No response
Additional context
No response
Thanks for catching this, Mariona! I've added it to our next week's sprint board so we go over it during sprint planning.
@danjm @pedronfigueiredo This could be the cause of the missing "transactionType" sentry errors that we couldn't understand 1-2 years ago
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions.