mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-22 12:32:02 +00:00
fix(core): fix pairing layout when only QR code or only Code Entry is selected
[no changelog]
This commit is contained in:
parent
164dc3dede
commit
f7b0a03459
@ -30,13 +30,21 @@ class PairingDisplayData:
|
||||
self.code_nfc_unidirectional: bytes | None = None
|
||||
|
||||
def get_display_layout(self) -> RustLayout:
|
||||
# TODO have different layouts when there is only QR code or only Code Entry
|
||||
qr_str = ""
|
||||
code_str = ""
|
||||
if self.code_qr_code is not None:
|
||||
qr_str = self._get_code_qr_code_str()
|
||||
if self.code_code_entry is not None:
|
||||
code_str = self._get_code_code_entry_str()
|
||||
|
||||
return RustLayout(
|
||||
trezorui2.show_address_details( # noqa
|
||||
qr_title="Scan QR code to pair",
|
||||
address=self._get_code_qr_code_str(),
|
||||
address=qr_str,
|
||||
case_sensitive=True,
|
||||
details_title="",
|
||||
account="Code to rewrite:\n" + self._get_code_code_entry_str(),
|
||||
account="Code to rewrite:\n" + code_str,
|
||||
path="",
|
||||
xpubs=[],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user