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

Improve checks #136

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Improve checks #136

merged 3 commits into from
Jan 15, 2025

Conversation

chcmedeiros
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@emmanuelm41 emmanuelm41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, but left this approved

@@ -93,6 +129,10 @@ parser_error_t check_swap_conditions(parser_context_t *ctx_parsed_tx) {
char tmpKey[20] = {0};
char tmpValue[65] = {0};

if ((app_mode_expert() && ctx_parsed_tx->tx_obj->tx_json.num_items > 10) || (!app_mode_expert() && ctx_parsed_tx->tx_obj->tx_json.num_items > 6)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we convert these numbers into defines?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we have less? shouldn't it be equal signs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas!

Comment on lines -216 to -220

#ifdef HAVE_SWAP
// Finalize the transaction with failure status
finalize_exchange_sign_transaction(false);
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it needed anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added this in the last PR, but by mistake I was not running all the tests.
This time I noticed this line is closing the communication between the exchange and app-cosmos. But it leaves the app-exchange hanging, not returning the error.

@chcmedeiros chcmedeiros merged commit b45932b into dev Jan 15, 2025
32 checks passed
@chcmedeiros chcmedeiros deleted the improve-checks branch January 15, 2025 15:20
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.

2 participants