1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

apps.management: protect by pin earlier

This commit is contained in:
Jan Pochyla 2016-12-15 12:34:46 +01:00
parent c03924c05f
commit b45fd349f5

View File

@ -11,6 +11,8 @@ async def layout_apply_settings(session_id, msg):
from ..common.request_pin import protect_by_pin
from ..common import storage
await protect_by_pin(session_id)
if msg.homescreen is not None:
raise wire.FailureError(
Other, 'ApplySettings.homescreen is not supported')
@ -40,8 +42,6 @@ async def layout_apply_settings(session_id, msg):
'enable passphrase' if msg.use_passphrase else 'disable passphrase',
'encryption?'))
await protect_by_pin(session_id)
storage.load_settings(label=msg.label,
language=msg.language,
passphrase_protection=msg.use_passphrase)