Files
app-ethereum/src_bagl/ui_flow_getEth2PublicKey.c

56 lines
1.2 KiB
C
Raw Permalink Normal View History

2020-10-27 11:16:50 +01:00
#ifdef HAVE_ETH2
#include "shared_context.h"
#include "ui_callbacks.h"
#include "uint_common.h"
2020-10-27 11:16:50 +01:00
void prepare_eth2_public_key() {
2024-05-07 16:01:12 +02:00
array_bytes_string(strings.tmp.tmp,
sizeof(strings.tmp.tmp),
tmpCtx.publicKeyContext.publicKey.W,
48);
2020-10-27 11:16:50 +01:00
}
2020-12-01 16:20:13 +01:00
// clang-format off
2020-10-27 11:16:50 +01:00
UX_STEP_NOCB(
ux_display_public_eth2_flow_1_step,
pnn,
{
&C_icon_eye,
"Verify ETH2",
"public key",
});
UX_STEP_NOCB_INIT(
ux_display_public_eth2_flow_2_step,
bnnn_paging,
prepare_eth2_public_key(),
{
.title = "Public Key",
.text = strings.tmp.tmp,
});
UX_STEP_CB(
ux_display_public_eth2_flow_3_step,
pb,
io_seproxyhal_touch_eth2_address_ok(NULL),
{
&C_icon_validate_14,
"Approve",
});
UX_STEP_CB(
ux_display_public_eth2_flow_4_step,
pb,
io_seproxyhal_touch_address_cancel(NULL),
{
&C_icon_crossmark,
"Reject",
});
2020-12-01 16:20:13 +01:00
// clang-format on
2020-10-27 11:16:50 +01:00
UX_FLOW(ux_display_public_eth2_flow,
2020-12-01 16:20:13 +01:00
&ux_display_public_eth2_flow_1_step,
&ux_display_public_eth2_flow_2_step,
&ux_display_public_eth2_flow_3_step,
&ux_display_public_eth2_flow_4_step);
2020-10-27 11:16:50 +01:00
#endif