mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
core: fix monero
This commit is contained in:
parent
cd09f9ce94
commit
4a0f727f13
@ -1,6 +1,6 @@
|
||||
import gc
|
||||
|
||||
from storage.cache import get_passphrase_fprint
|
||||
import storage.cache
|
||||
from trezor import log
|
||||
from trezor.messages import MessageType
|
||||
from trezor.messages.MoneroLiveRefreshFinalAck import MoneroLiveRefreshFinalAck
|
||||
@ -49,10 +49,10 @@ async def _init_step(
|
||||
ctx, misc.validate_full_path, keychain, msg.address_n, CURVE
|
||||
)
|
||||
|
||||
passphrase_fprint = get_passphrase_fprint()
|
||||
if live_refresh_token() != passphrase_fprint:
|
||||
fingerprint = storage.cache.get_session_id()[:4]
|
||||
if live_refresh_token() != fingerprint:
|
||||
await confirms.require_confirm_live_refresh(ctx)
|
||||
live_refresh_token(passphrase_fprint)
|
||||
live_refresh_token(fingerprint)
|
||||
|
||||
s.creds = misc.get_creds(keychain, msg.address_n, msg.network_type)
|
||||
|
||||
|
@ -8,7 +8,7 @@ _cached_seed_without_passphrase = None # type: Optional[bytes] # Needed for SL
|
||||
_cached_session_id = None # type: Optional[bytes]
|
||||
|
||||
|
||||
def get_session_id() -> Optional[bytes]:
|
||||
def get_session_id() -> bytes:
|
||||
global _cached_session_id
|
||||
if not _cached_session_id:
|
||||
_cached_session_id = random.bytes(32)
|
||||
|
Loading…
Reference in New Issue
Block a user