1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-10 07:20:56 +00:00

fix: return InvalidSessionError when trying to access cache of Seedless session

[no changelog]
This commit is contained in:
M1nd3r 2024-12-12 13:35:20 +01:00
parent c5d3e3f74c
commit a78c4dee8a

View File

@ -1,6 +1,7 @@
from typing import TYPE_CHECKING
from storage import cache_thp
from storage.cache_common import InvalidSessionError
from storage.cache_thp import SessionThpCache
from trezor import log, loop, protobuf, utils
from trezor.wire import message_handler, protocol_common
@ -136,6 +137,10 @@ class SeedlessSessionContext(GenericSessionContext):
def get_session_state(self) -> SessionState:
return SessionState.SEEDLESS
@property
def cache(self) -> DataCache:
raise InvalidSessionError
class SessionContext(GenericSessionContext):