Skip to content

fix: Add checkForPotentialDuplicates method for tx validation #514

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

httpJunkie
Copy link
Contributor

This change adds a new public method to the SmartTransactionsController that checks if a transaction would likely fail by:

  1. Checking for pending transactions with matching parameters
  2. Simulating the transaction to detect potential reverts
  3. Extracting user-friendly error messages from revert reasons

The method is designed to prevent duplicate or failing transactions from being submitted to the blockchain and works in conjunction with changes to the MetaMask extension's SmartTransactionHook.

…ction validation

This change adds a new public method to the SmartTransactionsController that
checks if a transaction would likely fail by:

1. Checking for pending transactions with matching parameters
2. Simulating the transaction to detect potential reverts
3. Extracting user-friendly error messages from revert reasons

The method is designed to prevent duplicate or failing transactions from
being submitted to the blockchain and works in conjunction with changes
to the MetaMask extension's SmartTransactionHook.
@httpJunkie httpJunkie self-assigned this May 11, 2025
@httpJunkie httpJunkie requested a review from a team as a code owner May 11, 2025 09:24
@httpJunkie httpJunkie marked this pull request as draft May 11, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant