Merge remote-tracking branch 'origin/develop' into HEAD
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
#include "shared_context.h"
|
||||
#include "apdu_constants.h"
|
||||
#include "stark_utils.h"
|
||||
#include "ui_flow.h"
|
||||
#include "ui_callbacks.h"
|
||||
#include "common_ui.h"
|
||||
#include "os_io_seproxyhal.h"
|
||||
|
||||
void handleStarkwareUnsafeSign(uint8_t p1,
|
||||
uint8_t p2,
|
||||
@@ -47,7 +47,7 @@ void handleStarkwareUnsafeSign(uint8_t p1,
|
||||
explicit_bzero(privateKeyData, sizeof(privateKeyData));
|
||||
io_seproxyhal_io_heartbeat();
|
||||
memmove(dataContext.starkContext.w1, publicKey.W + 1, 32);
|
||||
ux_flow_init(0, ux_stark_unsafe_sign_flow, NULL);
|
||||
ui_stark_unsafe_sign();
|
||||
|
||||
*flags |= IO_ASYNCH_REPLY;
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
#ifdef HAVE_STARKWARE
|
||||
|
||||
#include "shared_context.h"
|
||||
#include "ui_callbacks.h"
|
||||
|
||||
unsigned int io_seproxyhal_touch_stark_unsafe_sign_ok(const bagl_element_t *e);
|
||||
|
||||
void stark_unsafe_sign_display_account() {
|
||||
snprintf(strings.tmp.tmp, sizeof(strings.tmp.tmp), "0x%.*H", 32, dataContext.starkContext.w1);
|
||||
}
|
||||
|
||||
void stark_unsafe_sign_display_hash() {
|
||||
snprintf(strings.tmp.tmp, sizeof(strings.tmp.tmp), "0x%.*H", 32, dataContext.starkContext.w2);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
UX_STEP_NOCB(ux_stark_unsafe_sign_1_step,
|
||||
pnn,
|
||||
{
|
||||
&C_icon_warning,
|
||||
"Unsafe",
|
||||
"Stark Sign",
|
||||
});
|
||||
|
||||
UX_STEP_NOCB_INIT(
|
||||
ux_stark_unsafe_sign_2_step,
|
||||
bnnn_paging,
|
||||
stark_unsafe_sign_display_account(),
|
||||
{
|
||||
.title = "From Account",
|
||||
.text = strings.tmp.tmp
|
||||
});
|
||||
|
||||
UX_STEP_NOCB_INIT(
|
||||
ux_stark_unsafe_sign_3_step,
|
||||
bnnn_paging,
|
||||
stark_unsafe_sign_display_hash(),
|
||||
{
|
||||
.title = "Hash",
|
||||
.text = strings.tmp.tmp
|
||||
});
|
||||
|
||||
|
||||
UX_STEP_CB(
|
||||
ux_stark_unsafe_sign_4_step,
|
||||
pbb,
|
||||
io_seproxyhal_touch_stark_unsafe_sign_ok(NULL),
|
||||
{
|
||||
&C_icon_validate_14,
|
||||
"Accept",
|
||||
"and send",
|
||||
});
|
||||
UX_STEP_CB(
|
||||
ux_stark_unsafe_sign_5_step,
|
||||
pb,
|
||||
io_seproxyhal_touch_tx_cancel(NULL),
|
||||
{
|
||||
&C_icon_crossmark,
|
||||
"Reject",
|
||||
});
|
||||
// clang-format on
|
||||
|
||||
UX_FLOW(ux_stark_unsafe_sign_flow,
|
||||
&ux_stark_unsafe_sign_1_step,
|
||||
&ux_stark_unsafe_sign_2_step,
|
||||
&ux_stark_unsafe_sign_3_step,
|
||||
&ux_stark_unsafe_sign_4_step,
|
||||
&ux_stark_unsafe_sign_5_step);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user