Allows refreshing latest nonce for account
Closed this issue · 1 comments
Describe the bug
I imported my Conflux Portal account to another wallet and then sent some transactions using that wallet. Now I am unable to send transactions using Conflux Portal as it keeps using the wrong nonce.
Error: [ethjs-rpc] rpc error with payload {"id":6586377503059,"jsonrpc":"2.0","params":["0xf873ef1c028322162c948b017126d2fede908a86b36b43969f17d25f3770888ac7230489e80000808378f66b0284a6f2ae3a01a0a35dbc12f780e07c0d71939054781a0cad2af8c877fe761efbbb7628d4ee2b95a074144ea1526e5211e57c5d31423ae50d3ac631e27271fc9693e6b7ebb0c4b01b"],"method":"eth_sendRawTransaction"} {"code":-32603,"message":"Invalid parameters: tx","data":"\"Failed imported to deferred pool: Tx with same nonce already inserted. To replace it, you need to specify a gas price > 100\"","stack":"Error: Invalid parameters: tx\n at s (chrome-extension://opafkgfpaamecojfkaialabagfofilmg/background.js:1:315126)\n at Object.internal (chrome-extension://opafkgfpaamecojfkaialabagfofilmg/background.js:1:315515)\n at f (chrome-extension://opafkgfpaamecojfkaialabagfofilmg/background.js:1:310750)\n at chrome-extension://opafkgfpaamecojfkaialabagfofilmg/background.js:1:309961"}
Conflux Portal seems to use nonce 28. But, according to Conflux Scan, next nonce should be 33. (Please refer to the screenshots below.)
To Reproduce (REQUIRED)
- Create an account using Conflux Portal.
- Export the private key and use it to send some transactions, e.g. using the Node.js SDK.
- Try to send transactions using Conflux Portal.
Expected behavior
Conflux Portal should have an option to fetch the next nonce using cfx_getNextNonce
if necessary. Now, under Settings/Advanced, there's only an option to reset the nonce to 0, but that does not help.
Screenshots
Browser details (please complete the following information):
- OS: OS X
- Browser: Brave Version 1.14.81 Chromium: 85.0.4183.102 (Official Build) (64-bit)
- ConfluxPortal v0.3.11
Additional context (Error Messages, etc.)
I think this behavior is inherited from MetaMask. However, this workaround (changing networks) does not work on Conflux Portal.
My bad, Portal is actually using the correct nonce, I had to increase the gas price.