mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-08 22:40:59 +00:00
fix: return InvalidSessionError when trying to access cache of Seedless session
[no changelog]
This commit is contained in:
parent
beb8b58064
commit
adab2721ee
@ -1,6 +1,7 @@
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from storage import cache_thp
|
from storage import cache_thp
|
||||||
|
from storage.cache_common import InvalidSessionError
|
||||||
from storage.cache_thp import SessionThpCache
|
from storage.cache_thp import SessionThpCache
|
||||||
from trezor import log, loop, protobuf, utils
|
from trezor import log, loop, protobuf, utils
|
||||||
from trezor.wire import message_handler, protocol_common
|
from trezor.wire import message_handler, protocol_common
|
||||||
@ -133,6 +134,10 @@ class SeedlessSessionContext(GenericSessionContext):
|
|||||||
def get_session_state(self) -> SessionState:
|
def get_session_state(self) -> SessionState:
|
||||||
return SessionState.SEEDLESS
|
return SessionState.SEEDLESS
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cache(self) -> DataCache:
|
||||||
|
raise InvalidSessionError
|
||||||
|
|
||||||
|
|
||||||
class SessionContext(GenericSessionContext):
|
class SessionContext(GenericSessionContext):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user