Skip to content

[Bug]: Invalid transaction params Error after switching account and network (EIP-1559 mismatch) #37570

@Pasha8914

Description

@Pasha8914

Describe the bug

After switching from a non-EIP-1559 network to an EIP-1559 network inside a connected Dapp, MetaMask continues to use outdated transaction parameters and throws an error:
Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559

The issue persists until the MetaMask extension icon is clicked (which seems to refresh the internal state).

Expected behavior

MetaMask should automatically update its internal transaction type and network context when switching between networks with/without EIP-1559 support, without requiring a manual refresh

Screenshots/Recordings

Screen.Recording.2025-11-06.at.19.17.45.mp4

Steps to reproduce

  1. Connect wallet A to a network B that does not support EIP-1559
  2. Perform an approve transaction, then revoke (cancel) it
  3. In MetaMask extension, switch account (select another account)
  4. Connect the new account to the Dapp
  5. In the Dapp, switch network to one that supports EIP-1559 (e.g. Gnosis or any other)
  6. Try to perform a new transaction (approve, send, etc.) The gasPrice / estimateFees value is passed into the transaction.

Error messages or log output

Approval error: ContractFunctionExecutionError: Invalid parameters were provided to the RPC method.
Double check you have provided the correct parameters.

Request Arguments:
  from:                  0xb73748B4B64d779245D07A0CF3DBB141dda2bbB6
  to:                    0x3111C94B9243a8A99D5A867e00609900e437E2c0
  data:                  0x095ea7b30000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  gas:                   46874
  maxFeePerGas:          0.003197051 gwei
  maxPriorityFeePerGas:  0.000000069 gwei
 
Contract Call:
  address:   0x3111C94B9243a8A99D5A867e00609900e437E2c0
  function:  approve(address spender, uint256 amount)
  args:             (0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506, 115792089237316195423570985008687907853269984665640564039457584007913129639935)
  sender:    0xb73748B4B64d779245D07A0CF3DBB141dda2bbB6

Docs: https://viem.sh/docs/contract/writeContract
Details: Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559
Version: [email protected]
    at getContractError (chunk-R3CD25VM.js?v=1b2730eb:1104:10)
    at writeContract.internal (chunk-R3CD25VM.js?v=1b2730eb:2443:13)
    at async onHandleApprove (App.tsx:97:20)Caused by: TransactionExecutionError: Invalid parameters were provided to the RPC method.
Double check you have provided the correct parameters.

Request Arguments:
  from:                  0xb73748B4B64d779245D07A0CF3DBB141dda2bbB6
  to:                    0x3111C94B9243a8A99D5A867e00609900e437E2c0
  data:                  0x095ea7b30000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
  gas:                   46874
  maxFeePerGas:          0.003197051 gwei
  maxPriorityFeePerGas:  0.000000069 gwei

Details: Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559
Version: [email protected]
    at getTransactionError (chunk-R3CD25VM.js?v=1b2730eb:2267:10)
    at sendTransaction (chunk-R3CD25VM.js?v=1b2730eb:2410:11)
    at async writeContract.internal (chunk-R3CD25VM.js?v=1b2730eb:2436:14)
    at async onHandleApprove (App.tsx:97:20)Caused by: InvalidParamsRpcError: Invalid parameters were provided to the RPC method.
Double check you have provided the correct parameters.

Details: Invalid transaction params: params specify an EIP-1559 transaction but the current network does not support EIP-1559
Version: [email protected]

Detection stage

In production (default)

Version

13.7.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

DEMO REPO
https://github.com/Pasha8914/metamask-switch-account-issue

The error remains until you click on the MetaMask extension icon (which forces an internal refresh).
After that, transactions work as expected.

Severity

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions