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