Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make transaction approval screen aware of pending transactions #27029

Open
onyb opened this issue Nov 29, 2022 · 1 comment
Open

Make transaction approval screen aware of pending transactions #27029

onyb opened this issue Nov 29, 2022 · 1 comment
Labels
feature/web3/wallet/core feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains.

Comments

@onyb
Copy link
Member

onyb commented Nov 29, 2022

Community posts:

The transaction approval screen must be aware of pending transactions stuck in the mempool, and be able to display recommendations to the user based on the nonce values of those pending transactions. For example, one recommendation could be to adjust the gas settings in a manner that evicts the pending transactions with the same nonce values.

There seems to be an RPC method that we can use for this: web3.eth.getPendingTransactions([, callback])

Not to be confused with unapproved "pending" transactions in Brave Wallet.

@onyb onyb added feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop labels Nov 29, 2022
@HEagle18 HEagle18 added the priority/P3 The next thing for us to work on. It'll ride the trains. label Dec 2, 2022
@darkdh
Copy link
Member

darkdh commented Mar 31, 2023

Or we can do eth_getTransactionCount with pending as we currently use latest in nonce tracker.

"latest" - String: The latest block (current head of the blockchain)
"pending" - String: The currently mined block (including pending transactions)

And our nonce tracker now only considers local pending transactions(submitted) so the issue can easily happen when sending transactions which will get stuck in mempool between different devices.

With eth_getTransactionCount + pending, there will only be core changes because core will make sure nonce field is properly filled before signing and publishing so it won't get error of conflicting with nonce of pending transactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/web3/wallet/core feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains.
Projects
Status: Backlog
Development

No branches or pull requests

4 participants