Hi!
I am wondering if there is a way to get the current nonce coming from MetaMask. I know you can get the current nonce from web3.eth.getTransactionCount(accountAddress)
, however I would like to specifically grab the current nonce that is calculated by MetaMask. The reason for this is using web3.eth.getTransactionCount(accountAddress)
is not accurate in the case of pending
transaction. For example,
- User A initiates a transaction, the current nonce is 5
- While the previous transaction is pending, user A initates another transaction. If I do
web3.eth.getTransactionCount(accountAddress)
, the current nonce is still 5 since the previous transaction was not confirmed. However, MetaMask knows that there was a pending transaction, and increment the nonce to 6. I would like to capture this.
The reason I would like to capture accurately the current nonce, is because my application required accurate recording of the upcoming transaction nonce (I understand MetaMask takes care of incrementing the nonce so I don’t need to worry about it, howwever I would like to be able to see the current nonce being used)
Please let me know if this is possible
Thank you!