mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
common: add Feature.ShamirGroups to features
This commit is contained in:
parent
82fdf7e03d
commit
dde4c12796
@ -75,6 +75,7 @@ message Features {
|
||||
Feature_Tezos = 13;
|
||||
Feature_U2F = 14;
|
||||
Feature_Shamir = 15;
|
||||
Feature_ShamirGroups = 16;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,12 @@ def get_features() -> Features:
|
||||
f.flags = storage.device.get_flags()
|
||||
f.recovery_mode = storage.recovery.is_in_progress()
|
||||
if utils.BITCOIN_ONLY:
|
||||
f.features = [Feature.Bitcoin, Feature.Crypto, Feature.Shamir]
|
||||
f.features = [
|
||||
Feature.Bitcoin,
|
||||
Feature.Crypto,
|
||||
Feature.Shamir,
|
||||
Feature.ShamirGroups,
|
||||
]
|
||||
else:
|
||||
f.features = [
|
||||
Feature.Bitcoin,
|
||||
@ -55,6 +60,7 @@ def get_features() -> Features:
|
||||
Feature.Tezos,
|
||||
Feature.U2F,
|
||||
Feature.Shamir,
|
||||
Feature.ShamirGroups,
|
||||
]
|
||||
return f
|
||||
|
||||
|
@ -19,3 +19,4 @@ if not utils.BITCOIN_ONLY:
|
||||
Tezos = 13
|
||||
U2F = 14
|
||||
Shamir = 15
|
||||
ShamirGroups = 16
|
||||
|
@ -6,7 +6,7 @@ if __debug__:
|
||||
try:
|
||||
from typing import Dict, List, Optional
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeFeature = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||
EnumTypeFeature = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
|
||||
except ImportError:
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
EnumTypeFeature = None # type: ignore
|
||||
@ -108,5 +108,5 @@ class Features(p.MessageType):
|
||||
27: ('unfinished_backup', p.BoolType, 0),
|
||||
28: ('no_backup', p.BoolType, 0),
|
||||
29: ('recovery_mode', p.BoolType, 0),
|
||||
30: ('features', p.EnumType("Feature", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)), p.FLAG_REPEATED),
|
||||
30: ('features', p.EnumType("Feature", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)), p.FLAG_REPEATED),
|
||||
}
|
||||
|
@ -15,3 +15,4 @@ Stellar = 12
|
||||
Tezos = 13
|
||||
U2F = 14
|
||||
Shamir = 15
|
||||
ShamirGroups = 16
|
||||
|
@ -6,7 +6,7 @@ if __debug__:
|
||||
try:
|
||||
from typing import Dict, List, Optional
|
||||
from typing_extensions import Literal # noqa: F401
|
||||
EnumTypeFeature = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
||||
EnumTypeFeature = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
|
||||
except ImportError:
|
||||
Dict, List, Optional = None, None, None # type: ignore
|
||||
EnumTypeFeature = None # type: ignore
|
||||
@ -108,5 +108,5 @@ class Features(p.MessageType):
|
||||
27: ('unfinished_backup', p.BoolType, 0),
|
||||
28: ('no_backup', p.BoolType, 0),
|
||||
29: ('recovery_mode', p.BoolType, 0),
|
||||
30: ('features', p.EnumType("Feature", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)), p.FLAG_REPEATED),
|
||||
30: ('features', p.EnumType("Feature", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)), p.FLAG_REPEATED),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user