diff --git a/core/src/apps/stellar/layout.py b/core/src/apps/stellar/layout.py index 5247a0653d..9b3e98cc35 100644 --- a/core/src/apps/stellar/layout.py +++ b/core/src/apps/stellar/layout.py @@ -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( diff --git a/core/src/trezor/ui/layouts/tt/altcoin.py b/core/src/trezor/ui/layouts/tt/altcoin.py index 8fcacb35fd..0aee048f9e 100644 --- a/core/src/trezor/ui/layouts/tt/altcoin.py +++ b/core/src/trezor/ui/layouts/tt/altcoin.py @@ -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: