MetaMask / metamask-extension

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

[Bug]: Multichain - STX not working #26978

Open sleepytanya opened 2 weeks ago

sleepytanya commented 2 weeks ago

Describe the bug

Build from https://github.com/MetaMask/metamask-extension/pull/26433#issuecomment-2330104521

STX do not work. Next transaction is created with the same nonce.

Expected behavior

-

Screenshots/Recordings

https://github.com/user-attachments/assets/a9f70a7f-df0f-4f4c-87e3-908c28616ffd

Steps to reproduce

  1. Go to Settings - > Advanced -> turn STX toggle On
  2. Switch to mainnet
  3. Send a transaction, note that it is not an STX transaction
  4. Start another transaction, observe that it is created with the same nonce

Error messages or log output

No response

Detection stage

In production (default)

Version

dev build

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

jiexi commented 2 weeks ago

Am able to reproduce the issue with STX on and off.

  1. I see a call to get the next nonce when the confirmation screen become visible.
  2. I see that the value that would be returned for the next nonce is correct.
  3. However, I see the previous, now incorrect, nonce value being shown in the confirmation of the second send transaction despite the call for the next nonce being the correct/expected nonce value.
  4. When I click reject, I see the custom nonce value input field get updated from the previous incorrect nonce to the correct next nonce value right as the confirmation window is closed.

I think this is a component state/hook issue due to points #2 and #4

bergeron commented 2 weeks ago

The enablement of smart transactions should be fixed by https://github.com/MetaMask/metamask-extension/pull/26433/commits/2a487f23ec8290f3a939a5c850cac85299056be2.

Looking at nonce stuff in https://github.com/MetaMask/metamask-extension/issues/26979

sleepytanya commented 1 week ago

STX are working commit https://github.com/MetaMask/metamask-extension/commit/db211e2c110939bcf92cb90de4be6751192ac0c3

https://github.com/user-attachments/assets/c3384719-fe97-4c81-b68b-bc0d85c071f3

sleepytanya commented 1 week ago

@bergeron Can we close it?