1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

use button confirmation for loaddevice

This commit is contained in:
Pavol Rusnak 2014-05-25 18:32:12 +02:00
parent d7169a342c
commit 555b56181e

View File

@ -281,6 +281,13 @@ void fsm_msgLoadDevice(LoadDevice *msg)
return; 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_loadDevice(msg);
storage_commit(); storage_commit();
fsm_sendSuccess("Device loaded"); fsm_sendSuccess("Device loaded");