From 90d9687678e88ff39ef524d94ed44d2fa86d208d Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Tue, 15 Nov 2016 11:51:28 +0100 Subject: [PATCH] apps.homescreen: cleanup --- src/apps/homescreen/__init__.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/apps/homescreen/__init__.py b/src/apps/homescreen/__init__.py index 43ba146a..e03366e8 100644 --- a/src/apps/homescreen/__init__.py +++ b/src/apps/homescreen/__init__.py @@ -3,7 +3,7 @@ from trezor.utils import unimport 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 trezor.messages.Features import Features @@ -22,18 +22,18 @@ async def respond_Features(_, session_id): f.pin_protection = storage.is_protected_by_pin() 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 - - # TODO: handle button_protection, passphrase_protection and pin_protection flags of Ping message - - f = Success() - f.message = ping.message - - await write_message(session_id, f) + s = Success() + s.message = msg.message + # TODO: handle other fields: + # button_protection + # passphrase_protection + # pin_protection + return s def boot():