diff --git a/Makefile b/Makefile index 25b86828..0bf36954 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/src_nbgl/ui_get_eth2_public_key.c b/src_nbgl/ui_get_eth2_public_key.c index 541419b6..b6f98236 100644 --- a/src_nbgl/ui_get_eth2_public_key.c +++ b/src_nbgl/ui_get_eth2_public_key.c @@ -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) { diff --git a/src_nbgl/ui_get_public_key.c b/src_nbgl/ui_get_public_key.c index eded31cb..51307d01 100644 --- a/src_nbgl/ui_get_public_key.c +++ b/src_nbgl/ui_get_public_key.c @@ -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(); } \ No newline at end of file