-
Notifications
You must be signed in to change notification settings - Fork 109
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
Improve checks #136
Conversation
There was a problem hiding this 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)) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good ideas!
|
||
#ifdef HAVE_SWAP | ||
// Finalize the transaction with failure status | ||
finalize_exchange_sign_transaction(false); | ||
#endif |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
No description provided.