MetaMask / metamask-extension

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

Metamask does not display the expected error message #24901

Open ylsGit opened 1 month ago

ylsGit commented 1 month ago

What is this about?

  1. base env

    • Chrome 122.0.6261.57
    • MetaMask 11.15.6
  2. send invalid tx to xlayer testnet, the eth_sendRawTransaction response and error display:

    {
    "jsonrpc": "2.0",
    "id": 7577166421925616,
    "error": {
        "code": -32000,
        "message": "nonce too low"
    }
    }
    截屏2024-05-30 18 42 41
  3. send invalid tx to sepolia testnet, the eth_sendRawTransaction response and error display:

    {
    "jsonrpc": "2.0",
    "id": 7577166421925488,
    "error": {
        "code": -32000,
        "message": "nonce too low: next nonce 4, tx nonce 1"
    }
    }
    截屏2024-05-30 18 40 43
  4. Why is the information displayed different, Internal JSON-RPC error. and nonce too low: next nonce 4, tx nonce 1. I think it should show "nonce too low" for 2 xlayer testnet.

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

Stakeholder review needed before the work gets merged

References

No response

ylsGit commented 1 month ago

???

ylsGit commented 2 weeks ago

???