core: Use the Lock icon in the PIN entry dialog only when the device is actually locked.

pull/1031/head
Andrew Kozlik 4 years ago committed by Andrew Kozlik
parent 41966c60db
commit 9c61257e8e

@ -1,6 +1,6 @@
from micropython import const
from trezor import res, ui
from trezor import config, res, ui
from trezor.crypto import random
from trezor.ui import display
from trezor.ui.button import (
@ -102,7 +102,9 @@ class PinDialog(ui.Layout):
self.reset_button.on_click = self.on_reset # type: ignore
if allow_cancel:
icon_lock = res.load(ui.ICON_LOCK)
icon_lock = res.load(
ui.ICON_CANCEL if config.is_unlocked() else ui.ICON_LOCK
)
self.cancel_button = Button(ui.grid(12), icon_lock, ButtonCancel)
self.cancel_button.on_click = self.on_cancel # type: ignore
else:

@ -37,15 +37,15 @@
"test_msg_cardano_sign_tx_slip39_basic.py::test_cardano_sign_tx[1097911063-inputs2-outputs2-transacti": "32edff90a2fecf74bf7e3e46794a48924082c069b9d1e57adb531749ac71e4af",
"test_msg_cardano_sign_tx_slip39_basic.py::test_cardano_sign_tx[764824073-inputs0-outputs0-transactio": "85fb1f1bf90131d6cd04e58b2303bf8d3b9a641b1f418852bc27c4432d427976",
"test_msg_cardano_sign_tx_slip39_basic.py::test_cardano_sign_tx[764824073-inputs1-outputs1-transactio": "15f55a8fc499364aa239c319100072d16ae5dc1ee9dd0db3cd1795363fde679a",
"test_msg_change_wipe_code_t2.py::test_set_pin_to_wipe_code": "85e21add9954b5337d904ce4be7081f89a20bcfce29bf8e9d9a97ffcf5f49329",
"test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "da0a39a0b0f2121fb8c3f55c3e79e56c0cc5d686f754757cdc7ec2e000252d2b",
"test_msg_change_wipe_code_t2.py::test_set_wipe_code_mismatch": "e8568ac366ab049eefb9e1432d715e87e70caf221c09f8218b84457135534ffd",
"test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "0ebeccd017365d082ca2ac7bfede52ee5cc4dd35293c4562d1ae257c0e960469",
"test_msg_changepin_t2.py::test_change_failed": "56d2d2a18feb99a8ffa94fa96d6d01f0ff594bf4b6461e9b827c467543e92b98",
"test_msg_changepin_t2.py::test_change_pin": "edeb52387df6abbe29a0dcce56ee666edd66caa31c3ab7f386391dd428688dbd",
"test_msg_changepin_t2.py::test_remove_pin": "ef73e69ce2dfd7fa0bde8b65e670eccede315d340e0cf881f104ba20676c3c73",
"test_msg_changepin_t2.py::test_set_failed": "c245b7364ade692122eb9a5a64b62769c0d9e27c66b66eda8dc77c6a37577522",
"test_msg_changepin_t2.py::test_set_pin": "b024766b28b6965fd946547726a360f1ce0c297261cd0125ad979ae0c443091f",
"test_msg_change_wipe_code_t2.py::test_set_pin_to_wipe_code": "9e11b251c03ef09127da79d92f8483c4db438c7303328774790d45e3f6fb8c96",
"test_msg_change_wipe_code_t2.py::test_set_remove_wipe_code": "d280ed129a2ea4781af9e35542aa31ecf63da75fc6812ed3bd05107809f836a4",
"test_msg_change_wipe_code_t2.py::test_set_wipe_code_mismatch": "32c808f00bada2059f933f3515337e494c837bdf65e4ea918b457d1c9f4cb42a",
"test_msg_change_wipe_code_t2.py::test_set_wipe_code_to_pin": "3c4072fa7e3def16258b2ed9c4fadf74a634b691889d78bbb771df616ea547af",
"test_msg_changepin_t2.py::test_change_failed": "9bf6e911c97e6a546b683b9b6b63933397deb018322a9d3469ca584afb440781",
"test_msg_changepin_t2.py::test_change_pin": "80f8169d54e417bf1a55c00e666498abbdd2788c9dd2d2d359c6528aa57f0d51",
"test_msg_changepin_t2.py::test_remove_pin": "90014e69558c0fd375077c1fa694997ab56799b3b1818398a9a63dc2751db4e5",
"test_msg_changepin_t2.py::test_set_failed": "8c0844d3ec6e9d22a8e85e87c491e360291c26dc6ac0b6643e6292c3f6cb03a3",
"test_msg_changepin_t2.py::test_set_pin": "7a4656bcbdb6822562e6c42f99d441139bc174e25168007812a5d1c878e6af06",
"test_msg_cipherkeyvalue.py-test_decrypt": "166d85b1bf11aeaeb5b93ef5d047b6f8910c28b8fce1d853e6912d89d7bfca2f",
"test_msg_cipherkeyvalue.py-test_decrypt_badlen": "5a80508a71a9ef64f94762b07636f90e464832f0f4a3102af8fa1a8c69e94586",
"test_msg_cipherkeyvalue.py-test_encrypt": "3a37e4004c87bc6df6a8fa7c93b6fe3e3524986914709fda2f9c99ba0ff69775",
@ -194,10 +194,10 @@
"test_msg_recoverydevice_slip39_basic_dryrun.py::test_2of3_dryrun": "d84427489f691ecc222b62f83af3e97fa09097404dcba07772a43b5eb0c689e8",
"test_msg_recoverydevice_slip39_basic_dryrun.py::test_2of3_invalid_seed_dryrun": "55f2dd6b4958659f071c3f57e06286f872ac38af4828f446a0f4e91c657dfccc",
"test_msg_resetdevice_bip39_t2.py-test_already_initialized": "5a80508a71a9ef64f94762b07636f90e464832f0f4a3102af8fa1a8c69e94586",
"test_msg_resetdevice_bip39_t2.py-test_failed_pin": "f284b630fef6ae437c9726cd0ee0d1728a77f677f37cd5f88aabb21e596f589e",
"test_msg_resetdevice_bip39_t2.py-test_failed_pin": "6b13f98de76ce3b75670e6e5fee7b11b4017165e25aa8d17e5c2f3fdca3846a3",
"test_msg_resetdevice_bip39_t2.py-test_reset_device": "c5fc35eab68889c0b3315cad09afd573ce32c1e94c2cb942388638414145f631",
"test_msg_resetdevice_bip39_t2.py-test_reset_device_192": "febbacc3370cf9219faa49bbc542a7aa1280d9fc3e6e9776dacbcd2f09231636",
"test_msg_resetdevice_bip39_t2.py-test_reset_device_pin": "e5957c6790bb3319b90da678949d09bfdd2d641d8d315ffa6b98a316cffeef0c",
"test_msg_resetdevice_bip39_t2.py-test_reset_device_pin": "cdc6e4d80a0988b367c4e37fb10e122f72507ba3cce75b0d8e4b3cbfeb4fd32a",
"test_msg_resetdevice_slip39_advanced.py-test_reset_device_slip39_advanced": "77fae06d2427b6626debb71448e0b79c81afb99da10df9b9e987259eb045edf2",
"test_msg_resetdevice_slip39_basic.py-test_reset_device_slip39_basic": "ad0d71e21112456fa99fdbd36563aa1ccbf49343a94ca1ed74068b2ec04ebd61",
"test_msg_resetdevice_slip39_basic.py-test_reset_device_slip39_basic_256": "5f21f628ada58d9b519aec96f99a087df1098825de33421ddb36777dc4f578f1",
@ -357,6 +357,6 @@
"test_reset_backup.py::test_skip_backup_msg[2-backup_flow_slip39_advanced]": "b980c758e8c0aacf6cbb047a9f1acaf3a1d1f3ab84a01ee9e52e5c466caf344c",
"test_sdcard.py::test_sd_format": "6bb7486932a5d38cdbb9b1368ee92aca3fad384115c744feadfade80c1605dd8",
"test_sdcard.py::test_sd_no_format": "f47e897caee95cf98c1b4506732825f853c4b8afcdc2713e38e3b4055973c9ac",
"test_sdcard.py::test_sd_protect_unlock": "d0a8dd770d91dd6dac61f54da78f522d3a6c0717e647785c5f7f46ee501511cc",
"test_sdcard.py::test_sd_protect_unlock": "9b98ad83499e38acaa9d73b0ef3261abde6e3b4b46194c32f323f28a79705077",
"test_u2f_counter.py::test_u2f_counter": "7d96a4d262b9d8a2c1158ac1e5f0f7b2c3ed5f2ba9d6235a014320313f9488fe"
}

Loading…
Cancel
Save