From c4c27de0d54fc0cbe0b851ef89248faf13e75a85 Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Tue, 6 Jun 2017 13:09:52 +0200 Subject: [PATCH] apps.fido_u2f: remove legacy layout --- src/apps/fido_u2f/u2f.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/apps/fido_u2f/u2f.py diff --git a/src/apps/fido_u2f/u2f.py b/src/apps/fido_u2f/u2f.py deleted file mode 100644 index 5b4b495e57..0000000000 --- a/src/apps/fido_u2f/u2f.py +++ /dev/null @@ -1,36 +0,0 @@ -from ubinascii import hexlify -from trezor import ui, loop, res -from trezor.utils import unimport -from trezor.crypto import random -from . import knownapps - -ids = list(knownapps.knownapps.keys()) -random.shuffle(ids) - -appid = ids[0] -action = 'Register' - - -@unimport -def layout_u2f(): - - if appid in knownapps.knownapps: - appname = knownapps.knownapps[appid] - appicon = res.load('apps/fido_u2f/res/u2f_%s.toif' % - appname.lower().replace(' ', '_')) - else: - appname = hexlify(appid[:4]) + '...' + hexlify(appid[-4:]) - appicon = res.load('apps/fido_u2f/res/u2f_unknown.toif') - - # paint background black - ui.display.bar(0, 0, 240, 240, ui.BLACK) - - # top header bar - ui.display.text(10, 28, 'U2F Login', ui.BOLD, ui.WHITE, ui.BLACK) - - # content - ui.display.text_center(120, 70, '%s:' % action, ui.BOLD, ui.GREY, ui.BLACK) - ui.display.image((240 - 64) // 2, 90, appicon) - ui.display.text_center(120, 185, appname, ui.MONO, ui.WHITE, ui.BLACK) - - yield loop.Wait([])