Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
chcmedeiros committed Jan 15, 2025
1 parent 57ae473 commit 91562dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/swap/handle_sign_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ 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)) {
if ((app_mode_expert() && ctx_parsed_tx->tx_obj->tx_json.num_items != EXPERT_MODE_ITEMS) || (!app_mode_expert() && ctx_parsed_tx->tx_obj->tx_json.num_items != NORMAL_MODE_ITEMS)) {
return parser_unexpected_error;
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/swap/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#define ADDRESS_MAXSIZE 50
#define MEMO_MAXSIZE 50
#define EXPERT_MODE_ITEMS 10
#define NORMAL_MODE_ITEMS 6
typedef struct {
uint8_t amount[COIN_AMOUNT_MAXSIZE];
uint8_t amount_length;
Expand Down

0 comments on commit 91562dc

Please sign in to comment.