MetaMask / metamask-extension

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

[Bug]: When a user has a Smart transaction in a Pending state and initiates a transaction through a dApp on a different network, the dApp transaction is generated with an empty nonce. Pressing the 'Confirm' button then leads to an endless loading spinner. #25579

Open sleepytanya opened 4 days ago

sleepytanya commented 4 days ago

Describe the bug

v12.0.0 build [https://github.com/MetaMask/metamask-extension/commit/f5631fba1e83899f3e8d8a1bf2b1fc0de9fb87c6]

When a user has a transaction (STX) in a Pending state and initiates a transaction through a dApp on a different network, the dApp transaction is generated with an empty nonce. Pressing the 'Confirm' button then leads to an endless loading spinner. After reloading the extension, the second transaction's popup becomes accessible, and the transaction is then displayed with the correct nonce.

Expected behavior

-

Screenshots/Recordings

https://github.com/MetaMask/metamask-extension/assets/104780023/a24fda33-25a3-4ad0-b1c0-1dc422065279

Steps to reproduce

  1. Turn on nonce customization in the SEttings->Advanced
  2. Connect to Ethereum
  3. Send STX (set low gas fee so the STX stays in 'Pending' state for awhile)
  4. Connect to dapp (Pancake Swap, Uniswap) to BNB or other network
  5. Start a dapp transaction
  6. Notice that nonce field is empty
  7. Confirm the transaction, see the loading spinner

Error messages or log output

Version

v12.0.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

sleepytanya commented 4 days ago
  1. First STX on mainnet from Uniswap, in 'Pending' state
  2. Second transaction on BNB from Pancake Swaps
  3. The popup for the second tx shows empty Activity tab
  4. Second transaction appears on the Activity tab after ~30-45 seconds in 'Unapproved' state

https://github.com/MetaMask/metamask-extension/assets/104780023/6f7613b9-f5b7-4e65-88f8-4c514df2e06f

Screenshot 2024-06-27 at 23 46 22
sleepytanya commented 3 days ago

Present on the latest v12.0.0 build

https://github.com/MetaMask/metamask-extension/assets/104780023/95defedb-ed65-4d7c-b99a-a86f21696193