mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
U2F keys on internal storage
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user