1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18:07 +00:00

refactor(core): rely on layout code to fill in homescreen default label

[no changelog]
This commit is contained in:
matejcik 2023-09-29 12:44:25 +02:00 committed by matejcik
parent 193a53f22b
commit f6c659357a
3 changed files with 20 additions and 22 deletions

View File

@ -14,12 +14,10 @@ async def busyscreen() -> None:
async def homescreen() -> None: async def homescreen() -> None:
from trezor import utils
if storage.device.is_initialized(): if storage.device.is_initialized():
label = storage.device.get_label() label = storage.device.get_label()
else: else:
label = utils.MODEL_FULL_NAME label = None
notification = None notification = None
notification_is_error = False notification_is_error = False

View File

@ -62,7 +62,7 @@ class Homescreen(HomescreenBase):
skip = storage_cache.homescreen_shown is self.RENDER_INDICATOR skip = storage_cache.homescreen_shown is self.RENDER_INDICATOR
super().__init__( super().__init__(
layout=trezorui2.show_homescreen( layout=trezorui2.show_homescreen(
label=label or "My Trezor", label=label,
notification=notification, notification=notification,
notification_level=level, notification_level=level,
hold=hold_to_lock, hold=hold_to_lock,
@ -102,7 +102,7 @@ class Lockscreen(HomescreenBase):
) )
super().__init__( super().__init__(
layout=trezorui2.show_lockscreen( layout=trezorui2.show_lockscreen(
label=label or "My Trezor", label=label,
bootscreen=bootscreen, bootscreen=bootscreen,
skip_first_paint=skip, skip_first_paint=skip,
), ),

View File

@ -2045,13 +2045,13 @@
"TT_test_pin.py::test_pin_short": "0f7d5bd47f9f61133fbba9a1db1486e48dfd53d71d1b7a7d4a22d7062e7ade52", "TT_test_pin.py::test_pin_short": "0f7d5bd47f9f61133fbba9a1db1486e48dfd53d71d1b7a7d4a22d7062e7ade52",
"TT_test_pin.py::test_wipe_code_same_as_pin": "b558003f3030a5a05db685d32c44ecac0ee9adb43c9fe005b2181ad95e0f08e9", "TT_test_pin.py::test_wipe_code_same_as_pin": "b558003f3030a5a05db685d32c44ecac0ee9adb43c9fe005b2181ad95e0f08e9",
"TT_test_pin.py::test_wipe_code_setup": "4e82e1a6b33bdfa2b468de4f69a8511ce3be86fb5758005c36644b3960c010f2", "TT_test_pin.py::test_wipe_code_setup": "4e82e1a6b33bdfa2b468de4f69a8511ce3be86fb5758005c36644b3960c010f2",
"TT_test_recovery.py::test_recovery_bip39": "be22c7e80827ce568f1039d262ac8d51cd746a823a1699d3c6b7512bce97fc9a", "TT_test_recovery.py::test_recovery_bip39": "13e3f91705759b0c3c5cba1038527daf1f20a1dd3b14c9ac6cd733f492409991",
"TT_test_recovery.py::test_recovery_slip39_basic": "3be1c2fe60ed405f7ec540011ed09d7c793a5734f163407cd296c747355a2c00", "TT_test_recovery.py::test_recovery_slip39_basic": "bc5100676562b6089472c293e02ca3af36bebf9a695787061d2be39c08273b3b",
"TT_test_reset_bip39.py::test_reset_bip39": "a10d8da9f305236e1b138d728663f830bc51067a8a1bc5b96f8e63280a5d7f1d", "TT_test_reset_bip39.py::test_reset_bip39": "c9fbd319d9129d9c2ea6a385f6eed4dc8346e09e9eec0438a183fe3f491f05b9",
"TT_test_reset_slip39_advanced.py::test_reset_slip39_advanced[16of16]": "4f2855d6cd55edc87aa8cd7f1691ee6851a2551ec3bcf5cba7fd164c830d8df5", "TT_test_reset_slip39_advanced.py::test_reset_slip39_advanced[16of16]": "8b1f872d8d1d1ef711b977c7775c93f120b59cbeba176913aac0cf7e13d24076",
"TT_test_reset_slip39_advanced.py::test_reset_slip39_advanced[2of2]": "87e2205ab0017df117c4a02f45525c9ba1525ef618739dfe62719d38f03f35b7", "TT_test_reset_slip39_advanced.py::test_reset_slip39_advanced[2of2]": "c25c0073737e3c5ee5218d992e6c2e22b3c8e1a26ad91ce01725339dadffac6d",
"TT_test_reset_slip39_basic.py::test_reset_slip39_basic[16of16]": "59fd6c3b58073ab85af805120f3628bef087450ef6b09fbbb84f58f47fd470d8", "TT_test_reset_slip39_basic.py::test_reset_slip39_basic[16of16]": "8e5e4df27c3066c5c6970f5809cfedf4e86bfd718cc337a416ed0165fcd63d90",
"TT_test_reset_slip39_basic.py::test_reset_slip39_basic[1of1]": "5d4b0981139757f8a8bdfa1cd5a1416cda9967699d0c51c951c6f8614603c0bb" "TT_test_reset_slip39_basic.py::test_reset_slip39_basic[1of1]": "014d332f511ccb5500828380e194c6d7ef22d6ea5af947b139e8049b442fd9c2"
}, },
"device_tests": { "device_tests": {
"TT_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "fa3d667e1439c9c2a475fff22d94e330c14697ff8dda4bcdded775492cb40a90", "TT_binance-test_get_address.py::test_binance_get_address[m-44h-714h-0h-0-0-bnb1hgm0p7khfk85zpz-68e2cb5a": "fa3d667e1439c9c2a475fff22d94e330c14697ff8dda4bcdded775492cb40a90",
@ -3117,12 +3117,12 @@
"TT_reset_recovery-test_recovery_slip39_basic.py::test_wrong_nth_word[2]": "666e4780005d6d2e0487382f0a5c758236cdd50bad4e04fbd6d75e71570d9aa2", "TT_reset_recovery-test_recovery_slip39_basic.py::test_wrong_nth_word[2]": "666e4780005d6d2e0487382f0a5c758236cdd50bad4e04fbd6d75e71570d9aa2",
"TT_reset_recovery-test_recovery_slip39_basic_dryrun.py::test_2of3_dryrun": "6f03ecc76b568b44c77d35f92a6eb02f7f474be150afa887ff88ed59f3422776", "TT_reset_recovery-test_recovery_slip39_basic_dryrun.py::test_2of3_dryrun": "6f03ecc76b568b44c77d35f92a6eb02f7f474be150afa887ff88ed59f3422776",
"TT_reset_recovery-test_recovery_slip39_basic_dryrun.py::test_2of3_invalid_seed_dryrun": "43e123d83b3a5c36dc9cbba705fc8a4a5b887040015f5da9437e6b51e341a0fc", "TT_reset_recovery-test_recovery_slip39_basic_dryrun.py::test_2of3_invalid_seed_dryrun": "43e123d83b3a5c36dc9cbba705fc8a4a5b887040015f5da9437e6b51e341a0fc",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Bip39-backup_flow_bip39]": "c3a82e8bf6dde076bf2f689f652c815398651872a294446fb55fcf32e08b2f76", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Bip39-backup_flow_bip39]": "95429ee1ff88a194776674ac656f1e8552af6e9b82eb924d1a0c99132e220d50",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Slip39_Advanced-bac-f67baa1c": "3edcbbf63a50bd34eda8a654646a14557b7895be3a57569b3253ad777a5ef993", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Slip39_Advanced-bac-f67baa1c": "a32e3d1c7600b00f81a97a6f0ea836f9d1225a2884db55674263dafd57b128b3",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Slip39_Basic-backup-6348e7fe": "03da0be394c2c409da6093d0fd82e14bcec8dba5e504449f00b814d6fda14d26", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_manual[BackupType.Slip39_Basic-backup-6348e7fe": "9f4935a388c5bfe67e2473795106fb15daf88d3ff4d4bb055304a783fa0fecb3",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Bip39-backup_flow_bip39]": "5929dd59660ce3490c104d9760207a53a958911898464babebc4b82a0f8f4c68", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Bip39-backup_flow_bip39]": "95e3741d7d4a16922e3dd0b1112b611f9a7ede012f37db9fdb1a0115268188e0",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Slip39_Advanced-backup-dcbda5cf": "922568d9d6fdeecfd7101b1d8859caac3b88d71ea5da7f96d7812e1b932c79a2", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Slip39_Advanced-backup-dcbda5cf": "3f04fcd7d3768f55c58fecd6aadaa7c5f09b72eec482f1e0aa994c62a32a3f80",
"TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Slip39_Basic-backup_fl-1577de4d": "7fd823a986a50665bf799480a37a4ca667e66f4409fea022af1d6de426f74c6a", "TT_reset_recovery-test_reset_backup.py::test_skip_backup_msg[BackupType.Slip39_Basic-backup_fl-1577de4d": "b48369b16ce1066b94523b4ae4ad252b04e58d8790f03e8ff2707181eecd346b",
"TT_reset_recovery-test_reset_bip39_t2.py::test_already_initialized": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3", "TT_reset_recovery-test_reset_bip39_t2.py::test_already_initialized": "80a6e289138a604cf351a29511cf6f85e2243591317894703152787e1351a1a3",
"TT_reset_recovery-test_reset_bip39_t2.py::test_failed_pin": "8fc6c0f7a9c47cb8655ed2ee5aa099a6c8339d8f09c99c437cf7b120530cba5f", "TT_reset_recovery-test_reset_bip39_t2.py::test_failed_pin": "8fc6c0f7a9c47cb8655ed2ee5aa099a6c8339d8f09c99c437cf7b120530cba5f",
"TT_reset_recovery-test_reset_bip39_t2.py::test_reset_device": "89d6a55f2387df4aee4cd1d7bafc688ad0ee90d224345ca08aba09534458b81b", "TT_reset_recovery-test_reset_bip39_t2.py::test_reset_device": "89d6a55f2387df4aee4cd1d7bafc688ad0ee90d224345ca08aba09534458b81b",
@ -3262,7 +3262,7 @@
"TT_test_msg_sd_protect.py::test_enable_disable": "95a5bd3071e08243f9e64ad0c017bc16420c57f760fe2f1add381ab55075f3e7", "TT_test_msg_sd_protect.py::test_enable_disable": "95a5bd3071e08243f9e64ad0c017bc16420c57f760fe2f1add381ab55075f3e7",
"TT_test_msg_sd_protect.py::test_refresh": "d132080d9dbfcebcac67ba3856a373b98fc78be445964f31b0b936df7d806d60", "TT_test_msg_sd_protect.py::test_refresh": "d132080d9dbfcebcac67ba3856a373b98fc78be445964f31b0b936df7d806d60",
"TT_test_msg_sd_protect.py::test_wipe": "ad83437211358525c72e42b6f1f1aa5593dadb33780cb3ff01040964b2f400ca", "TT_test_msg_sd_protect.py::test_wipe": "ad83437211358525c72e42b6f1f1aa5593dadb33780cb3ff01040964b2f400ca",
"TT_test_msg_wipedevice.py::test_autolock_not_retained": "f2320d45c18e53f15577b5881040ee7ff6ba1721359f8041df38f2b6e3dc23b2", "TT_test_msg_wipedevice.py::test_autolock_not_retained": "49f80c436922e8293655ad89f4815a099ace232179be54e5afa66caa94d4cb1d",
"TT_test_msg_wipedevice.py::test_wipe_device": "5d94d331908fa838b323551de8cc22b944c068bc6c919b4142a872d4ed23f256", "TT_test_msg_wipedevice.py::test_wipe_device": "5d94d331908fa838b323551de8cc22b944c068bc6c919b4142a872d4ed23f256",
"TT_test_passphrase_slip39_advanced.py::test_128bit_passphrase": "c4a8e8e7544a7dd8a7157aef8572f1be99c10b290ca9e0f60763b7e3583c7882", "TT_test_passphrase_slip39_advanced.py::test_128bit_passphrase": "c4a8e8e7544a7dd8a7157aef8572f1be99c10b290ca9e0f60763b7e3583c7882",
"TT_test_passphrase_slip39_advanced.py::test_256bit_passphrase": "c4a8e8e7544a7dd8a7157aef8572f1be99c10b290ca9e0f60763b7e3583c7882", "TT_test_passphrase_slip39_advanced.py::test_256bit_passphrase": "c4a8e8e7544a7dd8a7157aef8572f1be99c10b290ca9e0f60763b7e3583c7882",
@ -3345,9 +3345,9 @@
"TT_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "9e7540c5d792d6728289354b23ada645b35ab948684770cb4cfe1d61f50f11f9", "TT_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.PromptTempora-b3d21f4a": "9e7540c5d792d6728289354b23ada645b35ab948684770cb4cfe1d61f50f11f9",
"TT_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "dc62cf266023ef9f64cf7d2a1303431fdd419d34c74fccc42e9ac6faa0c61400", "TT_test_safety_checks.py::test_safety_checks_level_after_reboot[SafetyCheckLevel.Strict-Safety-f1ff9c26": "dc62cf266023ef9f64cf7d2a1303431fdd419d34c74fccc42e9ac6faa0c61400",
"TT_test_shamir_persistence.py::test_abort": "2ea0b055da3fafc814f8262a00e8f705f14ed4663fef66d778bc50736cc7984c", "TT_test_shamir_persistence.py::test_abort": "2ea0b055da3fafc814f8262a00e8f705f14ed4663fef66d778bc50736cc7984c",
"TT_test_shamir_persistence.py::test_recovery_multiple_resets": "7b54e4d5230ef8fc7cf350feb7dcf821165cb5f138fb0417b439006c83d209d1", "TT_test_shamir_persistence.py::test_recovery_multiple_resets": "39267f234331d17428269bf9cd7f5aa006b64101d42e3cd62a6822c88265eb20",
"TT_test_shamir_persistence.py::test_recovery_on_old_wallet": "104eed017278893d82e21fdd9136cd735a1e53efe56b9070a9a701878bd9370a", "TT_test_shamir_persistence.py::test_recovery_on_old_wallet": "018259a317cf20b473a60f5c70ef79ee106c5975c0e9123d7769344423d206d2",
"TT_test_shamir_persistence.py::test_recovery_single_reset": "b7a478ef2f51530b4ca697cbb9f1fe700ded5b7b6ebbe77d7d65c2df4f13d70a", "TT_test_shamir_persistence.py::test_recovery_single_reset": "4ddbbadb69a1778bca816bf928f63c1d92dde8c5ac31a301c15dda0659e32ca2",
"TT_test_wipe_code.py::test_wipe_code_activate_core": "e21fade21796834c53895529765c143252dcb84713f968df04a33a1061cc2962" "TT_test_wipe_code.py::test_wipe_code_activate_core": "e21fade21796834c53895529765c143252dcb84713f968df04a33a1061cc2962"
} }
} }