[Bug]: Transactions - Sending a tx with higher nonce makes the tx remain with status `Signed` and blocks the wallet for sending tx's in all networks #27824
When I try to send a transaction with a higher nonce than the suggested one, using a local network (ganache) I see that the transaction remains in a Signed status and MM loading.
If I refresh and I try to send a transaction I cannot do it since I see the error A previous transaction is still being signed or submitted. After that, even if I change networks and try to send a transaction in a different network I see the same error and the wallet is stuck. For this reason I added a sev1 label, as there is no way of getting out of this state, unless you terminate the local network (this might not be an option to the users if this happens with a network they are not controlling)
See how in 12.3.1, this Signed transaction is discarded after switching networks, unblocking the wallet from this state and allowing to perform transactions in different networks.
Describe the bug
When I try to send a transaction with a higher nonce than the suggested one, using a local network (ganache) I see that the transaction remains in a
Signed
status and MM loading. If I refresh and I try to send a transaction I cannot do it since I see the errorA previous transaction is still being signed or submitted
. After that, even if I change networks and try to send a transaction in a different network I see the same error and the wallet is stuck. For this reason I added a sev1 label, as there is no way of getting out of this state, unless you terminate the local network (this might not be an option to the users if this happens with a network they are not controlling)This explains the behaviour I was seeing here: https://github.com/MetaMask/metamask-extension/pull/27561#issuecomment-2402731232 combined with another bug, where the nonce is not updated after switching networks (I'm currently trying to find repro steps for this one).
Smart transactions are disabled.
Expected behavior
In 12.3.1, this Signed transaction is discarded once we switch networks, unblocking the wallet from this state. Should we aim something similar?
Screenshots/Recordings
https://github.com/user-attachments/assets/c180ea5a-38b6-44d9-b21f-d109eed01e1e
See how in 12.3.1, this Signed transaction is discarded after switching networks, unblocking the wallet from this state and allowing to perform transactions in different networks.
https://github.com/user-attachments/assets/c153350d-791f-4513-95a3-1c8f359d9233
Steps to reproduce
Signed
stateA previous transaction is still being signed or submitted
Error messages or log output
No response
Detection stage
In production (default)
Version
12.4.0
Build type
None
Browser
Chrome
Operating system
Linux
Hardware wallet
No response
Additional context
No response
Severity
No response