mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 16:00:57 +00:00
common: restore PassphraseAck.state
This commit is contained in:
parent
d7b9582386
commit
b916072389
@ -120,7 +120,7 @@ message PassphraseRequest {
|
||||
*/
|
||||
message PassphraseAck {
|
||||
optional string passphrase = 1;
|
||||
// optional bytes state = 2; DEPRECATED since 2.3.0
|
||||
optional bytes _state = 2 [deprecated=true]; // <2.3.0
|
||||
optional bool on_device = 3; // user wants to enter passphrase on the device
|
||||
}
|
||||
|
||||
|
@ -16,14 +16,17 @@ class PassphraseAck(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
passphrase: str = None,
|
||||
_state: bytes = None,
|
||||
on_device: bool = None,
|
||||
) -> None:
|
||||
self.passphrase = passphrase
|
||||
self._state = _state
|
||||
self.on_device = on_device
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('passphrase', p.UnicodeType, 0),
|
||||
2: ('_state', p.BytesType, 0),
|
||||
3: ('on_device', p.BoolType, 0),
|
||||
}
|
||||
|
@ -43,6 +43,8 @@ The gist of the changes is:
|
||||
- `PassphraseRequest.on_device` was deprecated, and renamed to `_on_device`. New Devices
|
||||
will never send this field.
|
||||
- Corresponding field `PassphraseAck.on_device` was added.
|
||||
- `PassphraseAck.state` was deprecated, and renamed to `_state`. It is retained for
|
||||
code compatibility, but the field should never be set.
|
||||
- `PassphraseStateRequest`/`PassphraseStateAck` messages were deprecated, and renamed
|
||||
with a `Deprecated_` prefix. New Devices will not send or accept these messages.
|
||||
- `Initialize.state` was renamed to `Initialize.session_id`.
|
||||
|
@ -6,6 +6,7 @@ PinMatrixAck.pin max_size:10
|
||||
|
||||
PassphraseAck.passphrase max_size:51
|
||||
|
||||
PassphraseAck._state max_size:1
|
||||
Deprecated_PassphraseStateRequest.state max_size:1
|
||||
|
||||
HDNodeType.chain_code max_size:32
|
||||
|
@ -16,14 +16,17 @@ class PassphraseAck(p.MessageType):
|
||||
def __init__(
|
||||
self,
|
||||
passphrase: str = None,
|
||||
_state: bytes = None,
|
||||
on_device: bool = None,
|
||||
) -> None:
|
||||
self.passphrase = passphrase
|
||||
self._state = _state
|
||||
self.on_device = on_device
|
||||
|
||||
@classmethod
|
||||
def get_fields(cls) -> Dict:
|
||||
return {
|
||||
1: ('passphrase', p.UnicodeType, 0),
|
||||
2: ('_state', p.BytesType, 0),
|
||||
3: ('on_device', p.BoolType, 0),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user