diff --git a/common/protob/messages-management.proto b/common/protob/messages-management.proto index 2e4caa981..bf19c94f4 100644 --- a/common/protob/messages-management.proto +++ b/common/protob/messages-management.proto @@ -87,6 +87,7 @@ message Features { optional BackupType backup_type = 31; // type of device backup (BIP-39 / SLIP-39 basic / SLIP-39 advanced) optional bool sd_card_present = 32; // is SD card present optional bool sd_protection = 33; // is SD Protect enabled + optional bool wipe_code_protection = 34; // is wipe code protection enabled } /** diff --git a/core/src/apps/homescreen/__init__.py b/core/src/apps/homescreen/__init__.py index d86862067..59669706e 100644 --- a/core/src/apps/homescreen/__init__.py +++ b/core/src/apps/homescreen/__init__.py @@ -70,6 +70,7 @@ def get_features() -> Features: ] f.sd_card_present = io.SDCard().present() f.sd_protection = storage.sd_salt.is_enabled() + f.wipe_code_protection = config.has_wipe_code() return f diff --git a/core/src/trezor/messages/Features.py b/core/src/trezor/messages/Features.py index ed38304d2..17586cc24 100644 --- a/core/src/trezor/messages/Features.py +++ b/core/src/trezor/messages/Features.py @@ -49,6 +49,7 @@ class Features(p.MessageType): backup_type: EnumTypeBackupType = None, sd_card_present: bool = None, sd_protection: bool = None, + wipe_code_protection: bool = None, ) -> None: self.vendor = vendor self.major_version = major_version @@ -82,6 +83,7 @@ class Features(p.MessageType): self.backup_type = backup_type self.sd_card_present = sd_card_present self.sd_protection = sd_protection + self.wipe_code_protection = wipe_code_protection @classmethod def get_fields(cls) -> Dict: @@ -118,4 +120,5 @@ class Features(p.MessageType): 31: ('backup_type', p.EnumType("BackupType", (0, 1, 2)), 0), 32: ('sd_card_present', p.BoolType, 0), 33: ('sd_protection', p.BoolType, 0), + 34: ('wipe_code_protection', p.BoolType, 0), } diff --git a/python/src/trezorlib/messages/Features.py b/python/src/trezorlib/messages/Features.py index 4e355e50e..23720aa22 100644 --- a/python/src/trezorlib/messages/Features.py +++ b/python/src/trezorlib/messages/Features.py @@ -49,6 +49,7 @@ class Features(p.MessageType): backup_type: EnumTypeBackupType = None, sd_card_present: bool = None, sd_protection: bool = None, + wipe_code_protection: bool = None, ) -> None: self.vendor = vendor self.major_version = major_version @@ -82,6 +83,7 @@ class Features(p.MessageType): self.backup_type = backup_type self.sd_card_present = sd_card_present self.sd_protection = sd_protection + self.wipe_code_protection = wipe_code_protection @classmethod def get_fields(cls) -> Dict: @@ -118,4 +120,5 @@ class Features(p.MessageType): 31: ('backup_type', p.EnumType("BackupType", (0, 1, 2)), 0), 32: ('sd_card_present', p.BoolType, 0), 33: ('sd_protection', p.BoolType, 0), + 34: ('wipe_code_protection', p.BoolType, 0), }