mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-12 17:38:13 +00:00
wip
This commit is contained in:
parent
41cdbf7bc4
commit
93253c9b60
@ -242,6 +242,7 @@ if utils.USE_THP:
|
||||
|
||||
new_session = create_new_session(channel)
|
||||
try:
|
||||
await unlock_device()
|
||||
await derive_and_store_roots(new_session, message)
|
||||
except DataError as e:
|
||||
return Failure(code=FailureType.DataError, message=e.message)
|
||||
|
@ -145,7 +145,7 @@ def _try_allocate_new_buffer(payload_length: int) -> utils.BufferType:
|
||||
try:
|
||||
payload: utils.BufferType = bytearray(payload_length)
|
||||
except MemoryError:
|
||||
payload = bytearray(PACKET_LENGTH)
|
||||
payload = bytearray(PACKET_LENGTH) # TODO ???
|
||||
raise ThpError("Message too large")
|
||||
return payload
|
||||
|
||||
|
@ -265,6 +265,7 @@ def with_session(
|
||||
if management:
|
||||
session = obj.get_management_session()
|
||||
else:
|
||||
# TODO try (sys.exit ve finally)
|
||||
session = obj.get_session(
|
||||
derive_cardano=derive_cardano,
|
||||
empty_passphrase=empty_passphrase,
|
||||
|
Loading…
Reference in New Issue
Block a user