1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 21:22:10 +00:00

common: introduce ButtonRequestType.PinEntry

This commit is contained in:
matejcik 2020-05-25 15:23:23 +02:00 committed by matejcik
parent e9555a3b0a
commit bbfce4e303
5 changed files with 7 additions and 4 deletions

View File

@ -68,6 +68,7 @@ message ButtonRequest {
ButtonRequest_Success = 17;
ButtonRequest_Warning = 18;
ButtonRequest_PassphraseEntry = 19;
ButtonRequest_PinEntry = 20;
}
}

View File

@ -6,7 +6,7 @@ if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
except ImportError:
pass
@ -23,5 +23,5 @@ class ButtonRequest(p.MessageType):
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('code', p.EnumType("ButtonRequestType", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)), 0),
1: ('code', p.EnumType("ButtonRequestType", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)), 0),
}

View File

@ -22,3 +22,4 @@ RecoveryHomepage = 16 # type: Literal[16]
Success = 17 # type: Literal[17]
Warning = 18 # type: Literal[18]
PassphraseEntry = 19 # type: Literal[19]
PinEntry = 20 # type: Literal[20]

View File

@ -6,7 +6,7 @@ if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
EnumTypeButtonRequestType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
except ImportError:
pass
@ -23,5 +23,5 @@ class ButtonRequest(p.MessageType):
@classmethod
def get_fields(cls) -> Dict:
return {
1: ('code', p.EnumType("ButtonRequestType", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)), 0),
1: ('code', p.EnumType("ButtonRequestType", (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)), 0),
}

View File

@ -22,3 +22,4 @@ RecoveryHomepage = 16 # type: Literal[16]
Success = 17 # type: Literal[17]
Warning = 18 # type: Literal[18]
PassphraseEntry = 19 # type: Literal[19]
PinEntry = 20 # type: Literal[20]