|
|
|
@ -2,7 +2,7 @@ from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
|
|
from trezor.enums import ButtonRequestType
|
|
|
|
|
from trezor.strings import format_amount
|
|
|
|
|
from trezor.ui.layouts import confirm_metadata
|
|
|
|
|
from trezor.ui.layouts import confirm_metadata, confirm_total
|
|
|
|
|
|
|
|
|
|
from .helpers import DECIMALS
|
|
|
|
|
|
|
|
|
@ -10,14 +10,11 @@ if TYPE_CHECKING:
|
|
|
|
|
from trezor.wire import Context
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def require_confirm_fee(ctx: Context, fee: int) -> None:
|
|
|
|
|
await confirm_metadata(
|
|
|
|
|
async def require_confirm_total(ctx: Context, total: int, fee: int) -> None:
|
|
|
|
|
await confirm_total(
|
|
|
|
|
ctx,
|
|
|
|
|
"confirm_fee",
|
|
|
|
|
"Confirm fee",
|
|
|
|
|
"Transaction fee:\n{}",
|
|
|
|
|
format_amount(total, DECIMALS) + " XRP",
|
|
|
|
|
format_amount(fee, DECIMALS) + " XRP",
|
|
|
|
|
ButtonRequestType.ConfirmOutput,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -35,4 +32,4 @@ async def require_confirm_destination_tag(ctx: Context, tag: int) -> None:
|
|
|
|
|
async def require_confirm_tx(ctx: Context, to: str, value: int) -> None:
|
|
|
|
|
from trezor.ui.layouts import confirm_output
|
|
|
|
|
|
|
|
|
|
await confirm_output(ctx, to, format_amount(value, DECIMALS) + " XRP", hold=True)
|
|
|
|
|
await confirm_output(ctx, to, format_amount(value, DECIMALS) + " XRP")
|
|
|
|
|