Skip to content

Commit 0529211

Browse files
Fix EIP-191 on long messages
1 parent 06a731f commit 0529211

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src_nbgl/ui_sign_message.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static bool ui_191_update_display_buffer(void) {
5656
false);
5757
#else // SCREEN_SIZE_WALLET
5858
len = strlen(g_stax_shared_buffer);
59-
reached = (strlen(UI_191_BUFFER) - len) > 0;
59+
reached = (g_rcv_buffer_idx == 0);
6060
#endif // SCREEN_SIZE_WALLET
6161
g_rcv_buffer_idx += (len - g_display_buffer_idx);
6262
g_display_buffer_idx = len;
@@ -168,6 +168,10 @@ void ui_191_switch_to_message(void) {
168168

169169
void ui_191_switch_to_sign(void) {
170170
g_action = UI_191_ACTION_GO_TO_SIGN;
171+
#ifndef SCREEN_SIZE_WALLET
172+
// For Nano, if we're here the entire message has already been reviewed, so force skip
173+
g_skipped = true;
174+
#endif
171175
if (g_skipped) {
172176
ui_191_process_state();
173177
} else if (g_display_buffer_idx > 0) {

0 commit comments

Comments
 (0)