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:
parent
63773e99b7
commit
842ebd6e83
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user