From 2303acb7a9e91f6ad639f6c6724277e5d28ef537 Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Wed, 6 Sep 2017 22:53:36 +0200 Subject: [PATCH] apps/homescreen: implement PIng.button_protection --- src/apps/homescreen/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apps/homescreen/__init__.py b/src/apps/homescreen/__init__.py index 3f506ec2a..b5afd96a7 100644 --- a/src/apps/homescreen/__init__.py +++ b/src/apps/homescreen/__init__.py @@ -34,6 +34,13 @@ async def respond_Pong(ctx, msg): s = Success() s.message = msg.message + if msg.button_protection: + from apps.common.confirm import require_confirm + from trezor.messages.ButtonRequestType import ProtectCall + from trezor.ui.text import Text + from trezor import ui + await require_confirm(ctx, Text('Confirm', ui.ICON_RESET), ProtectCall) + if msg.pin_protection: from apps.common.request_pin import protect_by_pin await protect_by_pin(ctx) @@ -42,8 +49,6 @@ async def respond_Pong(ctx, msg): from apps.common.request_passphrase import protect_by_passphrase await protect_by_passphrase(ctx) - # TODO: handle other fields: - # button_protection return s