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

Simplify tx type selection in EVM TryProcessOutTx #1837

Closed
Tracked by #1611
kevinssgh opened this issue Mar 5, 2024 · 0 comments
Closed
Tracked by #1611

Simplify tx type selection in EVM TryProcessOutTx #1837

kevinssgh opened this issue Mar 5, 2024 · 0 comments
Labels
code-quality Code quality improvement refactor zetaclient Issues related to ZetaClient

Comments

@kevinssgh
Copy link
Contributor

The logic to select which type of transaction to be signed is using a long chain of else if's. It is difficult to read or understand which tx type is being signed without analyzing each code block.

This can be simplified by extracting the conditional statements and execution into separate functions in another file. Each condition can be mapped to a const labelling the tx type or situation. In TryProcessOut a switch can be used so that the logic is clear.

@kevinssgh kevinssgh added feature:idea An early idea for a feature. Used as reference to follow new feature integrations refactor zetaclient Issues related to ZetaClient labels Mar 5, 2024
@kevinssgh kevinssgh self-assigned this Mar 5, 2024
@kevinssgh kevinssgh added code-quality Code quality improvement and removed feature:idea An early idea for a feature. Used as reference to follow new feature integrations labels Mar 5, 2024
@lumtis lumtis closed this as completed Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Code quality improvement refactor zetaclient Issues related to ZetaClient
Projects
None yet
Development

No branches or pull requests

2 participants