1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

apps: use default icon from Text API

This commit is contained in:
Jan Pochyla 2018-07-02 15:28:09 +02:00
parent f74a29b56a
commit ec06ccf43f
11 changed files with 13 additions and 13 deletions

View File

@ -37,6 +37,6 @@ async def ethereum_sign_message(ctx, msg):
async def require_confirm_sign_message(ctx, message): async def require_confirm_sign_message(ctx, message):
message = split_message(message) message = split_message(message)
text = Text('Sign ETH message', ui.ICON_DEFAULT) text = Text('Sign ETH message')
text.type(*message) text.type(*message)
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -32,10 +32,10 @@ async def ethereum_verify_message(ctx, msg):
async def require_confirm_verify_message(ctx, address, message): 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)) text.mono(*split_address(address))
await require_confirm(ctx, text) await require_confirm(ctx, text)
text = Text('Verify message', ui.ICON_DEFAULT) text = Text('Verify message')
text.mono(*split_message(message)) text.mono(*split_message(message))
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -56,7 +56,7 @@ async def handle_Ping(ctx, msg):
from trezor.messages.ButtonRequestType import ProtectCall from trezor.messages.ButtonRequestType import ProtectCall
from trezor.ui.text import Text from trezor.ui.text import Text
from trezor import ui 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: if msg.passphrase_protection:
from apps.common.request_passphrase import protect_by_passphrase from apps.common.request_passphrase import protect_by_passphrase
await protect_by_passphrase(ctx) await protect_by_passphrase(ctx)

View File

@ -39,6 +39,6 @@ async def lisk_sign_message(ctx, msg):
async def require_confirm_sign_message(ctx, message): 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)) text.type(*split_message(message))
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -18,7 +18,7 @@ async def load_device(ctx, msg):
if not msg.skip_checksum and not bip39.check(msg.mnemonic): if not msg.skip_checksum and not bip39.check(msg.mnemonic):
raise wire.ProcessError('Mnemonic is not valid') 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.bold('Loading private seed', 'is not recommended.')
text.type('Continue only if you', 'know what you are doing!') text.type('Continue only if you', 'know what you are doing!')
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -20,7 +20,7 @@ async def cipher_key_value(ctx, msg):
title = 'Encrypt value' title = 'Encrypt value'
else: else:
title = 'Decrypt value' title = 'Decrypt value'
text = Text(title, ui.ICON_DEFAULT) text = Text(title)
text.type(msg.key) text.type(msg.key)
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -30,7 +30,7 @@ async def get_ecdh_session_key(ctx, msg):
async def require_confirm_ecdh_session_key(ctx, identity): async def require_confirm_ecdh_session_key(ctx, identity):
lines = chunks(serialize_identity_without_proto(identity), 18) lines = chunks(serialize_identity_without_proto(identity), 18)
proto = identity.proto.upper() if identity.proto else 'identity' 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) text.mono(*lines)
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -8,7 +8,7 @@ from apps.common.confirm import require_confirm
async def get_entropy(ctx, msg): 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.bold('Do you really want', 'to send entropy?')
text.type('Continue only if you', 'know what you are doing!') text.type('Continue only if you', 'know what you are doing!')
await require_confirm(ctx, text, code=ButtonRequestType.ProtectCall) await require_confirm(ctx, text, code=ButtonRequestType.ProtectCall)

View File

@ -53,7 +53,7 @@ async def require_confirm_sign_identity(ctx, identity, challenge_visual):
lines.extend(chunks(serialize_identity_without_proto(identity), 18)) lines.extend(chunks(serialize_identity_without_proto(identity), 18))
proto = identity.proto.upper() if identity.proto else 'identity' 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) text.type(*lines)
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -39,6 +39,6 @@ async def sign_message(ctx, msg):
async def require_confirm_sign_message(ctx, message): async def require_confirm_sign_message(ctx, message):
message = split_message(message) message = split_message(message)
text = Text('Sign message', ui.ICON_DEFAULT) text = Text('Sign message')
text.type(*message) text.type(*message)
await require_confirm(ctx, text) await require_confirm(ctx, text)

View File

@ -57,10 +57,10 @@ async def verify_message(ctx, msg):
async def require_confirm_verify_message(ctx, address, message): 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)) text.mono(*split_address(address))
await require_confirm(ctx, text) await require_confirm(ctx, text)
text = Text('Verify message', ui.ICON_DEFAULT) text = Text('Verify message')
text.type(*split_message(message)) text.type(*split_message(message))
await require_confirm(ctx, text) await require_confirm(ctx, text)