Skip to content

Commit

Permalink
fix(legacy): fix OK-23319 & OK-23317 & OK-23311 (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyxyx authored Sep 15, 2023
1 parent 7779516 commit d38a468
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions legacy/firmware/protect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,9 @@ bool inputPassphraseOnDevice(char *passphrase) {
if (key == KEY_CONFIRM) {
layoutInputMethod(input_type);
menu_status = MENU_INPUT_SELECT;
#if !EMULATOR
enableLongPress(false);
#endif
goto wait_key;
}
}
Expand Down Expand Up @@ -1546,6 +1549,9 @@ bool inputPassphraseOnDevice(char *passphrase) {
symbol_index = 0;
index = symbol_table[symbol_index];
}
#if !EMULATOR
enableLongPress(true);
#endif
goto input_passphrase;
default:
break;
Expand Down Expand Up @@ -1589,6 +1595,7 @@ bool protectPassphraseOnDevice(char *passphrase) {
if (msg_tiny_id == MessageType_MessageType_ButtonAck) {
msg_tiny_id = 0xFFFF;
result = true;
timeout_flag = false;
break;
}

Expand Down
2 changes: 1 addition & 1 deletion legacy/firmware/protob/messages-cosmos.options
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ CosmosGetAddress.hrp max_size:32
CosmosAddress.address max_size:65

CosmosSignTx.address_n max_count:8
CosmosSignTx.raw_tx max_size:2048
CosmosSignTx.raw_tx max_size:4096

CosmosSignedTx.signature max_size:64
8 changes: 8 additions & 0 deletions legacy/firmware/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ static void select_complete_word(char *title, int start, int len) {
uint8_t key = KEY_NULL;
int index = 0;

#if !EMULATOR
enableLongPress(false);
#endif

refresh_menu:
layoutItemsSelectAdapterWords(
&bmp_bottom_middle_arrow_up, &bmp_bottom_middle_arrow_down,
Expand Down Expand Up @@ -720,6 +724,10 @@ static void select_complete_word(char *title, int start, int len) {
default:
break;
}

#if !EMULATOR
enableLongPress(true);
#endif
}

static uint8_t recovery_check_words(void) {
Expand Down

0 comments on commit d38a468

Please sign in to comment.