diff --git a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs index 82986d436b..cd70e70d7a 100644 --- a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs +++ b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs @@ -36,12 +36,13 @@ pub mod menu; pub mod theme; pub mod welcome; +use crate::ui::model_tt::{ + bootloader::theme::TEXT_NORMAL, + component::{PinKeyboard}, +}; use confirm::Confirm; use intro::Intro; use menu::Menu; -use crate::ui::model_tt::bootloader::theme::TEXT_NORMAL; -use crate::ui::model_tt::component::{PinKeyboard, PinKeyboardMsg}; -use crate::ui::model_tt::theme::button_cancel; use self::theme::{RESULT_FW_INSTALL, RESULT_INITIAL, RESULT_WIPE}; @@ -446,12 +447,7 @@ extern "C" fn screen_pairing_confirm(buffer: *const cty::uint8_t) -> u32 { #[no_mangle] extern "C" fn screen_repair_confirm() -> u32 { - - let msg = Label::new( - "Allow repair?", - Alignment::Center, - TEXT_NORMAL, - ); + let msg = Label::new("Allow repair?", Alignment::Center, TEXT_NORMAL); let right = Button::with_text("ALLOW").styled(button_confirm()); let left = Button::with_text("DENY").styled(button_bld()); let title = Label::new("REPAIR", Alignment::Start, theme::TEXT_BOLD) diff --git a/core/embed/rust/src/ui/model_tt/bootloader/theme.rs b/core/embed/rust/src/ui/model_tt/bootloader/theme.rs index 8a52be3734..31506fe88a 100644 --- a/core/embed/rust/src/ui/model_tt/bootloader/theme.rs +++ b/core/embed/rust/src/ui/model_tt/bootloader/theme.rs @@ -230,13 +230,7 @@ pub fn button_bld() -> ButtonStyleSheet { } } -pub const TEXT_NORMAL_BLACK: TextStyle = TextStyle::new( - Font::NORMAL, - WHITE, - BLACK, - WHITE, - WHITE, -); +pub const TEXT_NORMAL_BLACK: TextStyle = TextStyle::new(Font::NORMAL, WHITE, BLACK, WHITE, WHITE); pub const TEXT_TITLE: TextStyle = TextStyle::new( Font::BOLD, diff --git a/core/embed/unix/ble/state.c b/core/embed/unix/ble/state.c new file mode 100644 index 0000000000..33965a48dd --- /dev/null +++ b/core/embed/unix/ble/state.c @@ -0,0 +1,14 @@ + + +#include "ble/state.h" + +static bool ble_state_connected = false; +static bool ble_state_initialized = false; + +bool ble_connected(void) { return ble_state_connected; } + +void set_connected(bool connected) { ble_state_connected = connected; } + +void set_initialized(bool initialized) { ble_state_initialized = initialized; } + +bool ble_initialized(void) { return ble_state_initialized; } diff --git a/core/embed/unix/ble/state.h b/core/embed/unix/ble/state.h new file mode 100644 index 0000000000..98f38d30ac --- /dev/null +++ b/core/embed/unix/ble/state.h @@ -0,0 +1,16 @@ + +#ifndef __BLE_STATE__ +#define __BLE_STATE__ + +#include +#include + +bool ble_initialized(void); + +void set_initialized(bool initialized); + +bool ble_connected(void); + +void set_connected(bool connected); + +#endif diff --git a/core/src/apps/management/ble/pairing_request.py b/core/src/apps/management/ble/pairing_request.py index dce32262da..bfd221773d 100644 --- a/core/src/apps/management/ble/pairing_request.py +++ b/core/src/apps/management/ble/pairing_request.py @@ -16,4 +16,7 @@ async def pairing_request(ctx: GenericContext, _msg: PairingRequest) -> AuthKey: pin = await request_pin_on_device(ctx, "PAIRING", None, True, False, True) + if len(pin) != 6: + pin = "000000" + return AuthKey(key=pin.encode())