2023-02-21 11:01:18 +01:00
|
|
|
#include <nbgl_page.h>
|
|
|
|
|
#include "shared_context.h"
|
|
|
|
|
#include "ui_callbacks.h"
|
|
|
|
|
#include "ui_nbgl.h"
|
2024-04-12 16:40:05 +02:00
|
|
|
#include "uint_common.h"
|
2023-02-21 11:01:18 +01:00
|
|
|
|
|
|
|
|
static void reviewReject(void) {
|
|
|
|
|
io_seproxyhal_touch_address_cancel(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void confirmTransation(void) {
|
|
|
|
|
io_seproxyhal_touch_address_ok(NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void reviewChoice(bool confirm) {
|
|
|
|
|
if (confirm) {
|
2024-04-09 18:52:28 +02:00
|
|
|
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_VERIFIED, confirmTransation);
|
2023-02-21 11:01:18 +01:00
|
|
|
} else {
|
2024-04-09 18:52:28 +02:00
|
|
|
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED, reviewReject);
|
2023-02-21 11:01:18 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-09 18:52:28 +02:00
|
|
|
void ui_display_public_eth2(void) {
|
2024-04-12 16:40:05 +02:00
|
|
|
bytes_to_string(strings.tmp.tmp,
|
|
|
|
|
sizeof(strings.tmp.tmp),
|
|
|
|
|
tmpCtx.publicKeyContext.publicKey.W,
|
|
|
|
|
48);
|
2024-04-09 18:52:28 +02:00
|
|
|
strlcpy(g_stax_shared_buffer, "Verify ETH2\naddress", sizeof(g_stax_shared_buffer));
|
|
|
|
|
nbgl_useCaseAddressReview(strings.tmp.tmp,
|
|
|
|
|
NULL,
|
|
|
|
|
get_app_icon(false),
|
|
|
|
|
g_stax_shared_buffer,
|
|
|
|
|
NULL,
|
|
|
|
|
reviewChoice);
|
2024-03-18 17:28:51 +01:00
|
|
|
}
|