Merge remote-tracking branch 'origin/develop' into HEAD

This commit is contained in:
Alexandre Paillier
2022-09-14 17:27:25 +02:00
61 changed files with 505 additions and 72 deletions

View File

@@ -3,8 +3,9 @@
#include "shared_context.h"
#include "apdu_constants.h"
#include "ui_flow.h"
#include "feature_getEth2PublicKey.h"
#include "common_ui.h"
#include "os_io_seproxyhal.h"
static const uint8_t BLS12_381_FIELD_MODULUS[] = {
0x1a, 0x01, 0x11, 0xea, 0x39, 0x7f, 0xe6, 0x9a, 0x4b, 0x1b, 0xa7, 0xb6, 0x43, 0x4b, 0xac, 0xd7,
@@ -75,7 +76,7 @@ void handleGetEth2PublicKey(uint8_t p1,
}
#ifndef NO_CONSENT
else {
ux_flow_init(0, ux_display_public_eth2_flow, NULL);
ui_display_public_eth2();
*flags |= IO_ASYNCH_REPLY;
}

View File

@@ -1,51 +0,0 @@
#ifdef HAVE_ETH2
#include "shared_context.h"
#include "ui_callbacks.h"
void prepare_eth2_public_key() {
snprintf(strings.tmp.tmp, 100, "0x%.*H", 48, tmpCtx.publicKeyContext.publicKey.W);
}
// clang-format off
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",
});
// clang-format on
UX_FLOW(ux_display_public_eth2_flow,
&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);
#endif