|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
|
|
import storage.device
|
|
|
|
|
from trezor import io, loop, utils, wire
|
|
|
|
|
from trezor.messages import RebootToBootloader, Success
|
|
|
|
|
from trezor.ui.layouts import confirm_action
|
|
|
|
@ -11,6 +12,9 @@ if TYPE_CHECKING:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def reboot_to_bootloader(ctx: wire.Context, msg: RebootToBootloader) -> NoReturn:
|
|
|
|
|
if not storage.device.get_experimental_features():
|
|
|
|
|
raise wire.UnexpectedMessage("Experimental features are not enabled")
|
|
|
|
|
|
|
|
|
|
await confirm_action(
|
|
|
|
|
ctx,
|
|
|
|
|
"reboot",
|
|
|
|
|