mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-12 00:10:58 +00:00
chore(core): decrease code-size a little bit
[no changelog]
This commit is contained in:
parent
9db8ff1fae
commit
5b52db1ed3
@ -33,7 +33,7 @@ async def get_ecdh_session_key(msg: GetECDHSessionKey) -> ECDHSessionKey:
|
|||||||
await confirm_address(
|
await confirm_address(
|
||||||
f"Decrypt {proto}",
|
f"Decrypt {proto}",
|
||||||
serialize_identity_without_proto(msg_identity),
|
serialize_identity_without_proto(msg_identity),
|
||||||
None,
|
"",
|
||||||
)
|
)
|
||||||
# END require_confirm_ecdh_session_key
|
# END require_confirm_ecdh_session_key
|
||||||
|
|
||||||
|
@ -765,7 +765,7 @@ async def confirm_blob(
|
|||||||
br_type: str,
|
br_type: str,
|
||||||
title: str,
|
title: str,
|
||||||
data: bytes | str,
|
data: bytes | str,
|
||||||
description: str | None = None,
|
description: str = "",
|
||||||
verb: str = "CONFIRM",
|
verb: str = "CONFIRM",
|
||||||
verb_cancel: str | None = "", # icon
|
verb_cancel: str | None = "", # icon
|
||||||
hold: bool = False,
|
hold: bool = False,
|
||||||
@ -774,7 +774,6 @@ async def confirm_blob(
|
|||||||
chunkify: bool = False,
|
chunkify: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
title = title.upper()
|
title = title.upper()
|
||||||
description = description or ""
|
|
||||||
layout = RustLayout(
|
layout = RustLayout(
|
||||||
trezorui2.confirm_blob(
|
trezorui2.confirm_blob(
|
||||||
title=title,
|
title=title,
|
||||||
@ -848,7 +847,7 @@ async def _confirm_ask_pagination(
|
|||||||
def confirm_address(
|
def confirm_address(
|
||||||
title: str,
|
title: str,
|
||||||
address: str,
|
address: str,
|
||||||
description: str | None = "Address:",
|
description: str = "Address:",
|
||||||
br_type: str = "confirm_address",
|
br_type: str = "confirm_address",
|
||||||
br_code: ButtonRequestType = BR_TYPE_OTHER,
|
br_code: ButtonRequestType = BR_TYPE_OTHER,
|
||||||
) -> Awaitable[None]:
|
) -> Awaitable[None]:
|
||||||
|
@ -744,7 +744,7 @@ async def confirm_blob(
|
|||||||
br_type: str,
|
br_type: str,
|
||||||
title: str,
|
title: str,
|
||||||
data: bytes | str,
|
data: bytes | str,
|
||||||
description: str | None = None,
|
description: str = "",
|
||||||
verb: str = "CONFIRM",
|
verb: str = "CONFIRM",
|
||||||
verb_cancel: str | None = None,
|
verb_cancel: str | None = None,
|
||||||
hold: bool = False,
|
hold: bool = False,
|
||||||
@ -753,7 +753,6 @@ async def confirm_blob(
|
|||||||
chunkify: bool = False,
|
chunkify: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
title = title.upper()
|
title = title.upper()
|
||||||
description = description or ""
|
|
||||||
layout = RustLayout(
|
layout = RustLayout(
|
||||||
trezorui2.confirm_blob(
|
trezorui2.confirm_blob(
|
||||||
title=title,
|
title=title,
|
||||||
@ -1019,11 +1018,11 @@ async def confirm_metadata(
|
|||||||
|
|
||||||
async def confirm_replacement(title: str, txid: str) -> None:
|
async def confirm_replacement(title: str, txid: str) -> None:
|
||||||
await confirm_blob(
|
await confirm_blob(
|
||||||
title=title.upper(),
|
"confirm_replacement",
|
||||||
data=txid,
|
title.upper(),
|
||||||
description="Transaction ID:",
|
txid,
|
||||||
verb="CONTINUE",
|
"Transaction ID:",
|
||||||
br_type="confirm_replacement",
|
"CONTINUE",
|
||||||
br_code=ButtonRequestType.SignTx,
|
br_code=ButtonRequestType.SignTx,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1148,10 +1147,10 @@ async def confirm_sign_identity(
|
|||||||
proto: str, identity: str, challenge_visual: str | None
|
proto: str, identity: str, challenge_visual: str | None
|
||||||
) -> None:
|
) -> None:
|
||||||
await confirm_blob(
|
await confirm_blob(
|
||||||
title=f"Sign {proto}",
|
"sign_identity",
|
||||||
data=identity,
|
f"Sign {proto}",
|
||||||
description=challenge_visual + "\n" if challenge_visual else "",
|
identity,
|
||||||
br_type="sign_identity",
|
challenge_visual + "\n" if challenge_visual else "",
|
||||||
br_code=BR_TYPE_OTHER,
|
br_code=BR_TYPE_OTHER,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user