unleashed-firmware/applications/plugins/totp/services/cli/cli_helpers.c
MX 677de32026
Revert TOTP changes
"Preload failed, invalid file"
2022-11-03 00:41:17 +03:00

22 lines
No EOL
617 B
C

#include "cli_helpers.h"
#include <cli/cli.h>
bool totp_cli_ensure_authenticated(PluginState* plugin_state, Cli* cli) {
if(plugin_state->current_scene == TotpSceneAuthentication) {
TOTP_CLI_PRINTF("Pleases enter PIN on your flipper device\r\n");
while(plugin_state->current_scene == TotpSceneAuthentication &&
!cli_cmd_interrupt_received(cli)) {
furi_delay_ms(100);
}
TOTP_CLI_DELETE_LAST_LINE();
fflush(stdout);
if(plugin_state->current_scene == TotpSceneAuthentication) {
return false;
}
}
return true;
}