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/core/src/apps/ripple/layout.py

35 lines
971 B

from trezor.enums import ButtonRequestType
from trezor.strings import format_amount
from trezor.ui.layouts import confirm_metadata
from trezor.ui.layouts.tt.altcoin import confirm_total_ripple
from . import helpers
async def require_confirm_fee(ctx, fee):
await confirm_metadata(
ctx,
"confirm_fee",
title="Confirm fee",
content="Transaction fee:\n{}",
param=format_amount(fee, helpers.DECIMALS) + " XRP",
hide_continue=True,
br_code=ButtonRequestType.ConfirmOutput,
)
async def require_confirm_destination_tag(ctx, tag):
await confirm_metadata(
ctx,
"confirm_destination_tag",
title="Confirm tag",
content="Destination tag:\n{}",
param=str(tag),
hide_continue=True,
br_code=ButtonRequestType.ConfirmOutput,
)
async def require_confirm_tx(ctx, to, value):
await confirm_total_ripple(ctx, to, format_amount(value, helpers.DECIMALS))