mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-27 16:48:09 +00:00
u2f: show generic icon if specific is not found
This commit is contained in:
parent
879a3e85bd
commit
4379f0d031
@ -413,10 +413,13 @@ class ConfirmContent(ui.Widget):
|
||||
icon = ui.ICON_RESET # TODO: warning icon
|
||||
elif app_id in knownapps.knownapps:
|
||||
name = knownapps.knownapps[app_id]
|
||||
icon = res.load('apps/fido_u2f/res/u2f_%s.toif' % name.lower().replace(' ', '_'))
|
||||
try:
|
||||
icon = res.load('apps/fido_u2f/res/u2f_%s.toif' % name.lower().replace(' ', '_'))
|
||||
except:
|
||||
icon = res.load('apps/fido_u2f/res/u2f_generic.toif')
|
||||
else:
|
||||
name = '%s...%s' % (ubinascii.hexlify(app_id[:4]), ubinascii.hexlify(app_id[-4:]))
|
||||
icon = res.load('apps/fido_u2f/res/u2f_unknown.toif')
|
||||
icon = res.load('apps/fido_u2f/res/u2f_generic.toif')
|
||||
self.app_name = name
|
||||
self.app_icon = icon
|
||||
|
||||
|
@ -10,6 +10,7 @@ knownapps = {
|
||||
hashlib.sha256(b'https://gitlab.com').digest(): 'GitLab',
|
||||
hashlib.sha256(b'https://keepersecurity.com').digest(): 'Keeper',
|
||||
hashlib.sha256(b'https://slushpool.com/static/security/u2f.json').digest(): 'Slush Pool',
|
||||
hashlib.sha256(b'https://u2f.bin.coffee').digest(): 'u2f.bin.coffee checker',
|
||||
hashlib.sha256(b'https://vault.bitwarden.com/app-id.json').digest(): 'bitwarden',
|
||||
hashlib.sha256(b'https://www.bitfinex.com').digest(): 'Bitfinex',
|
||||
hashlib.sha256(b'https://www.dropbox.com/u2f-app-id.json').digest(): 'Dropbox',
|
||||
|
BIN
src/apps/fido_u2f/res/u2f_generic.toif
Normal file
BIN
src/apps/fido_u2f/res/u2f_generic.toif
Normal file
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user