1
0
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:
Tomas Susanka 2019-11-23 18:12:57 +00:00 committed by Pavol Rusnak
parent cd09f9ce94
commit 4a0f727f13
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)