Skip to content

Commit

Permalink
fix: ensures the pin screen appears only if both PIN_HASH and PIN_KEY…
Browse files Browse the repository at this point in the history
… are set as env variables
  • Loading branch information
AllanOricil committed Apr 28, 2024
1 parent 64cbb2c commit ab1f438
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ui/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "ui.h"
#include "ui_helpers.h"
#include <string.h>

#ifdef PIN_HASH
#pragma message "PIN_HASH is set to: " PIN_HASH
Expand All @@ -14,6 +15,7 @@
#pragma message "PIN_KEY is set to: " PIN_KEY
#endif


// CUSTOM EVENTS
uint32_t LV_EVENT_SETUP_COMPLETE;

Expand Down Expand Up @@ -92,15 +94,13 @@ void ui_init(void)
ui_totp_screen_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);

if (PIN_HASH && PIN_KEY)
{
if(strcmp(PIN_HASH,"") != 0 && strcmp(PIN_KEY,"") != 0){
ui_pin_screen_screen_init();
lv_disp_load_scr(ui_pin_screen);
}
else
{
} else {
lv_disp_load_scr(ui_totp_screen);
}

}

void refresh_totp_labels()
Expand Down

0 comments on commit ab1f438

Please sign in to comment.