From 555b56181e75b891438520e0a22de28bc89d82ba Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sun, 25 May 2014 18:32:12 +0200 Subject: [PATCH] use button confirmation for loaddevice --- firmware/fsm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firmware/fsm.c b/firmware/fsm.c index 1976a8645e..9cc26c3141 100644 --- a/firmware/fsm.c +++ b/firmware/fsm.c @@ -281,6 +281,13 @@ void fsm_msgLoadDevice(LoadDevice *msg) return; } + layoutDialogSwipe(DIALOG_ICON_QUESTION, "Cancel", "I take the risk", NULL, "Loading private seed", "is not recommended.", "Continue only if you", "know what you are", "doing!", NULL); + if (!protectButton(ButtonRequestType_ButtonRequest_ProtectCall, false)) { + fsm_sendFailure(FailureType_Failure_ActionCancelled, "Load cancelled"); + layoutHome(); + return; + } + storage_loadDevice(msg); storage_commit(); fsm_sendSuccess("Device loaded");