1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00

src/apps/fido_u2f: show layout for bogus ids again

This commit is contained in:
Pavol Rusnak 2018-03-01 05:43:45 +01:00
parent 63773e99b7
commit 842ebd6e83
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -458,10 +458,22 @@ class ConfirmState:
@ui.layout
async def confirm_layout(self) -> None:
from trezor.ui.confirm import ConfirmDialog, CONFIRMED
from trezor.ui.text import Text
content = ConfirmContent(self.action, self.app_id)
dialog = ConfirmDialog(content, )
self.confirmed = await dialog == CONFIRMED
if bytes(self.app_id) == _BOGUS_APPID:
text = Text(
'U2F mismatch', ui.ICON_WRONG,
'Another U2F device',
'was used to register',
'in this application.',
icon_color=ui.RED)
text.render()
await loop.sleep(3 * 1000 * 1000)
self.confirmed = True
else:
content = ConfirmContent(self.action, self.app_id)
dialog = ConfirmDialog(content, )
self.confirmed = await dialog == CONFIRMED
class ConfirmContent(ui.Widget):