1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +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 beb8b58064
commit adab2721ee

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
@ -133,6 +134,10 @@ class SeedlessSessionContext(GenericSessionContext):
def get_session_state(self) -> SessionState:
return SessionState.SEEDLESS
@property
def cache(self) -> DataCache:
raise InvalidSessionError
class SessionContext(GenericSessionContext):