1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-22 12:32:02 +00:00

core/misc: make Suite labeling dialog more clear

This commit is contained in:
grdddj 2023-03-30 17:37:36 +02:00
parent 7c4cc1767b
commit 5470c09348

View File

@ -24,11 +24,20 @@ async def cipher_key_value(ctx: Context, msg: CipherKeyValue) -> CipheredKeyValu
encrypt = msg.encrypt
decrypt = not msg.encrypt
if (encrypt and msg.ask_on_encrypt) or (decrypt and msg.ask_on_decrypt):
# Special case for Trezor Suite, which asks for setting up labels
if msg.key == "Enable labeling?":
title = "SUITE LABELING"
verb = "ENABLE"
else:
if encrypt:
title = "Encrypt value"
else:
title = "Decrypt value"
await confirm_action(ctx, "cipher_key_value", title, description=msg.key)
verb = "CONFIRM"
await confirm_action(
ctx, "cipher_key_value", title, description=msg.key, verb=verb
)
node = keychain.derive(msg.address_n)