From d3f24f6e1729f7f4faa2fff0822526662e0193ec Mon Sep 17 00:00:00 2001 From: matejcik Date: Tue, 31 May 2022 16:10:12 +0200 Subject: [PATCH] feat(core): provisionally gate RebootToBootloader under experimental features --- core/src/apps/management/reboot_to_bootloader.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/apps/management/reboot_to_bootloader.py b/core/src/apps/management/reboot_to_bootloader.py index 94ea34e6c..1a6367728 100644 --- a/core/src/apps/management/reboot_to_bootloader.py +++ b/core/src/apps/management/reboot_to_bootloader.py @@ -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",