You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/src/apps/nem/namespace/layout.py

22 lines
887 B

from trezor import ui
from trezor.messages import NEMProvisionNamespace, NEMTransactionCommon
from ..layout import require_confirm_content, require_confirm_fee, require_confirm_final
async def ask_provision_namespace(ctx, common: NEMTransactionCommon, namespace: NEMProvisionNamespace):
if namespace.parent:
content = (ui.NORMAL, 'Create namespace',
ui.BOLD, namespace.namespace,
ui.NORMAL, 'under namespace',
ui.BOLD, namespace.parent)
await require_confirm_content(ctx, 'Confirm namespace', content)
else:
content = (ui.NORMAL, 'Create namespace',
ui.BOLD, namespace.namespace)
await require_confirm_content(ctx, 'Confirm namespace', content)
await require_confirm_fee(ctx, 'Confirm rental fee', namespace.fee)
await require_confirm_final(ctx, common.fee)