mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-05 13:01:12 +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
|
@ui.layout
|
||||||
async def confirm_layout(self) -> None:
|
async def confirm_layout(self) -> None:
|
||||||
from trezor.ui.confirm import ConfirmDialog, CONFIRMED
|
from trezor.ui.confirm import ConfirmDialog, CONFIRMED
|
||||||
|
from trezor.ui.text import Text
|
||||||
|
|
||||||
content = ConfirmContent(self.action, self.app_id)
|
if bytes(self.app_id) == _BOGUS_APPID:
|
||||||
dialog = ConfirmDialog(content, )
|
text = Text(
|
||||||
self.confirmed = await dialog == CONFIRMED
|
'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):
|
class ConfirmContent(ui.Widget):
|
||||||
|
Loading…
Reference in New Issue
Block a user