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

The composer should throw a helpful error message on duplicate transactions #366

Open
joe-p opened this issue Jan 6, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@joe-p
Copy link
Contributor

joe-p commented Jan 6, 2025

Problem

If a developer tries to send multiple of the same transactions in the same group the group will get rejected because of duplicate transactions. This is exasperated by the caching of suggestedParams (which is largely a good change) which might be non-obvious to developers who are used to each txn getting new suggestedParams (thus different fv/lv).

For example:

appClient
        .newGroup()
        .gas({ args: {}})
        .gas({ args: {}})
        .gas({ args: {}})
        .gas({ args: {}})

Solution

Proposal

If the composer detects multiple transactions in the same group it should throw an error with a descriptive error message of what happened. This error message should mention cached params, how to invalidate the cache, and/or how to use txn fields to make transactions unique.

Pros and Cons

Non breaking change with a more descriptive error message

Dependencies

None

@joe-p joe-p changed the title The composer should throw an helpful error message on duplicate transactions The composer should throw a helpful error message on duplicate transactions Jan 7, 2025
@robdmoore robdmoore added the enhancement New feature or request label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants