MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.57k stars 4.73k forks source link

[Bug]: Transactions - Pending transactions add up transactions with same nonce (speed up/cancel) #24552

Open seaona opened 2 weeks ago

seaona commented 2 weeks ago

Describe the bug

Whenever I am performing a tx when I have another one pending, I can see the Information display saying I have a pending tx. However, if I have speed up/cancelled that transaction I see how the number of pending transactions increases, even though the speed up/cancel tx's all have the same nonce, meaning just 1 is actually pending

Expected behavior

Possibly transactions with the same nonce should count as 1 pending tx instead of adding up to the queue? Similarly as what we do in the Activity list (all same nonce tx's are consolidated into 1)

Screenshots/Recordings

https://github.com/MetaMask/metamask-extension/assets/54408225/617d8ba6-3f1b-4fa0-af78-153546de2cb1

Steps to reproduce

  1. Start a tx with low nonce
  2. Trigger speed up/cancel several times
  3. Start a new tx
  4. See as many pending tx's as performed in step n1 + n2

Error messages or log output

No response

Version

11.15.4 prod might be earlier too

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response