apps.homescreen: cleanup

This commit is contained in:
Jan Pochyla 2016-11-15 11:51:28 +01:00
parent b89666fb87
commit 90d9687678
1 changed files with 10 additions and 10 deletions

View File

@ -3,7 +3,7 @@ from trezor.utils import unimport
from trezor.messages.wire_types import Initialize, GetFeatures, Ping from trezor.messages.wire_types import Initialize, GetFeatures, Ping
async def respond_Features(_, session_id): async def respond_Features(msg, session_id):
from ..common import storage, coins from ..common import storage, coins
from trezor.messages.Features import Features from trezor.messages.Features import Features
@ -22,18 +22,18 @@ async def respond_Features(_, session_id):
f.pin_protection = storage.is_protected_by_pin() f.pin_protection = storage.is_protected_by_pin()
f.passphrase_protection = storage.is_protected_by_passphrase() f.passphrase_protection = storage.is_protected_by_passphrase()
await write_message(session_id, f) return f
async def respond_Pong(ping, session_id): async def respond_Pong(msg, session_id):
from trezor.messages.Success import Success from trezor.messages.Success import Success
s = Success()
# TODO: handle button_protection, passphrase_protection and pin_protection flags of Ping message s.message = msg.message
# TODO: handle other fields:
f = Success() # button_protection
f.message = ping.message # passphrase_protection
# pin_protection
await write_message(session_id, f) return s
def boot(): def boot():