mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
trezor.wire: fix unexpected message error
This commit is contained in:
parent
943d77ba32
commit
e86924d645
@ -148,8 +148,9 @@ def _handle_unexpected(session_id, msg_type, data_len):
|
||||
from trezor.messages.Failure import Failure
|
||||
from trezor.messages.FailureType import UnexpectedMessage
|
||||
failure = Failure(code=UnexpectedMessage, message='Unexpected message')
|
||||
failure = Failure.dumps(failure)
|
||||
sessions.get_codec(session_id).encode(
|
||||
session_id, failure.MESSAGE_WIRE_TYPE, failure.dumps(), _write_report)
|
||||
session_id, Failure.MESSAGE_WIRE_TYPE, failure, _write_report)
|
||||
|
||||
|
||||
def _write_report(report):
|
||||
|
Loading…
Reference in New Issue
Block a user