1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

apps.homescreen: handle Ping.pin_protection

This commit is contained in:
Jan Pochyla 2016-12-15 12:35:18 +01:00
parent b45fd349f5
commit 64dad27abe

View File

@ -4,7 +4,7 @@ from trezor.messages.wire_types import Initialize, GetFeatures, Ping
async def respond_Features(session_id, msg):
from ..common import storage, coins
from apps.common import storage, coins
from trezor.messages.Features import Features
f = Features()
@ -27,12 +27,17 @@ async def respond_Features(session_id, msg):
async def respond_Pong(session_id, msg):
from trezor.messages.Success import Success
s = Success()
s.message = msg.message
if msg.pin_protection:
from apps.common.request_pin import protect_by_pin
await protect_by_pin(session_id)
# TODO: handle other fields:
# button_protection
# passphrase_protection
# pin_protection
return s