To Reproduce
Steps to reproduce the behavior:
Click me buttonwindow.ethereum.sendAsync({
method: 'eth_sendTransaction',
params: [{
from: acc,
to: "0x0039f22efb07a647557c7c5d17854cfd6d489ef3",
gas: {}, // provide Gas as an Object
gasPrice: "0x77359400",
value: "0x0",
data: "0x0"
}],
jsonrpc: '2.0'
}, (err, response) => {
window.alert(JSON.stringify(err))
console.log(response)
})
Expected behavior
It should not break metamask
Screenshots

Browser details (please complete the following information):
Additional context

I can't even reset the account in metamask, I can't use that account anymore. It's showstopper issue
Hi
I am new to MetaMask project and would like to work on this.
I already have a local build of MetaMask extension and I am able to reproduce the bug.
After some investigation, I found that this problem is arising because the transaction is being added in the unapprovedTxs without validation of txParams. Validation of txParams in only done in TransactionStateManager.updateTx() and not in TransactionStateManager.addTx().
Most helpful comment
Hi
I am new to MetaMask project and would like to work on this.
I already have a local build of MetaMask extension and I am able to reproduce the bug.
After some investigation, I found that this problem is arising because the transaction is being added in the
unapprovedTxswithout validation oftxParams. Validation oftxParamsin only done inTransactionStateManager.updateTx()and not inTransactionStateManager.addTx().