stax: fix verify address

This commit is contained in:
Clement Bouvet
2023-02-07 18:05:56 +01:00
parent 16ed1d5f50
commit 91dc066129
3 changed files with 13 additions and 23 deletions
+1
View File
@@ -114,6 +114,7 @@ endif
ifeq ($(TARGET_NAME),TARGET_FATSTACKS)
DEFINES += HAVE_NBGL
DEFINES += NBGL_QRCODE
else
DEFINES += HAVE_BAGL
ifeq ($(TARGET_NAME),TARGET_NANOS)
+6 -11
View File
@@ -15,22 +15,17 @@ static void confirmTransation(void) {
static void reviewChoice(bool confirm) {
if (confirm) {
confirmTransation();
} else {
reviewReject();
// 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_useCaseChoice(
&C_warning64px,
"Export ETH2 public key?",
"Allow the Ethereum app\nto export your ETH2\npublic key.",
"Allow",
"Don't allow",
reviewChoice
);
nbgl_useCaseAddressConfirmation(strings.tmp.tmp, reviewChoice);
}
void ui_display_public_eth2(void) {
+6 -12
View File
@@ -15,24 +15,18 @@ static void confirmTransation(void) {
static void reviewChoice(bool confirm) {
if (confirm) {
confirmTransation();
} else {
reviewReject();
// 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_useCaseChoice(
&C_warning64px,
"Export ETH public key?",
"Allow the Ethereum app\nto export your\npublic key.",
"Allow",
"Don't allow",
reviewChoice
);
nbgl_useCaseAddressConfirmation(strings.tmp.tmp, reviewChoice);
}
void ui_display_public_key(void) {
buildScreen();
}