U2F keys on internal storage

This commit is contained in:
Willy-JL
2023-04-13 05:27:53 +01:00
parent b84adc9d96
commit cab614ba4e
3 changed files with 14 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
#include "u2f_data.h"
#include <furi.h>
#include <furi_hal.h>
#include <storage/storage.h>
static bool u2f_app_custom_event_callback(void* context, uint32_t event) {
furi_assert(context);
@@ -27,6 +28,11 @@ U2fApp* u2f_app_alloc() {
app->gui = furi_record_open(RECORD_GUI);
app->notifications = furi_record_open(RECORD_NOTIFICATION);
Storage* storage = furi_record_open(RECORD_STORAGE);
storage_common_copy(storage, U2F_CNT_OLD_FILE, U2F_CNT_FILE);
storage_common_copy(storage, U2F_KEY_OLD_FILE, U2F_KEY_FILE);
furi_record_close(RECORD_STORAGE);
app->view_dispatcher = view_dispatcher_alloc();
app->scene_manager = scene_manager_alloc(&u2f_scene_handlers, app);
view_dispatcher_enable_queue(app->view_dispatcher);