stax: add UI implementation
This commit is contained in:
committed by
Alexandre Paillier
parent
b275067f47
commit
be029c642d
30
src_nbgl/ui_get_eth2_public_key.c
Normal file
30
src_nbgl/ui_get_eth2_public_key.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <nbgl_page.h>
|
||||
#include "shared_context.h"
|
||||
#include "ui_callbacks.h"
|
||||
#include "ui_nbgl.h"
|
||||
|
||||
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) {
|
||||
// display a status page and go back to main
|
||||
nbgl_useCaseStatus("ADDRESS\nVERIFIED", true, confirmTransation);
|
||||
} else {
|
||||
nbgl_useCaseStatus("Address verification\ncancelled", false, reviewReject);
|
||||
}
|
||||
}
|
||||
|
||||
static void buildScreen(void) {
|
||||
snprintf(strings.tmp.tmp, 100, "0x%.*H", 48, tmpCtx.publicKeyContext.publicKey.W);
|
||||
nbgl_useCaseAddressConfirmation(strings.tmp.tmp, reviewChoice);
|
||||
}
|
||||
|
||||
void ui_display_public_eth2(void) {
|
||||
buildScreen();
|
||||
}
|
||||
Reference in New Issue
Block a user