mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
wire: fix read_message for v1 protocol
This commit is contained in:
parent
c3ee7dd709
commit
4b0da8677a
@ -78,8 +78,12 @@ def setup():
|
|||||||
async def read_message(session_id, *exp_types):
|
async def read_message(session_id, *exp_types):
|
||||||
log.info(__name__, 'reading message of types %s', exp_types)
|
log.info(__name__, 'reading message of types %s', exp_types)
|
||||||
future = Future()
|
future = Future()
|
||||||
wire_decoder = decode_wire_stream(
|
if session_id == SESSION_V1:
|
||||||
_dispatch_and_build_protobuf, session_id, exp_types, future)
|
wire_decoder = decode_wire_v1_stream(
|
||||||
|
_dispatch_and_build_protobuf, session_id, exp_types, future)
|
||||||
|
else:
|
||||||
|
wire_decoder = decode_wire_stream(
|
||||||
|
_dispatch_and_build_protobuf, session_id, exp_types, future)
|
||||||
wire_decoder.send(None)
|
wire_decoder.send(None)
|
||||||
register_session(session_id, wire_decoder)
|
register_session(session_id, wire_decoder)
|
||||||
return await future
|
return await future
|
||||||
|
Loading…
Reference in New Issue
Block a user