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

Fix transaction sender methods and error handling #167

Merged

Conversation

Rudy-Perrin
Copy link
Contributor

This pull request fixes several issues in the TransactionSender class and improves error handling. The changes include:

  • Updating the send method in ExtendedTransactionBuilder to make the confirmationThreshold and timeout parameters optional.

  • Removing an unnecessary return statement in the TransactionSender constructor.

  • Fixing error handling by throwing an Error object instead of a string.

  • Fixing a destructuring assignment in the send method.

The "confirmationThreshold" and "timeout" parameters are already configured by default in transaction_sender which makes them optional here.
It's better to throw an error object because this provides more information about the error, including a stack trace, which can help with debugging.
Destructuring assignment unnecessarily renamed
@samuelmanzanera samuelmanzanera merged commit 1538cb4 into archethic-foundation:develop Dec 6, 2023
3 checks passed
@samuelmanzanera samuelmanzanera added quality Improve code quality external-contribution Contribution by non core team labels Dec 6, 2023
@Rudy-Perrin Rudy-Perrin deleted the transaction branch December 6, 2023 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contribution Contribution by non core team quality Improve code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants