1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-04 22:02:34 +00:00
trezor-firmware/core/src/apps/eos/layout.py
Martin Milata f1382bf892 refactor(core): model-dependent UI component directories
They now live under trezor.ui.components.tt. Later
trezor.ui.components.t1 will be added and application code will be
rewritten to not use them directly in order to work on both TT and T1.
2021-02-10 13:57:19 +01:00

20 lines
718 B
Python

from trezor import ui, wire
from trezor.messages import ButtonRequestType
from trezor.ui.components.tt.text import Text
from apps.common.confirm import require_confirm
async def require_get_public_key(ctx: wire.Context, public_key: str) -> None:
text = Text("Confirm public key", ui.ICON_RECEIVE, ui.GREEN)
text.normal(public_key)
await require_confirm(ctx, text, ButtonRequestType.PublicKey)
async def require_sign_tx(ctx: wire.Context, num_actions: int) -> None:
text = Text("Sign transaction", ui.ICON_SEND, ui.GREEN)
text.normal("You are about")
text.normal("to sign {}".format(num_actions))
text.normal("action(s).")
await require_confirm(ctx, text, ButtonRequestType.SignTx)