Provide environment information
Android 14 on Realme 10
MetaMask Android SDK Version
implementation("io.metamask.androidsdk:metamask-android-sdk:0.6.6")
MetaMask Mobile app Version
7.45.2
Android Version
14
Describe the Bug
When sending transactions using SDK metamask displays error message:
Invalid transaction envelope type: specified type "0x2" but included a gasPrice instead of maxFeePerGas and maxPriorityFeePerGas

Expected Behavior
The transaction should be successful after the user selects the "Confirm" button.

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
No response
To Reproduce
Sending transactions via metamask SDK, a few weeks ago it still worked. Recently an Invalid transaction envelope type: specified type "0x2" but included a gasPrice instead of maxFeePerGas and maxPriorityFeePerGas error message appeared. I suspect my transaction is not EIP-1559 transaction compliant and previously it worked because it was using legacy EIP.
is EventSinkMetaMask.SendRequest -> {
val (transactionData) = event
when (val result = ethereum.sendRequest(
EthereumRequest(
method = EthereumMethod.ETH_SEND_TRANSACTION.value,
params = listOf(
mapOf(
"to" to ConstUtil.ethContractAddress,
"from" to ethereum.selectedAddress,
"data" to transactionData,
)
)
)
)) {
is Result.Success.Item -> {
_uiState.update {
it.copy(isTransactionSuccess = true)
}
Log.d("MetaMaskViewModel", result.toString())
}
else -> {
Log.d("MetaMaskViewModel", result.toString())
_uiState.update {
it.copy(isTransactionSuccess = false)
}
}
}
}
I read this documentation and changed the code, but still get the error.
https://docs.metamask.io/wallet/reference/json-rpc-methods/eth_sendtransaction/
EthereumRequest(
method = EthereumMethod.ETH_SEND_TRANSACTION.value,
params = listOf(
mapOf(
"to" to ConstUtil.ethContractAddress,
"from" to ethereum.selectedAddress,
"data" to transactionData,
"maxPriorityFeePerGas" to "0x7530",
"maxFeePerGas" to "0x7530" // 30.000 gas limit
)
)
)
Provide environment information
Android 14 on Realme 10
MetaMask Android SDK Version
implementation("io.metamask.androidsdk:metamask-android-sdk:0.6.6")
MetaMask Mobile app Version
7.45.2
Android Version
14
Describe the Bug
When sending transactions using SDK metamask displays error message:
Invalid transaction envelope type: specified type "0x2" but included a gasPrice instead of maxFeePerGas and maxPriorityFeePerGas
Expected Behavior
The transaction should be successful after the user selects the "Confirm" button.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
No response
To Reproduce
Sending transactions via metamask SDK, a few weeks ago it still worked. Recently an Invalid transaction envelope type: specified type "0x2" but included a gasPrice instead of maxFeePerGas and maxPriorityFeePerGas error message appeared. I suspect my transaction is not EIP-1559 transaction compliant and previously it worked because it was using legacy EIP.
I read this documentation and changed the code, but still get the error.
https://docs.metamask.io/wallet/reference/json-rpc-methods/eth_sendtransaction/