mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
refactor(core/stellar): replace confirm_timebounds_stellar with confirm_properties
This commit is contained in:
parent
1dcfdebf7a
commit
c30091b9c5
@ -5,8 +5,8 @@ from trezor.ui.layouts import (
|
||||
confirm_address,
|
||||
confirm_blob,
|
||||
confirm_metadata,
|
||||
confirm_properties,
|
||||
)
|
||||
from trezor.ui.layouts.tt.altcoin import confirm_timebounds_stellar
|
||||
from trezor.wire import DataError
|
||||
|
||||
from . import consts
|
||||
@ -51,7 +51,15 @@ async def require_confirm_init(
|
||||
|
||||
|
||||
async def require_confirm_timebounds(ctx: Context, start: int, end: int) -> None:
|
||||
await confirm_timebounds_stellar(ctx, start, end)
|
||||
await confirm_properties(
|
||||
ctx,
|
||||
"confirm_timebounds",
|
||||
title="Confirm timebounds",
|
||||
props=(
|
||||
("Valid from (UTC)", str(start) if start > 0 else "[no restriction]"),
|
||||
("Valid to (UTC)", str(end) if end > 0 else "[no restriction]"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
async def require_confirm_memo(
|
||||
|
@ -43,29 +43,6 @@ async def confirm_total_ripple(
|
||||
)
|
||||
|
||||
|
||||
async def confirm_timebounds_stellar(
|
||||
ctx: wire.GenericContext, start: int, end: int
|
||||
) -> None:
|
||||
text = Text("Confirm timebounds", ui.ICON_SEND, ui.GREEN)
|
||||
text.bold("Valid from (UTC):")
|
||||
if start:
|
||||
text.normal(str(start))
|
||||
else:
|
||||
text.mono("[no restriction]")
|
||||
|
||||
text.bold("Valid to (UTC):")
|
||||
if end:
|
||||
text.normal(str(end))
|
||||
else:
|
||||
text.mono("[no restriction]")
|
||||
|
||||
await raise_if_cancelled(
|
||||
interact(
|
||||
ctx, Confirm(text), "confirm_timebounds", ButtonRequestType.ConfirmOutput
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
async def confirm_transfer_binance(
|
||||
ctx: wire.GenericContext, inputs_outputs: Sequence[tuple[str, str, str]]
|
||||
) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user