Made the hacky 712 generic step redraw a function
This commit is contained in:
@@ -66,6 +66,16 @@ void ui_712_set_value(const char *const str, uint8_t length)
|
||||
ui_712_set_buf(str, length, strings.tmp.tmp, sizeof(strings.tmp.tmp), true);
|
||||
}
|
||||
|
||||
void ui_712_redraw_generic_step(void)
|
||||
{
|
||||
// not pretty, manually changes the internal state of the UX flow
|
||||
// so that we always land on the first screen of a paging step without any visible
|
||||
// screen glitching (quick screen switching)
|
||||
G_ux.flow_stack[G_ux.stack_count - 1].index = 0;
|
||||
// since the flow now thinks we are displaying the first step, do next
|
||||
ux_flow_next();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on the intermediate dummy screen between the dynamic step
|
||||
* && the approve/reject screen
|
||||
@@ -265,13 +275,7 @@ void ui_712_new_field(const void *const field_ptr, const uint8_t *const data,
|
||||
default:
|
||||
PRINTF("Unhandled type\n");
|
||||
}
|
||||
|
||||
// not pretty, manually changes the internal state of the UX flow
|
||||
// so that we always land on the first screen of a paging step without any visible
|
||||
// screen glitching (quick screen switching)
|
||||
G_ux.flow_stack[G_ux.stack_count - 1].index = 0;
|
||||
// since the flow now thinks we are displaying the first step, do next
|
||||
ux_flow_next();
|
||||
ui_712_redraw_generic_step();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ void ui_712_set_value(const char *const str, uint8_t length);
|
||||
#ifdef HAVE_EIP712_HALF_BLIND
|
||||
void ui_712_message_hash(void);
|
||||
#endif // HAVE_EIP712_HALF_BLIND
|
||||
void ui_712_redraw_generic_step(void);
|
||||
|
||||
#endif // HAVE_EIP712_FULL_SUPPORT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user