1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-22 12:32:02 +00:00

fix style

This commit is contained in:
M1nd3r 2024-08-30 10:56:50 +02:00
parent 117f3eab73
commit 19b3e9b845
4 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from trezor.ui.layouts import confirm_action, show_error_and_raise
from trezor.utils import sd_hotswap_enabled
if TYPE_CHECKING:
from trezor.ui.layouts.common import ProgressLayout
from trezor.ui import ProgressLayout
class SdCardUnavailable(wire.ProcessError):

View File

@ -255,7 +255,8 @@ if __debug__:
# just updated itself. The update is already live for the caller to retrieve.
def _state(
thp_pairing_secret: bytes | None, thp_pairing_code_entry_code: int | None
thp_pairing_secret: bytes | None = None,
thp_pairing_code_entry_code: int | None = None,
) -> DebugLinkState:
from trezor.messages import DebugLinkState
@ -284,7 +285,7 @@ if __debug__:
) -> DebugLinkState | None:
thp_pairing_secret: bytes | None = None
thp_pairing_code_entry_code: bytes | None = None
thp_pairing_code_entry_code: int | None = None
if utils.USE_THP and msg.thp_channel_id is not None:
channel_id = int.from_bytes(msg.thp_channel_id, "big")

View File

@ -150,6 +150,7 @@ async def show_display_data(ctx: PairingContext, expected_types: Container[int]
return result
@check_state_and_log(ChannelState.TP1)
async def _handle_code_entry_is_included(ctx: PairingContext) -> None:
commitment = sha256(ctx.secret).digest()

View File

@ -11,6 +11,7 @@ from trezor.wire.protocol_common import Context, Message
if TYPE_CHECKING:
from typing import Container
from trezor import ui
from .channel import Channel