mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
apps: use default icon from Text API
This commit is contained in:
parent
f74a29b56a
commit
ec06ccf43f
@ -37,6 +37,6 @@ async def ethereum_sign_message(ctx, msg):
|
||||
|
||||
async def require_confirm_sign_message(ctx, message):
|
||||
message = split_message(message)
|
||||
text = Text('Sign ETH message', ui.ICON_DEFAULT)
|
||||
text = Text('Sign ETH message')
|
||||
text.type(*message)
|
||||
await require_confirm(ctx, text)
|
||||
|
@ -32,10 +32,10 @@ async def ethereum_verify_message(ctx, msg):
|
||||
|
||||
|
||||
async def require_confirm_verify_message(ctx, address, message):
|
||||
text = Text('Confirm address', ui.ICON_DEFAULT)
|
||||
text = Text('Confirm address')
|
||||
text.mono(*split_address(address))
|
||||
await require_confirm(ctx, text)
|
||||
|
||||
text = Text('Verify message', ui.ICON_DEFAULT)
|
||||
text = Text('Verify message')
|
||||
text.mono(*split_message(message))
|
||||
await require_confirm(ctx, text)
|
||||
|
@ -56,7 +56,7 @@ async def handle_Ping(ctx, msg):
|
||||
from trezor.messages.ButtonRequestType import ProtectCall
|
||||
from trezor.ui.text import Text
|
||||
from trezor import ui
|
||||
await require_confirm(ctx, Text('Confirm', ui.ICON_DEFAULT), ProtectCall)
|
||||
await require_confirm(ctx, Text('Confirm'), ProtectCall)
|
||||
if msg.passphrase_protection:
|
||||
from apps.common.request_passphrase import protect_by_passphrase
|
||||
await protect_by_passphrase(ctx)
|
||||
|
@ -39,6 +39,6 @@ async def lisk_sign_message(ctx, msg):
|
||||
|
||||
|
||||
async def require_confirm_sign_message(ctx, message):
|
||||
text = Text('Sign Lisk message', ui.ICON_DEFAULT)
|
||||
text = Text('Sign Lisk message')
|
||||
text.type(*split_message(message))
|
||||
await require_confirm(ctx, text)
|
||||
|
@ -18,7 +18,7 @@ async def load_device(ctx, msg):
|
||||
if not msg.skip_checksum and not bip39.check(msg.mnemonic):
|
||||
raise wire.ProcessError('Mnemonic is not valid')
|
||||
|
||||
text = Text('Loading seed', ui.ICON_DEFAULT)
|
||||
text = Text('Loading seed')
|
||||
text.bold('Loading private seed', 'is not recommended.')
|
||||
text.type('Continue only if you', 'know what you are doing!')
|
||||
await require_confirm(ctx, text)
|
||||
|
@ -20,7 +20,7 @@ async def cipher_key_value(ctx, msg):
|
||||
title = 'Encrypt value'
|
||||
else:
|
||||
title = 'Decrypt value'
|
||||
text = Text(title, ui.ICON_DEFAULT)
|
||||
text = Text(title)
|
||||
text.type(msg.key)
|
||||
await require_confirm(ctx, text)
|
||||
|
||||
|
@ -30,7 +30,7 @@ async def get_ecdh_session_key(ctx, msg):
|
||||
async def require_confirm_ecdh_session_key(ctx, identity):
|
||||
lines = chunks(serialize_identity_without_proto(identity), 18)
|
||||
proto = identity.proto.upper() if identity.proto else 'identity'
|
||||
text = Text('Decrypt %s' % proto, ui.ICON_DEFAULT)
|
||||
text = Text('Decrypt %s' % proto)
|
||||
text.mono(*lines)
|
||||
await require_confirm(ctx, text)
|
||||
|
||||
|
@ -8,7 +8,7 @@ from apps.common.confirm import require_confirm
|
||||
|
||||
async def get_entropy(ctx, msg):
|
||||
|
||||
text = Text('Confirm entropy', ui.ICON_DEFAULT)
|
||||
text = Text('Confirm entropy')
|
||||
text.bold('Do you really want', 'to send entropy?')
|
||||
text.type('Continue only if you', 'know what you are doing!')
|
||||
await require_confirm(ctx, text, code=ButtonRequestType.ProtectCall)
|
||||
|
@ -53,7 +53,7 @@ async def require_confirm_sign_identity(ctx, identity, challenge_visual):
|
||||
lines.extend(chunks(serialize_identity_without_proto(identity), 18))
|
||||
|
||||
proto = identity.proto.upper() if identity.proto else 'identity'
|
||||
text = Text('Sign %s' % proto, ui.ICON_DEFAULT)
|
||||
text = Text('Sign %s' % proto)
|
||||
text.type(*lines)
|
||||
await require_confirm(ctx, text)
|
||||
|
||||
|
@ -39,6 +39,6 @@ async def sign_message(ctx, msg):
|
||||
|
||||
async def require_confirm_sign_message(ctx, message):
|
||||
message = split_message(message)
|
||||
text = Text('Sign message', ui.ICON_DEFAULT)
|
||||
text = Text('Sign message')
|
||||
text.type(*message)
|
||||
await require_confirm(ctx, text)
|
||||
|
@ -57,10 +57,10 @@ async def verify_message(ctx, msg):
|
||||
|
||||
|
||||
async def require_confirm_verify_message(ctx, address, message):
|
||||
text = Text('Confirm address', ui.ICON_DEFAULT)
|
||||
text = Text('Confirm address')
|
||||
text.mono(*split_address(address))
|
||||
await require_confirm(ctx, text)
|
||||
|
||||
text = Text('Verify message', ui.ICON_DEFAULT)
|
||||
text = Text('Verify message')
|
||||
text.type(*split_message(message))
|
||||
await require_confirm(ctx, text)
|
||||
|
Loading…
Reference in New Issue
Block a user