Expected Behavior
When I am sending a specific transaction with metamask as web3 provider nonce parameter should be honored and passed as provided because it has been intentionally specified. Example tx:
web3.eth.sendTransaction({
from: metamaskAccount,
to: destinationAccount,
value: 1000000000000000,
nonce: 5, //<= this is intentionally specified for some use cases
// like replacing underpaid transaction
gasPrice: '1000000000',
gas: '21000',
data: '0x0'
});
Actual Behavior
Unfortunately Metamask recalculates the nonce for a provided account and replaces it with recalculated one. There is also no information this parameter has been changed. This creates and broadcasts undesired transaction. Can this behaviour be changed?
Browser Used
Chrome
Operating System Used
Linux
Confirmed when using MEW's transaction replacement feature which re-uses the nonce. Accessing my wallet using a local version of MEW with the mnemonic solved my problem because it avoided metamask all together
I've made a fix above (just 6 lines of code changed). Please someone check it and merge soon if possible - that's a real hot issue now
@vicnaum can you open a pull request and reference this issue?
@Shrugs I guess it's already merged to master in #2699
Most helpful comment
@Shrugs I guess it's already merged to master in #2699